Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #8875

    Hello,

    Here we go. Im testing 2 variations of my corona template homepage. For that Im using Google Website Optimizer. The tricky parts comes when it says is necessary to pasted each of the JavaScript tags into your experiment pages. Code:

    <!– Google Website Optimizer Control Script –>

    <script>

    function utmx_section(){}function utmx(){}

    (function(){var k=’3092129626′,d=document,l=d.location,c=d.cookie;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’

    +’/siteopt.js?v=1&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>

    <!– End of Google Website Optimizer Control Script –>

    <!– Google Website Optimizer Tracking Script –>

    <script type=”text/javascript”>

    var _gaq = _gaq || [];

    _gaq.push();

    _gaq.push();

    (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>

    <!– End of Google Website Optimizer Tracking Script –>

    My experimental pages where I need to insert this code are:

    http://www.digitaldiscovery.com.pt

    http://www.digitaldiscovery.com.pt/homepage/

    http://www.digitaldiscovery.com.pt/servicos-de-marketing-digital/contacto/

    How can I do this in the template :)

    Tks in advance!!

    Pedro Pereira

    #62733

    Solution: Create a Footeg widget. Drop needed htmlJava code as a “Text” field on that vidget.

    Bam: Now you have needed Java code on all pages.

    Ver 2.0: Ypu can add HTML widget not as “Footer” (which will be “ON” onto all website in that case), but you can create a Template with a Widget inside it. And use that templarte fro those (three) of the needed pages.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Google Optimizer’ is closed to new replies.