Announcement

Collapse
No announcement yet.

Google Experiments

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Google Experiments

    Is there a way to use google experiments with actinic?

    Google requires a piece of code to be inserted after the first <head> tag on the original page to redirect to the alternative page. No other page requires this. Is there away of doing this?

    Creating another External design doesn't work as although they have different names changes are updated in both - or am i doing it wrong?

    You can't use blockifs in the head, again unless i'm doing it wrong.

    At the moment, the only way i get it to work is to manually alter the page after i've uploaded the site.

    Any suggestions welcome

  • #2
    You can't use blockifs in the head
    Yes you can. Try using IsBrochureHomePage.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


    • #3
      To continue this thread... if I want to split test the home page (so for example www.domain.com/index.html) against a new version of the home page (www.domain.com/acatalog/homev2.html) then I add the Google Experiment javascript to the layout and put the blockif's around it to ensure that it only shows on the home page. This seems all fine at first as then when viewing the source of the home page the code is in there (at a glance). However when I look more carefully at the javascript that Google advise is entered the /acatalog is inserted into the code and breaks it...

      So this:-

      <!-- Google Analytics Content Experiment code -->
      <script>function utmx_section(){}function utmx(){}(function(){var
      k='12345678-1',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>
      <!-- End of Google Analytics Content Experiment code -->

      Becomes this:-

      <!-- Google Analytics Content Experiment code -->
      <script>function utmx_section(){}function utmx(){}(function(){var
      k='12345678-1',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')+'acatalog/.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>
      <!-- End of Google Analytics Content Experiment code -->

      I am guessing that this has something to do with the home page being ftpd outside of the /acatalog/ directory but know not of any way to fix it so this doesn't happen... Any one out there experienced this? Anyone got a fix?!!

      Thanks.
      Chris Adams

      Comment


      • #4
        Known issue, fix thanks to Norman here.
        Peblaco - SellerDeck partner
        Website design and development for SellerDeck and Actinic desktop

        SellerDeck services - SellerDeck website design - SellerDeck templates

        Comment

        Working...
        X