Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Hi all of you Google Analytics experts out there.

I have a very severe issue that I seem unable to solve.

Problem in short

Google Analytics is resetting referrer information, due to several domain changes.


The visitor-flow is like this:

website.com -> my.website.com -> third party non-controlable payment gateway -> my.website.com.

Current implementation:

To avoid issues with the third party payment processor I have modified the Google Analytics code with:

['_setDomainName', 'none'],
['_setAllowLinker', true],

This way I eliminated the issue of missing referrer from my.website.com -> payment gateway -> my.website.com.

However, the referrer is still set to website.com when the visitor goes from website.com -> my.website.com.

Any suggestions on how to kill this issue?

Code implemented on both my.website.com and website.com:

<script type="text/javascript">
// https://developers.google.com/analytics/devguides/collection/gajs/asyncMigrationExamples?hl=da#VirtualPageviews
// Look in init.js
var gaId = 'UA-XXXXXX-X';
//window['ga-disable-' + gaId] = true; // When in dev environment
var _gaq = _gaq || [];
['_setAccount', gaId],
['_setDomainName', 'none'],
['_setAllowLinker', true],
(function () {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
share|improve this question
I'm confused, do you want Google Analytics to see a referrer when somebody clicks to my.website.com from website.com? –  Stephen Ostermiller Jul 25 '13 at 17:33
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.