Announcement

Collapse
No announcement yet.

Google Analytics Error Message

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

    Google Analytics Error Message

    Hi

    I wonder if anyone can help. I've been using Google Analytics successfully with Actinic Business 9.00 for a few months now. Today I updated to Actinic Business 9.05 and it's starting bringing up an error message on the homepage, relating to Analytics.

    This is the error message:

    Message: '_gat' is undefined
    Line: 16
    Char: 1
    Code: 0
    URI: http://www.buybrandtools.com/

    It relates to this piece of Google Analytics tracking 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">
    var pageTracker = _gat._getTracker("<actinic:variablename="GoogleAnalyticsNumber" />");
    pageTracker._initData();
    pageTracker._trackPageview(<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Receipt%22">"/receipt.html"</actinic:block>);
    </script>

    The error message only occurs on the home page even though the tracking code appears on every page on the site.

    Can anyone help??

    Many Thanks

    Jon

    #2
    Have you searched the forum, I am sure it has come up before

    '_gat' is undefined

    would be a good search term

    Comment


      #3
      Many thanks for that - it works a treat! Cheers. Jon

      Comment


        #4
        Homepage error persists

        Hi

        I followed the recommendations and used the code from the knowledge base (http://community.actinic.com/showthread.php?t=44926).

        It works fine on all pages apart from the homepage. It fails to load the script from the homepage because acatalog/ is added before google-analytics.com/ga.js (highlighted below) when the site is generated. This means that the script cannot be found.

        Does anyone have any suggestions as to how I can stop Actinic adding the /acatalog to the script location on the homepage when the site generates? The script is called from the Design Wizard Outer Layout so appears on all pages.

        Thanks

        Jon

        <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">
        if (typeof(_gat) == 'object')
        {
        var pageTracker = _gat._getTracker("UA-1704098-1");
        pageTracker._initData();
        pageTracker._trackPageview();
        }
        </script>

        Comment


          #5
          See post here.
          Peblaco

          Comment


            #6
            Thanks again! That seems to have worked

            Comment

            Working...
            X