Cookie settings

There are multiple cookies created by Post Affiliate Pro, the most important from tracking perspective is the PAPVisitorId cookie, which uniquely identifies the visitor of your website. Identification of the visitor along with information about referring affiliate, campaign, cookie lifetime and other things is saved into Visitor Affiliates section of the software once a customer hits the affiliate banner and is led to the target URL (integrated with the click tracking code).

A PAPVisitorId cookie is created for every visitor of a website where click tracking code is integrated, however visitor is saved in PAP's database only if the visitor was referred by an affiliate.

The PAPVisitorId is created as a first party browser cookie (on the domain where click tracking code is added), third party browser cookie (on the domain where PAP is installed), HTML5 local storage object and a Flash storage object. We create 4 different records to ensure that the tracking ID isn't easily removed.


By default, cookie lifetime is set to 60 days. You can set the lifetime of the cookie - in days for each campaign. Open Campaign manager - Edit any Campaign - edit Details, set Cookie lifetime.

Until the cookie is valid (and present in the customer's browser/computer), the customer does not need to go through the affiliate's banner again if he makes a purchase in the future. He just visits the eshop of the merchant, makes a purchase and the affiliate who brought him is rewarded. 


Overwrite cookies option determines the cookie attribution, whether it goes to the first affiliate whose link was clicked or the last affiliate whose link was clicked by the customer. It can be enabled or disabled in three locations:

  • globally for all campaigns/users, set overwrite cookies in Configuration -> Cookies
  • for certain campaign, you can set it in Campaign manager -> click Edit (pencil icon) next to any campaign -> edit Details, this setting overrides the general setting applied in Configuration -> Cookies settings
  • for certain affiliate in Affiliate manager -> Edit any Affiliate -> Tracking, this settings overrides the cookie settings from the campaign and from the general settings
If a customer clicks Adam's banner but doesn't purchase anything and the day later the customer clicks Betty's banner and makes a purchase and overwrite cookies is turned on the commission will go to Betty and Betty will be getting commissions from all future purchases of the customer until the customer clicks a link from a different affiliate or the cookie validity expires.
In case you turn on the Overwrite Cookies only on per affiliate basis, then these affiliates (clicking their links/banners) will overwrite cookies (affiliate information stored in the cookie) of other affiliates.
The priority of Overwrite Cookies is in this order (1 - highest priority, 3 - lowest priority):
  1. overwriting cookies on affiliate basis
  2. overwriting cookies on campaign basis
  3. overwriting cookies globally
If you want to reward the affiliate only for the first sale done by the customer after clicking an affiliate link/banner you need to go to Configuration - Cookies and enable the Delete cookie after lead / sale option.

You should also turn off the IP tracking under Configuration - Tracking settings and uncheck Track referrals by IP address and Track referrals by UserAgent and IP address, so that the customer isn't identified by IP address once his cookie was removed from PAP's database.



Under Tools > Visitor affiliates you can find visitor ID records. 

When customer clicks on affiliate link multiple times, 2 records are created in 'visitor affiliates' screen with the same visitor ID. One record is for first click and the other for last click. Under 'Type' column you can see which of these two records is 'Actual', so you can see for what click (first or last) the cookie is valid, this is determined by the Overwrite cookies option mentioned before.
Check use case example below. 


USE CASE - example of using overwrite cookies and cookie lifetime
If a customer clicks an affiliate link (30 days cookie lifetime is set in PAP), but doesn't make a sale and then e.g. 29 days after he makes 2nd click again, but only makes the sale another 2 days later (so 31 days after the first click).

Questions > 
Will the commission be registered? 
Will the cookie get a new lifetime of 30 days from the 2nd click?

Answers > 
In this example, the most important fact is, if you are using overwrite cookies function or not. 

So, when you have overwrite cookies DISABLED
- in our example sale will NOT be saved.
When a customer clicks on affiliate's link for the first time, click is tracked and the visitor ID record for FIRST click is created and set to 'actual'.
In our case, cookie validity of this click is set to 30 days. If customer would make a sale in 30 days, sales would be tracked and commission created to the affiliate.
However, if customer does not make a sale and click on an affiliate link for 2nd time (29 days later), click is tracked and visitor ID record for LAST click is created, but it is not set to 'actual', because it does not overwrite first (still valid) click. So, first click would be still valid. If the customer would make a sale 2 days later (so 31 days after the first click), this sale will NOT be tracked, because valid cookie expired 1 day ago (at 30th day).

So, with overwrite cookies disabled, clicking on same affiliate link does not extend cookie validity.

When you have overwrite cookies ENABLED
- in our example sale will BE saved.
When a customer clicks on affiliate's link first time, clicks is tracked and visitor ID record for FIRST click is created and set to 'actual'.
Then customer clicks on same affiliate link 29 days later, click is tracked and visitor ID record for LAST click is created and this click will be set as 'actual' because of overwrite cookies function.

Cookie lifetime validity will be extended for another 30 days, so when customer makes a sale 2 days later (so 31 days after the first click), sale will be tracked based on last click (2nd click made on 29th day).