I have an ecommerce website that works in a classical way: people sign up, buy a product with their CC.
It uses the default Django auth system for users and registration and session framework.
Now I want to implement a referral system to my system where people can invite other people by giving their referral link (ie mysite.com/referral/123123/
) and if a person signs up AND buys an item, the inviter gets 5$.
How can this the implemented ? For instance:
After the new user enters the site with the referral link, how can I keep track of this user with the referrer ? Saving his referrer to the session ?
What modification should I do to the built-in django user model to track these referrers and referred ones?