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


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


    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=”‘+



    +new Date().valueOf()+(h?’&utmxhash=’+escape(h.substr(1)):”)+

    ‘” type=”text/javascript” charset=”utf-8″></sc’+’ript>’)})();


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

    <!– Google Website Optimizer Tracking Script –>

    <script type=”text/javascript”>

    var _gaq = _gaq || [];



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



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

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




    How can I do this in the template :)

    Tks in advance!!

    Pedro Pereira


    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.