The E-Commerce tracking does not seem to work properly with my web shop. When I come to the success page it does show in the code, that there is Analytics code, trying to send correct information. But it does not seem to reach the analytics account.
Anyone has any idea?
<!-- BEGIN GOOGLE UNIVERSAL ANALYTICS CODE -->
<script type="text/javascript">
//<![CDATA[
(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-REALCODEHERE-1', 'auto');
ga('send', 'pageview');
ga('require', 'ecommerce')
ga('ecommerce:addTransaction', {
'id': '100000399',
'affiliation': 'CompanyName',
'revenue': '1.0000',
'tax': '0.2000',
'shipping': '0.0000'
});
ga('ecommerce:addItem', {
'id': '100000399',
'sku': 'product-name',
'name': 'Product Name',
'category': '',
'price': '0.8000',
'quantity': '1.0000'
});
ga('ecommerce:send');
//]]>
</script>
<!-- END GOOGLE UNIVERSAL ANALYTICS CODE -->