I'm creating a kind of affiliate marketing website with products I've scraped from partner websites. The user clicks on the Buy link and is re-directed to the partner site to complete the purchase. If the user buys the product, I should get a percentage of the sales. So far this model is a pretty common approach.
However the element that I don't yet understand is, what technology or script do other affiliate sites use to track to see if the user, once they've let the main site, does purchase the product or not? How do I track my user's purchase or actions once they've left my site?
I know that cookies can store brief user information but I don't think that's enough. I need to then store this information in a database. Should I use php sessions for this?
Any tips or suggestions is really appreciated.
What technology or script do other affiliate sites use to track to see if the user, once they've let the main site, does purchase the product or not?
click tracking code which is placed on the landing pages. Once a vsitor comes to landing page through an affiliate website, a random visitor id along with affiliate id mapping is created which gets stored in the database. At this same time, a cookie gets created with the visitor id, affiliate id info etc. When the user finishes a purchase, there is a
How do I track my user's purchase or actions once they've left my site?
I have answered this partly in the above question. But once the user comes back again, it is going to recognise this user based on cookie and preferably you can store the session value in the cookie itself rather than the database, because the sale entry will get created in the database once the user has completed his purchase, if you have placed your
sale tracking code at the end of purchase page.