Running a Content Experiment but not seeing any data?

Last months I had quite some clients that started a content experiment but didn't see data comming in:

In almost all those cases the solution was pretty easy: they had a custom Google Analytics code for multiple domain tracking. And that means you need to make some changes to the Content Experiments script also. This is an example of a changed Google Analytics tracking code:

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXXX-X']);
_gaq.push(['_setDomainName', '']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_setCookiePath, '/folder']);

And this is the NEW Content Experiment code you need to get both scripts aligned:

<!-- Google Analytics Content Experiment code -->
<script>function utmx_section(){}function utmx(){}(function(){var
function f(n){if(c){var i=c.indexOf(n+'=');if(i>-1){var j=c.
indexOf(';',i);return escape(c.substring(i+n.length+1,j<0?c.
length:j))}}}var x=f('__utmx'),xx=f('__utmxx'),h=l.hash;d.write(
'<sc'+'ript src="'+'http'+(l.protocol=='https:'?'s://ssl':
'&utmx='+(x?x:'')+'&utmxx='+(xx?xx:'')+'&utmxtime='+new Date().
'" type="text/javascript" charset="utf-8"><\/sc'+'ript>')})();
<!-- End of Google Analytics Content Experiment code -->

The first script block (line 1-4) is the addition that does the trick. Copy your setDomainName value to the _udn parameter and do the same for the cookiePath.

Did this fix work for you?

Click to activate social bookmarks