Best way Implement "refferal links" in Django

Posted by Murkin on Stack Overflow See other posts from Stack Overflow or by Murkin
Published on 2010-06-16T09:41:03Z Indexed on 2010/06/16 9:42 UTC
Read the original article Hit count: 162

Filed under:

Intro

I am working on an e-commerce website. And we want to add a feature where a user can refer others via a custom link e.g.:

http://mysite.com/a1t2312 or http://mysite.com/?ref=a1t2312 (a1t231 being the referral code).

A user following such a link, will navigate a few pages on the site. And if he reached the 'buy' page and purchases something - the original referrer will get a discount.

The question is:

What is the best method to track the referral code ? Put it in the user's cookies ? Stick it somehow into the session ? Other method ?

Thanks

© Stack Overflow or respective owner

Related posts about django