Once you registered with an affiliate program, the merchant gives you affiliate links which contain a unique identification that can track the leads you send via affiliate links. Merchants are well concerned in this tracking to give credits to appropriate affiliates and keep their interest. Basically affiliate programs use Cookies or/and IP Addresses to track affiliate sales and some use both.

How Cookies Work

A cookie is a small text file from a certain web site that is saved to visitors’ computers when they visit or when they make a specific event (in this case clicking on an affiliate link). Different web sites save different cookies which later can be used by those web sites when visitors revisit them. Usually in Windows, all cookies are saved in a specific folder called Cookies.

If you see a certain web site that displays the time you last visited, it achieves that using cookies. When you first visit, it saves a cookie in your computer including the time and when you revisit, the web site checks whether there are any cookies it saved and finds previously saved one. It extracts the last visited time from it and displays it to you. Then it rewrites the cookie with the current time which will be shown as the last visited time in your next visit.

A web site accesses cookies by their names and each web site becomes specific when naming cookies and inside variables which make it impossible to access them by other web sites. All cookies carry an expiration time which determines how long a cookie should reside on visitor’s computer. Cookies are governed by its parent web site and it can overwrite them or completely delete them during their life time. In addition to that, visitors can manually delete the cookies in their computers.

Cookies can be set using both client and server side scripting languages but mostly done with server side scripts because of higher control they provide. If you are interested, here is a simple article on how to write and read cookies with PHP. If you are new to PHP, first follow the tutorials I recommended in Understanding Web Technologies before trying this one.

How Affiliate Cookies Work

When it comes to affiliate sales tracking, after a visitor clicking on a link of certain affiliate, the affiliate program writes a cookie including the unique identification of that affiliate. If the visitor didn’t buy first time but did so in a next visit following the main web address of the merchant’s web site, the affiliate still gets the credit. The merchant’s web site checks visitor’s cookies to see whether he has been previously sent by an affiliate. If so, the credit goes to that affiliate.

Affiliate cookies are overwritten to give credits to the most recent affiliate. That means if a visitor visits to a merchant site via an affiliate link and later on he visits the same merchant site via an affiliate link of another affiliate, the cookie for that visitor is overwritten including the details of second affiliate which will give credit to him when visitor buys. This is because affiliate programs assume that if an affiliate sale was made, the most recent affiliate was the one who influenced the customer most.

Majority of affiliate programs set cookies to expire after a certain time period. After that, affiliate won’t get credit. However when a visitor comes via an affiliate link, the duration of the cookie will be reset. For an example, if the duration of the cookie is 3 months and now two months has passed after setting the cookie and the same visitor comes via an affiliate link then his cookie will be reset to expire in 3 months.

There are also some life time commission affiliate programs. This means the cookie won’t expire and in some affiliate programs, after the first purchase, the customer will be stuck to you. So, no matter how many other affiliate links the visitor follows, your cookie won’t be overwritten and you will get credit for future sales of that customer. For a good list of lifetime commission affiliate programs, visit LifetimeCommissions.com.

Affiliate Sales Tracking with IP Addresses

IP Address is used to identify your computer when you are connected to the computer. Each computer connected to the internet gets a unique IP Address, so that computers in the internet can communicate to each other. To see your current IP Address visit IPAddressWorld.com. A good use of IP Addresses is to restrict spammers. When a request is made to a certain web site, the site can check the IP Address of the computer where the request was made and if it has involved in any misuse, it can prevent that computer accessing the site.

The same mechanism is used to track affiliate sales. When a user comes via an affiliate link, the affiliate program stores his IP Address and when he buys, the commission is assigned to the affiliate who referred him. Same crediting procedures can be applied by the affiliate program like in cookies (Expiration, Overwriting etc). However if the user is using a Dial-up internet connection then the affiliate won’t get any credit since Dial-up users get different IP Addresses each time they connect to the internet.

Using Both Cookies and IP Addresses to Track Affiliate Sales

Both methods have drawbacks. Cookies can be get deleted and IP Addresses can vary. Therefore some affiliate programs use both of these methods to tack affiliate sales which reduce information loss.