Announcement

Collapse
No announcement yet.

How can I stop the javascript error "_gat is undefined"?

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

    How can I stop the javascript error "_gat is undefined"?

    Try the following to get rid of this javascript error:

    * go to the 'Design' menu and select 'Library'
    * on the 'Layouts' tab, expand the 'Google Analytics Markup' group (click the '+')
    * double-click on the 'Google Analytics Order Transmission' layout to edit it
    * replace the contents of that layout with:

    HTML Code:
    <actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsGoogleAnalyticsEnabled%22%20%2f%3e%20%3d%3d%20true%29%20AND%20%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%20%3d%3d%20%22Receipt%22%29" >
    <script type="text/javascript">
    <!--
      var pageTracker = _gat._getTracker("<actinic:variable name="GoogleAnalyticsNumber" />");
      pageTracker._initData();
      pageTracker._trackPageview();
    
      eval(act_order);
      
      eval(act_item);
    
      pageTracker._trackTrans();
    //-->
    </script>
    </actinic:block>
    * click 'OK'
    * then double-click on the 'Google Analytics Tracking Code' layout and replace the contents with:

    HTML Code:
    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsGoogleAnalyticsEnabled%22%20%2f%3e%20%3d%3d%20true" >
    <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:variable name="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>
    </actinic:block>
    * click 'OK'
    * close the Library
    * update your site
Working...
X