Our KRL extension has an interesting tracking problem. Basically we're one of many publishers of merchant links for CJ (commission junction). CJ requests that if another publisher appends afsrc=1 to their re-direct URL, no browser extension will load on the resulting merchant page.
We have coded our extension to respect this parameter with the document.referrer tag, which works great as long as the URL that loads before the merchant page has it in the URL. This flow is:
- User goes to another publisher page
- User Clicks on a merchant page
- User Sees a page and the URL has afsrc=1 in it
- User is re-directed to the merchant page
Our extension works as it should with this kind of flow. The problem is if it is a server side re-direct which would be the following flow:
- User goes to another publisher page
- User Clicks on a merchant page
- The publisher does a server side re-direct with afsrc=1 in the url that the user does NOT see
- User is re-directed to the merchant page
As far as I can tell, I don't see a way to look for that parameter in the case of a server side re-direct. Does KRL provide a way to look at the last few headers or URLs the browser has seen regardless of if the user actually saw them?