What seems to be the case why this code is not working.
The account is set to Universal Analytics.
The account is enabled for ecommerce.
The chrome extension for debugging analytics shows a lot of stuff is happening.
But days pass by and no tracking.
Here is the output:
(Note: Account and domain data is substituted for this public post.)
<!-- BOF: Google Analytics E-commerce Tracking -->
<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-00000000-0', 'my.domain.com');
ga('require', 'ecommerce', 'ecommerce.js');
ga('ecommerce:addTransaction', {
'id': '12345',
'affiliation': 'My Store',
'revenue': '200',
'shipping': '0',
'tax': '40',
'currencyCode': 'EUR'
});
ga('ecommerce:addItem', {
'id': '00001',
'name': 'Item 1',
'sku': 'V4C3D5R2Z6',
'category': 'stuff',
'price': '80',
'quantity': '2'
});
ga('ecommerce:send');
</script>
<!-- EOF: Google Analytics E-commerce Tracking -->
Further below on the page there is the standard pageview.
<!-- BOF: Universal Analytics -->
<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-00000000-0', 'my.domain.com');
ga('send', 'pageview');
</script>
<!-- EOF: Universal Analytics -->