This article was published on Smashing Magazine. Below is the quick summary and a link to the full article.
In this tutorial, we will create a Magento module that will capture an affiliate referral from a third-party source (e.g. an external website or newsletter) and include a HTML script on the checkout success page once this referral has been converted.
Read the full article at Smashing Magazine.