HTTP referrer transfer (sites A, B, CAC)?

This is best illustrated by an example:

The user goes to site A and goes through site B. The link site is now site A. The same user clicks on Site C from site B. Now, the link site is site B.

I am wondering if it is possible for the link site for site C to appear as site A (the original referrer, if you do).

Why do I need it (a little more context)?

I use targeting software (site B), which will be redirected to the true destination (site C). Since I will contact this targeting software instead of the final destination, Google Analytics will register all referrals as targeting software that completely destroys the goal of tracking link sites.

I would like to be able to pass the “actual” referrer (site A) to see where the visits to site C actually come from.

If possible, I would like to do this without “hacks” or “workarounds” that could easily break.

+5
source share
2 answers

See _ setReferrerOveride :

_setReferrerOverride ()

_setReferrerOverride (newReferrerUrl) Sets the referrer URL used to determine campaign tracking values. Use this method to gadgets inside iFrame correctly track referrals. By default, campaign tracking uses the document.referrer property to determine the referrer URL, which is passed in the utmr parameter of the GIF request. However, you can override this parameter with your own value. For example, if you set a new referrer to http://www.google.com/search?hl=en&q=hats , the campaign cookie will save the new campaign with source = google, medium = organic and keyword = hats.

_gaq.push(['_setReferrerOverride', 'URL-YOU-WANT-AS-REFERRER']); 

Perhaps it still works whether you use an iframe or not. It’s worth a try, not a hack.

+8
source

If you use universal analytics, it will look something like this:

 ga('set', 'referrer', 'URL-YOU-WANT-AS-REFERRER'); 

Make sure you do this before sending the pageview event (and after calling create ).

+6
source

All Articles