Announcement

Collapse
No announcement yet.

Google Analytics Tracking Code on Homepage

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

    Google Analytics Tracking Code on Homepage

    Catalog v8.5.3

    I am not getting any stats for my home page: http://www.competitiveheatingsupplies.co.uk/index.html

    I have noticed a difference in the generated GA code on the homepage.

    There was a post to this exact problem but the link is not working. I managed to retrieve some info from the google cache but no resolution.

    I have highlighted in red. This part of the tracking code:
    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>
    is giving this on the live home page (The rest of the site is ok):
    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><script type="text/javascript">
    It only manifests on a live page and not in page preview. The person who raised this before had already asked GA help who said it was to do with this part of the code. But I cannot see how or why this is happening.

    For completeness the whole code for the homepage is:
    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> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-3373333-1"); pageTracker._trackPageview(); } catch(err) {}
    Regards,

    Keith

    Central Heating Supplies | Life Insurance Quotes | Be Modern Orlando Electric Fires | Grant Boilers | Honeywell Heating Controls | Worcester Bosch Oil Boilers | Oil Boilers

    #2
    I think the fix you need is in the KB, have a search for "_gat error".

    Comment


      #3
      Thanks for the reply Lee. I only found this fix which I think is for v9:
      "How can I stop the javascript error "_gat is undefined"?"

      I am not getting any error messages for my code.
      Regards,

      Keith

      Central Heating Supplies | Life Insurance Quotes | Be Modern Orlando Electric Fires | Grant Boilers | Honeywell Heating Controls | Worcester Bosch Oil Boilers | Oil Boilers

      Comment


        #4
        I'd be surprised if your browser is not reporting an error on this, you probably just haven't seen it (usually bottom left or right). If you are not experiencing the _gat error, then search on the error message you are seeing to see if anyone has had the same. _gat covers 99% of the GA errors we have seen on here, all others are either hosting or site specific problems in my experience.

        Maybe worth downloading the free 30 day trial of V9 and cpomparing the code, it did undergo some changes in V9 i think, so be a good idea to update anyway.

        Comment


          #5
          Thanks for the replies. I set up the code given by Norman in the other thread last night.

          I have been using a GA code checker from EpikOne

          It was telling me that there was one page, the home page, that did not have the code implemented and I think this was due to the js inserting the acatalog as mentioned above.

          I have just run the test again after inserting Normans code and it is telling me that all my pages do not have the code implemented.

          I will give it time to see if any stats appear. I'll report back later.

          P.S. There are other actinic sites out there where the acatalog has been inserted into the code on the homepage only. It would be interesting to know if they are getting any stats for that page.
          Regards,

          Keith

          Central Heating Supplies | Life Insurance Quotes | Be Modern Orlando Electric Fires | Grant Boilers | Honeywell Heating Controls | Worcester Bosch Oil Boilers | Oil Boilers

          Comment


            #6
            Hi I've replied to your email but just in case:

            You need to replace the code in the library layout code for google anaylitics tracking that looks like this
            google-analytics.com/ga.js
            with

            google-analytics.com/ga%2Ejs
            Norman posted it on a thread and it works perfectly.
            Donna

            Chief bunting supplier to Take That!

            Comment


              #7
              Thanks Donna,

              That appears to have worked. Now getting stats.

              For anyone else using this - don't use the EpikOne code checker as it will tell you that none of your pages have the code implemented correctly. I guess, and it is a guess, that it compares your code to the standard GA code and because of this change to get it to work in Actinic, it sees it as wrong?
              Regards,

              Keith

              Central Heating Supplies | Life Insurance Quotes | Be Modern Orlando Electric Fires | Grant Boilers | Honeywell Heating Controls | Worcester Bosch Oil Boilers | Oil Boilers

              Comment

              Working...
              X