How to Detect and Fix Duplicate Transactions in Google Analytics

Google Analytics Duplicate Transactions

Enhanced Ecommerce is one of the most powerful and flexible features of Google Analytics. Its flexibility, though, leaves a lot of room for errors in the setup.

In this article, we are covering everything you need to know about the problem of duplicate transactions, a root cause of skewed data in many Google Analytics instances.

Detecting Duplicate Transactions

Duplicate transactions in Google Analytics means simply that a single transaction was counted more than once. This can dramatically skew your data because along with the transaction count, this also inflates the revenue, quantity and other metrics directly related to transactions.

To check if your Google Analytics E-commerce setup is affected by duplicate transactions, let’s start by creating a custom report (Customisation –> Custom Reports –> New Custom Report) with the following settings.

Metrics: Transactions

Dimensions: Transaction ID

Google Analytics Custom Report for Duplicate Transactions
Google Analytics Custom Report for Duplicate Transactions

Hit “Save” and you should see your Duplicate Transactions custom report right away.

Firstly, choose a time frame. I’d recommend starting with 30, 60 or 90 days depending on how many transactions your site generates and how often your analytics setup changes.

Secondly, sort your table by most Transactions first.

If every transaction ID shows only one transaction then congratulations, in the selected time frame there were no duplicate transactions.

Every number greater than one is a sign of duplicate transaction. Now, to get an overview of the magnitude of the problem, compare the number of transactions against the number of rows in the table. The latter is the actual count of unique transactions.

Google Analytics Duplicate Transactions
Google Analytics Duplicate Transactions

In the above screenshot, there are some duplicate transactions but considering the total amount of transactions, the problem is minor.

If your duplicate transaction ratio is >10% you have a serious problem with your e-commerce numbers and before fixing it, you should take your numbers with a grain of salt.

PS! We should be thankful that Google has kept Transaction ID available as a dimension in almost all reports instead of hiding them as they do with the Client ID, User ID, Session ID and other really useful dimensions (that you should track using custom dimensions).

Fixing Duplicate Transactions

By far the most common reason duplicate transactions are happening is that a transaction hit is sent to Google Analytics every time the “thank you” page is loaded. There are people who bookmark this page and go back to check the order id for tracking or whatnot. Also, some companies send the “thank-you” URL in the order confirmation email.

To fix this, there are two possible solutions.

Option 1

Make the event trigger based on something coming from the back end, something that only triggers when the actual transaction is happening. For example, after the user has entered their credit card information and pressed “Complete payment” and your system has validated the transaction. I.e. just before redirecting the user onto the “thank you” page.

Option 2

Make your “thank you” pages to load only once. If you keep your transaction hits on the “thank you” page, make sure a user can see and visit the page only once. Every subsequent attempt to access this page should redirect them to some other page. This could be an order overview page or something similar (should still be order-related and contain order details).

Now, to take it one step further, you can make your e-commerce tracking even more reliable by sending transaction hits straight from the back end using Measurement Protocol. This way you can make sure that no transaction goes untracked or that someone is sending fake transactions towards your Google Analytics instance.

Another option is to use localStorage to keep track of transaction IDs that have already been sent to Google Analytics. This method is described in detail by Simo Ahava in this blog post.

Final thoughts

Google Analytics is an excellent tool for keeping track of your e-commerce business. What you need to keep in mind, though, is that skewed numbers can do more harm than having no numbers at all.

This is why you should audit (or have someone else do it for you) your Google Analytics and Enhanced Ecommerce setups regularly and compare the numbers in GA against the numbers in your back end and accounting.

If you see that the numbers don’t add up, see if you have any duplicate transactions by creating a simple custom report seen in the beginning of this blog post.

Have any questions or thoughts about detecting and fixing duplicate transactions in Google Analytics? Post them in the comments below.


To make sure you have access to reliable data even after problems like duplicate transactions have skewed your data, we recommend sending all of your Google Analytics data into a data warehouse like BigQuery. This makes sure you can filter out duplicated data and reprocess your reports to be 100% accurate. One solution to achieve this is to use a Google Analytics Parallel Tracker from Reflective Data.

3 thoughts on “How to Detect and Fix Duplicate Transactions in Google Analytics

  1. I think it’s safe to say that around 50% of the Enhanced Ecommerce setups have at least some duplicate transactions. This is pretty much the same solution that we’ve been using for detecting them. Is there a good Google Data Studio dashboard/template that would simplify this process? Thanks

    1. Hello Sarah!

      I agree, most of the analytics setups we have checked/audited do have at least a few % of duplicate transactions in their reports.

      I don’t have a GDS template to share right now but setting one up should be fairly easy. For example, a table with the following parameters:

      – Metrics: Transactions
      – Dimensions: Transaction ID

      Any transaction ID that was counted more than once is a duplicate transaction.

Leave a Reply

Your email address will not be published. Required fields are marked *

Sign up for Reflective Data

5,000 sessions / month ×

Please enter your email


After submitting your email, we will send you the registration form.