Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- 1 pixel web bug on thank you page, reading cookies?


supermanjnk - 1:06 pm on Sep 29, 2006 (gmt 0)



Commission Monster uses a cookie based method to track sales, leads and clicks through it's network. Cookies are the most popular form of affiliate tracking as they provide a great solution to the stateless nature of the http protocol. In short when an internet user clicks your link on an affiliate's website the user will be transported to our server briefly where a cookie is set in their browser before our server redirects them to your website.

You need to place our tracking pixel on your thank you page. This will be the page where the desired action has been completed like "your order number is #" or "thank you for completing our survey". If the internet user buys something from your website or completes a lead action when shown this page the <img> tag will execute a script that checks the internet users computer for our cookie. If the cookie indicates that the user was sent from an affiliate's website our system will credit the affiliate and debit your account for the respective amount due.


This is how that works.

user visits siteA
user clicks affliate link which goes to SiteB?url=siteC&id=afid (cookie is set on siteB with information from url and id)
User is redirected to siteC
User then goes through whatever on siteC lets just say a survey for now
User Completes the survey
User ends up on a page where it says Thank you for completing the survey
On this page you have your 1px web bug:
<img height="1" Width="1" src="http://siteB/tracker.php">
What this code now does is executes the tracker.php script on siteB
Tracker.php runs code from the siteB server which looks to see if a cookie for siteB is set (not a cookie for site a)
If the cookie is set it will store the information from the cookie into a database (some of them may have things you can add to the tracker.php query string like price or whatever for stores)


Thread source:: http://www.webmasterworld.com/php/3100152.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com