Support » Plugin: Google Content Experiments » [Plugin: Google Content Experiments] Error when validating code

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author glennm

    (@glennm)

    I’ve checked your experiment code and found differences (underscores) with two experiment code snippets I’m using myself.

    I’ve adjusted your code. Try using the code below and see if you get your experiment validated:

    <script>function utmx_section(){}function utmx(){}(function(){var
    k='132090-0',d=document,l=d.location,c=d.cookie;
    if(l.search.indexOf('utm_expid='+k)>0)return;
    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':'://www')+'.google-analytics.com/ga_exp.js?'+'utmxkey='+k+'&utmx='+(x?x:'')+'&utmxx='+(xx?xx:'')+'&utmxtime='+new Date().valueOf()+(h?'&utmxhash='+escape(h.substr(1)):'')+'" type="text/javascript" charset="utf-8"><\/sc'+'ript>')})();
    </script><script>utmx('url','A/B');</script>

    Thanks for the fix. It worked perfectly 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Google Content Experiments] Error when validating code’ is closed to new replies.