Announcement

Collapse
No announcement yet.

Google Analytics Script (BaseHref???) Problem

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

    Google Analytics Script (BaseHref???) Problem

    On the homepage of my site, Actinic adds in "acatalog/" to my google analytics script, which sadly breaks it. I think this may be something to do with the BaseHref tag perhaps, but I'm not sure how I can stop it inserting "acatalog/" into the script.

    The code appears correctly on all the other pages which are in the acatalog folder as below:

    Code:
    <script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    and appears like this on the homepage:

    Code:
    <script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "acatalog/google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    Any ideas on solving this problem?

    Thanks in advance

    #2
    It's Actinic picking up that src= bit, assuming you've got a local filename and massaging the filename to point to acatalog.

    Try
    Code:
    document.write(unescape("%3Cscript s" + "rc='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Hi Norman, thanks for that idea, I can see why that should/would work, I've tried it but sadly it didn't work, the acatalog still gets inserted.

      Comment


        #4
        in the sort term, why not use the older urchin.js script - that works fine
        http://www.itwiz.co.uk

        http://www.AntiV.net - The Discount Antivirus Store

        Comment


          #5
          OK. It was the .js that was fooling Actinic. Try:

          Code:
          document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga" + "." + "js' type='text/javascript'%3E%3C/script%3E"));</script>
          I tested this here and it worked fine.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Thanks Norman, that's worked

            Comment

            Working...
            X