2
votes

My new Google universal analytics code is giving me the error, in the analytics debugger add-on for chrome:

Initializing Google Analytics. analytics_debug.js:9

Registered new plugin: ga(provide, "linker", Function) analytics_debug.js:9

Registered new plugin: ga(provide, "displayfeatures", Function) analytics_debug.js:9

Running command: ga(create, UA--1, amleo.com) analytics_debug.js:9

Creating new tracker: t0 analytics_debug.js:9

New visitor. Generating new clientId analytics_debug.js:9

Running command: ga(send, pageview) analytics_debug.js:9

Storage not available. Aborting hit. analytics_debug.js:9

Executing Google Analytics commands. analytics_debug.js:9

Running command: ga(send, event, rfk, rfk_1, rfk_1,rg_1,rw_1,) analytics_debug.js:9

Storage not available. Aborting hit.

In the Google Analytics Tag Assistant chrome add-on, it says "Critical Error", the error reads:

Error: No HTTP response detected

My normal tracking code on all pages reads: (I minified the tracking snippet copied directly from google analytics admin)

<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-1-1', 'amleo.com');ga('send', 'pageview');</script>

My eCommerce tracking code reads:

<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA--1', 'amleo.com');ga('send', 'pageview');
//Include the ecommerce plugin
ga('require', 'ecommerce', 'ecommerce.js');
//Initialize the transaction
ga('ecommerce:addTransaction', {
    'id': 'WEBA001399736',// order ID - required      
    'affiliation': 'A.M. Leonard',// affiliation or store name      
    'revenue': '19.99',// total - required
    'shipping': '9.99',// shipping     
    'tax': '2.10',// tax
});

ga('ecommerce:addItem', {
    'id': 'WEBA001399736',// order ID - necessary to associate item with transaction      
    'name': 'Leonard+ArborRain+Tower+-+Plant+%26+Tree+Hydrator',// product name 
    'sku': 'ART20',// SKU/code - required     
    'category': '',// category or variation      
    'price': '19.99',// unit price - required      
    'quantity': '1'// quantity - required   
});

ga('ecommerce:send');//submits transaction to the analytics servers
</script>
2
Are you running this on localhost? Or on the production page at amleo.com ?Eduardo

2 Answers

2
votes

You can try to remove amleo.com from ga('create', 'UA-1-1', 'amleo.com');. Not specifying the domain name lets you choose the best domain to write the cookies on. So, your code should say: ga('create', 'UA-1-1');

0
votes

Use a cookieDomain of 'auto'. For more information, read this great article: http://www.simoahava.com/analytics/cross-domain-tracking-across-subdomains/