title: Referral lost after redirect
body: <p>I have a website (<a href="http://www.accent.jobs" rel="nofollow">www.accent.jobs</a>) which contains a language selection tool on the www. subdomain.
  When choosing a language, a cookie is set, so the user only sees the language selection page once, and automatically get redirected the right way next time.</p>
  
  <p>What I notice in Analytics, is that traffic from the www to a subdomain (be.accent.jobs for instance) is seen as referral traffic.</p>
  
  <p>What I do on the www. subdomain:</p>
  
  <ul>
  <li>User clicks a link.</li>
  <li>Javascript does an AJAX request to a PHP file which sets the cookie.</li>
  <li>The user gets redirected through JavaScript using <code>window.location</code>.</li>
  </ul>
  
  <p>When the user goes back to the www. subdomain, the redirect is done through PHP using a 302, without a page rendering.</p>
  
  <p>Any ideas on how I could get the traffic from www. to a subdomain not to be handled as referral traffic in Analytics? I would like to keep the original referrer (the site that referred to www.accent.jobs) as the referrer in Analytics.</p>
  
  <p>This is the tracking code on both the www and the be. subdomain:</p>
  
  <pre><code>var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-xxxxxx-xx']);
  _gaq.push(['_trackPageview']);
  _gaq.push(['_setDomainName', 'accent.jobs']);
  _gaq.push(['_addIgnoredRef', 'accent.jobs']);
  _gaq.push(['_addIgnoredRef', 'be.accent.jobs']);
  _gaq.push(['_addIgnoredRef', 'nl.accent.jobs']);
  _gaq.push(['_addIgnoredRef', 'ro.accent.jobs']);
  _gaq.push(['b._setAccount', 'UA-xxxxxx-x']);
  _gaq.push(['b._trackPageview']);
  _gaq.push(['b._setDomainName', 'accent.jobs']);
  _gaq.push(['b._addIgnoredRef', 'accent.jobs']);
  _gaq.push(['b._addIgnoredRef', 'be.accent.jobs']);
  _gaq.push(['b._addIgnoredRef', 'nl.accent.jobs']);
  _gaq.push(['b._addIgnoredRef', 'ro.accent.jobs']);      
  (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);
  })();
  </code></pre>
  
  <p>PS: I'm tracking on multiple UA accounts to keep the data in an older account as well, hence the 'double' tracking code.</p>
  
  <p><strong>Tries</strong></p>
  
  <ul>
  <li>Tried replacing the JavaScript redirect by server-side 302 header redirects in PHP, no luck.</li>
  <li>Also tried using only JavaScript redirects, still no luck.</li>
  </ul>