Fixing Duplicate Transactions in Google Analytics (Magento)

Magento is the fastest growing eCommerce platform on the web right now, but the built-in Magento analytics aren’t as extensive as we would like them to be.

I’ve been working on a clients site recently that is using the Magento platform, and they were having a huge problem with his analytics data, it seemed to be that the transaction was being recorded twice in Google Analytics per unique purchase.

This is very bad, why? Google Analytics relies solely on transactions (purchases) to provide other data. This other data includes revenue and when this isn’t being recorded accurately or correctly, it puts a spin on things from a business and an SEO perspective.

If you’re coming across these errors, then it could solely be server-side and your theme/template conflicting your Google Analytics set up. But hey, I haven’t seen how you’ve set it up but below is the quickest and easiest fix, that worked for me.

Fixing Duplicate Transactions

The reason you’re probably getting duplicate transactions is that you’ve most likely installed 2 tracking codes on your website, whether one be standard tracking and the other Universal Analytics, or both of them are Universal – still, it’s going to be firing and tracking it twice, causing the duplicate.

So in order to resolve and fix this issue, follow the tutorial below…

Firstly, log in to your Magento admin dashboard and hover over ‘System’ to reveal the drop down. Now select ‘Configuration’. We’ll now be in the System Configuration area where we can edit the core Magento settings.

Magento sales section in system configuration

Scroll down the left sidebar to find the Sales section, and click on Google API. The Google API is already built into Magento, so no need to worry if you think you haven’t got this.

Disabling Google Analytics tracking in Magento via Google API

Here, we’re looking to see if it’s enabled – if it is, disable it!

Note: Do not disable this if you don’t have a 2 transaction codes on your website, otherwise you’ll remove all tracking from your website.

Other fixes

Obviously, this may not work for you. It all depends on your tracking setup. This client of mine was using a Google Tag Manager plugin that also had Google Analytics tracking code attached, so it was conflicting.

If the above fix didn’t work for you, here are some other tutorials from experts to help you fix this issue:

  1. https://www.lunametrics.com/blog/2014/07/07/duplicate-transactions/
  2. https://www.simoahava.com/gtm-tips/prevent-repeat-transactions/

I hope this post helped you fix your duplicate transaction data in Google Analytics. If not, leave your website below and I’d be happy to take a look at it and coming up with the best way to fix.