0

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 -->
1

Did you insert the code snippet directly? The code are chasing your purchasing behavior but i guess you didn't set on GA page.

First of all, you should log in GA

And you have to enable Enhanced Ecommerce for Your Google Analytics View

a) Click Admin at the top of any Analytics page.

b) Select the view for which you want to enable Enhanced Ecommerce reporting.

c) In the View column, click Ecommerce Settings.

d)Under Step 2, Enhanced Ecommerce Settings, set the status to ON.

If it doesn't work, I recommend that you use the free extension 'Google Analytics Endhanced ecommerce' https://www.magentocommerce.com/magento-connect/google-analytics-enhanced-ecommerce-1.html

What if you use this extension, you MUST delete your own tracking code.

Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.