We use a 30 day cookie-based tracking system that drops our cookie on the visitor’s browser when a tracking link is clicked through. Each unique affiliate tracking link contains the "Merchant ID", "Programme ID", "Affiliate ID", and a few other tracking parameters that allow us to track any sales made through the referral, and which affiliate should be awarded the commission.
Advertisers then have our tracking code placed on their site, so we can track when a conversion is made.