Fixing Duplicate, Cancelled, Test Orders & Refunds in Google Analytics

Maintaining the accuracy and consistency of your data esp. e-commerce data is a critical aspect of your analysis.

So how confident you are on the scale of 1 to 10 then that ecommerce data in your GA reports is accurate?

Imagine a scenario where large part of the website sales is made up of sales data from test orders or a scenario where you declared top 10 regions for directing your marketing efforts and budget on the basis of corrupted ecommerce data.

Now imagine where this flawed analysis will take you over time in terms of time spent, budget and resources allocation.

Skewed ecommerce data is more common than you may think.

I once discovered test orders worth $40k in one of the GA view.

This $40k figure mislead me in many ways for a while and made me think that something is working or is important when it wasn’t.

I want you to avoid being mislead by corrupted ecommerce data.

The number 1 way of avoiding being mislead is by making your shopping cart software your best friend.

If you do not have access to shopping cart of your client then get one.

Even ‘view only’ access will work just fine.

But get that access and periodically match the sales data between your Google Analytics account and Shopping Cart account.

Data Discrepancy between Google Analytics and Shopping Cart Sales Data

Google Analytics and shopping cart sales data generally do not match.

There can be lot of reasons for that.

But one of the main reason is, that Shopping carts (like shopify) handles sales data (cancelled orders, unfulfilled orders, test orders, promotions and refund) much better than Google Analytics.

To learn more about the discrepancies between Google Analytics and Shopping cart sales data, read this article: Why Google Analytics and Shopping Cart Sales data don’t match and how to fix it.

Get the E-Book (37 Pages)

Learn to read e-commerce reports book banner

Get the E-Book (104 Pages)

Fixing Duplicate Orders in Google Analytics

Duplicate orders/transactions can take place when the order confirmation page (receipt page) can be loaded more than once by the same user without placing any new order.

With each new page load, the ecommerce data is resent to GA server.
Within a session, Google Analytics will filter out duplicate transactions. But if a user comes back later in a different session and revisit the order confirmation page then the transaction data could be sent again to the GA server thus creating duplicate order.

These duplicate transactions will then show up in your report and inflate your sales data. So you need to ask your developer to:

#1 Make sure a user can not access the order confirmation page more than once without placing a new order.

#2 Make sure a user can not refresh the order confirmation page. If this is not possible then make sure the ecommerce tracking code is not executed on a reload/refresh.

#3 If you maintain the exact same code on your staging website, there is a possibility that test orders are inflating your sales data. In order to make sure that this doesn’t happen, the ecommerce tracking code should not fire on the staging website.

So if someone visit the order confirmation page on the staging website or place a test order, no ecommerce data should go to the Google Analytics server. This can only be done by stopping the ecommerce tracking code from being executed in the first place.

Here is how you can find duplicate transactions in Google Analytics:

Step-1: Download this custom report in your GA view and then select your reporting view:

Step-2: Set time period of the custom report to the last one month and then look at the transactions column.

They should all be 1.

If you find any value greater than 1, then you have got duplicate transactions issue:

Step-3: Check this report at least once a week, to make sure that no duplicate orders have been placed on the website.

Fixing Cancelled and Test Orders in Google Analytics

You can fix cancelled and test orders in Google Analytics by reversing ecommerce transactions. To learn more about such reversal, read the followings articles:

#1 How to reverse an ecommerce transaction in Google Analytics.

#2 How to remove / modify Google Analytics ecommerce transaction in one click

Dealing with Refunds in Google Analytics

If your business, issue lot of refunds, then you need to adjust your sales data accordingly, in Google Analytics, to reflect the refunded sales amount in your ecommerce reports.

There are couple of methods to do that.

One is by making changes to your ecommerce tracking code as explained in great detail, in the article: How to reverse an ecommerce transaction in Google Analytics 

The other method is to use the ‘Refund Data Import‘ feature which is explained in great detail in the article: Dealing with refunds in Google Analytics

Other Articles on Enhanced Ecommerce Tracking

#1 Understanding Enhanced Ecommerce tracking in Universal Analytics

#2 Implementing Enhanced Ecommerce tracking in Universal Analytics – Nerd Guide

#3 Using Cohort Analysis & Enhanced ecommerce to understand users behavior

#4 Using Enhanced E-Commerce segments for Remarketing in Google Analytics

#5 Enhanced Ecommerce Tracking via Google Tag Manager

Learn about the Google Analytics Usage Trends Tool

The Google Analytics usage trend is a new tool which is used to visualise trends in your Google Analytics data and to perform trend analysis.

Do you want to Learn Web Analytics in 8 Weeks?

  • Learn and Master Web Analytics, Conversion Optimization & Google Analytics from Industry Expert in 8 weeks.
  • Lifetime access to the course + Lifelong FREE course updates.
  • New study material added every few months (lifelong learning).
  • Up to date training material.
  • Most exhaustive course on Google Analytics on the internet.
  • Hundreds of Assessments to test your learning.
  • Your 24/7, 365 days a year reference source.
  • Learn at your own pace and from any place.

Take your Analytics knowledge to the next level. Checkout my Best Selling Books on Amazon

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and Beyond
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Himanshu Sharma

Certified web analyst and founder of

My name is Himanshu Sharma and I help businesses find and fix their Google Analytics and conversion issues. If you have any questions or comments please contact me.

  • Over eleven years' experience in SEO, PPC and web analytics
  • Google Analytics certified
  • Google AdWords certified
  • Nominated for Digital Analytics Association Award for Excellence
  • Bachelors degree in Internet Science
  • Founder of and

I am also the author of three books:

error: Alert: Content is protected !!