Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7634165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:06:00+00:00 2026-05-31T07:06:00+00:00

We started the A/B experiments on our site. Homepage is the tracking site and

  • 0

We started the A/B experiments on our site. Homepage is the tracking site and it redirects to 3 other versions. Since the google analytics script (ga.js) is loaded just after the site is redirected, we are loosing the referrals data. The referral is always the original homepage.

I was not successful in searching for the clear and right solution.

How can I provide the referral to analytics?
Thanks in advance.

EDIT:

So I tried _setReferrerOverride method, but didn’t help.

This code is before the control script (the enter page for visitors, i’m lookinf for referrer here). I’m setting the cookie.

if($_COOKIE[abtestRef]) $_SERVER[HTTP_REFERER] = $_COOKIE[abtestRef];
if($_SERVER[REQUEST_URI]=='/'):
setcookie('abtestRef',$_SERVER[HTTP_REFERER],time()+300,'/','cloudee.eu');

<!-- Google Website Optimizer Control Script -->
<script ....

And here is the tracking script on page which the control script redirects to. So I’m setting referrer from cookie here … but there is no change in GA, so probably I’m doing something wrong.

<!-- Google Website Optimizer Tracking Script -->
<script type="text/javascript">
 var _gaq = _gaq || [];
 _gaq.push(['gwo._setAccount', 'UA-27591323-1']);
 _gaq.push(['_setReferrerOverride','<?=$_COOKIE[abtestRef]?>']);
 _gaq.push(['gwo._trackPageview', '/2713975509/test']);

 (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);
          })();
</script>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T07:06:01+00:00Added an answer on May 31, 2026 at 7:06 am

    Crayon is right. Here’s an example snippet that works on my site:

          _gaq.push(['gwo._setAccount', 'UA-XXXXXXXX-2']);
          if (window.location.href.indexOf('ref=lowcost') >= 0) {
              _gaq.push(['_setReferrerOverride', 'http://www.lowcostairlines.nl/']);
          }
          _gaq.push(['gwo._trackPageview', '/1794361722/test']);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just started using Google's search API to find addresses and the distances between
I just started with driver development. For some experiments with loading, unloading and debugging
I've just started to experiment with the TeamCity REST API. I've been some of
I just recently started to experiment with .NET MVC 4. The thing is I
Started using Visual Studio 2012 RC since yesterday, We have one WCF solution. Whenever
I started to make an really simple experiment, just to learn the basics of
I have just started exploring TWILL . Twill is an amazing scripting language for
I just started experiment with EC2 tonight, and got a server running locally. I
I've just started learning how to use git today, progressing well. As an experiment,
Few months ago I started some experiments with jQuery plugin. I found some tutorials

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.