3

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:

  1. User goes to another publisher page
  2. User Clicks on a merchant page
  3. User Sees a page and the URL has afsrc=1 in it
  4. 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:

  1. User goes to another publisher page
  2. User Clicks on a merchant page
  3. The publisher does a server side re-direct with afsrc=1 in the url that the user does NOT see
  4. 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?

trumans1
  • 183
  • 2
  • 10
  • So the server-side redirect doesn't betray the `afsrc=1` in the referrer tag? – Steve Nay Apr 04 '11 at 16:54
  • Right. If the user sees the actual page that has afsrc=1 in the url, then the javascript document.referrer works. If it is a server-side redirect or nothing is displayed to the user, the afsrc=1 is not in document.referrer. – trumans1 Apr 04 '11 at 20:23

1 Answers1

3

KRL currently only allows response to URLs that the user loads in their browser, and not the redirect path taken to get there. If there is anything visible in the header tags on the page indicating such a flow, the Kynetx JS runtime can be extended to pass that value into a request.

I'm a little surprised that CJ would require monitoring of redirect flow on every merchant site to detect such a flow. Some docs from CJ explaining such a requirement would be helpful.

TelegramSam
  • 2,770
  • 1
  • 17
  • 22
  • So even if it's a server-side re-direct as long as the browser sees a header from it we can detect it? If so how could I go about extending the Kynetx JS runtime? As for the afsrc, all we have from CJ is this: http://www.cj.com/code_of_conduct.html under the Publisher Link section near the bottom. – trumans1 Apr 04 '11 at 18:00