Google Analytics Content Experiments not working with _setDomainName “none”

Tag: google-analytics , cross-domain , google-experiments Author: footperints Date: 2012-07-10

Thanks beforehand.

I am implementing GA content experiment but have the following problems.

I already have defined _gaq.push(['_setDomainName', 'none']) in my original GA tracking code because I want to track sub-domain and top-domain separately.

But after I set up experiment, it never got figures. I researched online and came cross this info:

I doubt my problem may be caused by my _gaq.push(['_setDomainName', 'none']),

So I used the following code:

_udn = "none";
Google Analytics Experiment code here

<script type="text/javascript>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxxxx-x']);
_gaq.push(['_setDomainName', 'none']);

However, I still never got any experiment data.

Is there anything wrong with my implementation? or what should I do to run content experiments if I have defined _gaq.push(['_setDomainName', 'none']) in my original GA tracking code?

Many thanks!

Other Answer1

I found your question this morning while searching for the same type of results I was getting in GA. Here's what I found...

According to GA Help they want the tracking code above all other GA snippets. Take a look here:

If you are still having the issue, maybe move your tracking code above all others (no matter what).

Though that may help you that didn't answer the question I had, "After 5 days of running the test and hundreds of users seeing the test pages, why are there no visits or results in GA?"

So I kept searching and found this site:

According to point #4 "Tests results will not appear for at least 2 weeks, a mechanism to encourage statistical significance."

Ah ha! There was my answer (and hopefully it's true!). I'm looking forward to the next week or so to see if Google will let me in on my data. Hope all that helps.


Hi Patrick?Thanks! Got the result several days later. Yes, seems google will hold the data for some time. Also,, this is really helpful and it explained my another problem,ie, why content experiment allocate different traffic to testing pages? This problem has confused me for a while and now I understand this is a built-in functionality. Thanks you very much!

Other Answer2

if your experiment goal is on a different domain/subdomain, you also need to set

_gaq.push(['_setAllowLinker', true]);

in your analytics code, and modify all anchors and form actions that send the browser across domains/subdomains so that the analytics script passes the analytics cookie data as a query string.