Why Google Analytics and Shopping Cart Sales data don’t match and how to fix it.

If your Google Analytics sales data does not match with your shopping cart sales data then it is not just you who face such problem.

It is a very common issue, faced by many online retailers.

Unfortunately this issue can be minimised but in certain cases, can not be 100% fixed.

Following are the common reasons for your GA sales data, not matching with your shopping cart data:

#1 Shopping cart handles sales data much better than Google Analytics

Almost all popular shopping carts (like Shopify), provide a mechanism to handle:

  • cancelled orders
  • unfulfilled orders
  • test orders
  • promotions (promo codes, discounts) and
  • refund (partial or full).

They then adjust the sales data accordingly to reflect the changes.

This is not the case with Google Analytics.

This is the main reason, why your GA sales data, does not match with your shopping cart sales data.

Once a user is served an order confirmation page, a transaction and corresponding sales is recorded by GA.

If the user later cancel the order, demand for refund or the order is not fulfilled for some reason (may be credit card was declined) then these changes do not automatically reflect back in GA ecommerce reports.

Similarly, it is common for web developers to place test orders on websites, while testing an application/ functionality.

While many developers, eventually delete the test orders from Shopping cart, they are still recorded and reported by GA.

Test orders can greatly inflate your revenue metrics and skew the entire ecommerce data.

So before you trust your sales data, it is very important that you identify and deduct test orders from your analysis.

I once detected test orders worth $40k.

Usually when you see unexpected sales from a region or traffic source, you should make sure, that it is not the sales generated via test orders.

Get the E-book (52 Pages)

Get the E-Book (37 Pages)


Note: You can fix test/cancelled order by reversing it in GA.

Read this article, for more details:  How to reverse an ecommerce transaction in Google Analytics and this one How to remove / modify Google Analytics ecommerce transaction in one click

Tip: Ask your developer to regularly provide a list of all the test transactions (order IDs) placed on the website.

According to my experience up to 10% data discrepancy between GA and shopping cart sales data is normal.

Anything above 15% is a cause for concern.

#2 Incorrect ecommerce tracking code on the order confirmation page

If your ecommerce tracking is not set up correctly on the order confirmation page then it may not send accurate data or all of ecommerce data to GA.

Since shopping cart softwares do not use ecommerce tracking, for collecting sales data, they won’t be negatively affected, if the ecommerce tracking in your Google Analytics is not working correctly.

They can continue to report accurate sales data.

So incorrect ecommerce tracking set up, can create discrepancy between GA and shopping cart sales data.

Tip: Test your ecommerce implementation at least once a month and make sure everything is working, the way it should.

Then compare your GA ecommerce data with your shopping cart sales data, to find the level of data discrepancy.

ecommerce tracking code

Example of Ecommerce Tracking Code

Following are the most common reason of incorrect ecommerce tracking code:

#2.1 Currency symbol or comma in numeric fields – make sure that numeric fields (like ‘revenue’, ‘shipping’, ‘tax’) in your ecommerce tracking code, do not contain currency symbol (like $ or £) or comma. This is because JavaScript have issues, parsing a number, which contains a comma.

#2.2 Quotes – make sure that you use straight quotes to separate each item in an ecommerce object. Following is an example of ecommerce object:

‘id’: ‘123’, // Transaction ID. Required.
‘affiliation’: ‘skinny jeans’, // store name.
‘revenue’: ‘88.8’, // total revenue.
‘shipping’: ‘15.00’, // Shipping.
‘tax’: ‘10.89’ // Tax.

The use of curly quotes often results in JavaScript errors.

#3 You are not sending all of the ecommerce data to Google Analytics

The level of data discrepancy between GA sales data and shopping cart sales data will be higher, if you are not sending all of the ecommerce data to Google Analytics.

The ecommerce tracking code in Google Analytics is made up of many fields.

Example of such fields are: ‘id’, ‘affiliation’, ‘revenue’ etc.

Some of these fields are required to be used, in the ecommerce tracking code.

While others are optional.

For example, using ‘id’ field, in ecommerce tracking code is required by Google.

Whereas, using ‘tax’ field in the ecommerce tracking code is optional.

However, whether a particular field is required or optional, you make sure, that no field is omitted from your ecommerce tracking code.

When you choose, not to use, certain optional fields, in your ecommerce tracking code, you are not sending all of the ecommerce data to Google Analytics.

This can result in say ‘shipping cost’ not being tracked in GA, as ‘shipping’ field was omitted in the ecommerce tracking code.

Now in GA, revenue is calculated as:

Total Revenue = Total Product Revenue + Total Tax + Total Shipping 

When you choose, not to pass shipping cost to GA, then it is not taken into account while computing the revenue metrics.

Similarly, if you choose, not to pass tax amount to GA, then it is not taken into account while computing the revenue metrics.

The more optional fields, you will omit, in the ecommerce tracking code, the more data discrepancy you may see between GA and shopping cart sales data.

So use all optional fields and send all of the ecommerce data to GA.

#4 You are still using standard ecommerce tracking instead of enhanced ecommerce tracking

Enhanced ecommerce tracking provides many more ways, to collect ecommerce data than standard ecommerce tracking.

This reduces discrepancy between GA and shopping cart sales data.

The more ecommerce data we can track in Google Analytics, the better, we can compare it, with the shopping cart sales data.

This is because your shopping cart software provides, complete sales data.

If you have installed standard ecommerce tracking, then you will get only 5 ecommerce reports in your Google Analytics view.

But if you have installed enhanced ecommerce tracking on your website, then you get 10 ecommerce reports in your Google Analytics view:

ecommerce enhanced ecommerce

Not only, Enhanced ecommerce tracking provides twice as many reports as standard ecommerce but many more ecommerce metrics.

Despite of several benefits of enhanced ecommerce tracking, many retailer still use standard ecommerce tracking on their website and they are the one who face most data discrepancy issues, as they are not collecting all of the ecommerce data in GA.

#5 Your Google Analytics property has got data sampling issues

data sampling warning2

Data sampling issues in Google Analytics, can easily skew your analytics data.

If your GA property has got data sampling issues, then the reported data could be 10 to 80% off the mark.

For example, GA may report that your website sales in the last one month was $750k when it was actually over $1 million.

You can use three methods to fix data sampling issues:

#1 Use query partitioning. In query partitioning, a user’s query is broken into multiple queries in such a way that each individual query does not trigger data sampling. You can do query partitioning manually or programatically by using a tool like ‘Analytics Canvas’.

#2 Use open source analytics tool called ‘Matomo (piwik). It provides unsampled data.

#3 Use Google Analytics Premium. However, it will cost you $150k per year.

#4 Avoid applying advanced segments or secondary dimension to your GA reports when comparing GA and shopping cart sales data. Advanced segments are known to create data sampling issues.

#6 Your Google Analytics tracking code does not always fire

Sometimes your Google Analytics tracking code is not fired/executed because a user has disabled JavaScript or is using a software/ browser plugin, which does not let Google Analytics execute the tracking code.

In such case GA will not record sales data but your shopping cart can still record sales data.

Sometimes your Google Analytics tracking code is not executed because of some server side issue.

In such case also, GA will not record sales data but your shopping cart can still record sales data.

A typical ecommerce website updates all the time and ecommerce tracking can break any day, any time, without any prior notice.

That is why I suggested to assess the quality of your ecommerce data at least one a month, by comparing it with your shopping cart sales data.

#7 You are comparing apples to oranges

If you are going to compare sales data between GA and shopping cart, then make sure that your data is at least comparable.

Use unfiltered GA view for the start. Otherwise your comparison could be impractical.

For example if your GA view filter is excluding all traffic from mobile devices then the mobile sales data won’t be reported in the view.

So when you compare this sales data with your shopping cart, it won’t match.

So look at your sales data in an unfiltered view.

Use same data range for both GA and shopping cart, before you start the comparison.

When you look at the analytics data for long data ranges (6 months or more), you could be comparing apples to oranges.

This is because so much would have changed during that time frame, from website size, to your analytics setup.

May be 6 months ago, you do not have ecommerce tracking installed or may be you started correctly tracking ecommerce data only a month ago.

If that is the case, then 1 year worth of sales data from GA won’t match with your shopping cart sales data.

We often forget changes made to Google Analytics account, new analytics set up, while doing data comparison.

All of such changes, can easily create data discrepancy issues.

#8 Data temporarily out of sync

It is common for GA and shopping cart sales data to be temporarily out of sync.

This is because they both track sales data using different methods and at slightly different times.

If both GA and your shopping cart are configured to report data in different time zones then the data would be temporarily out of sync.

So make sure that both your GA and shopping cart are configured to report data in same time zone and you compare the data from two sources, at least after 24 hours have elapsed.

So for example, you don’t compare yesterday’s data, today because GA/shopping cart may still be collecting the sales data, for that day.

#9 Currency conversion issues

Both GA and your shopping cart can handle currency conversions differently.

So if your website support multiple currency during checkout this could create data discrepancy issues between GA and your shopping cart.

#10 Cross domain tracking issues

If you have not set up cross domain tracking or the tracking has not been set up correctly, then Google Analytics may not report all of the sales data.

But shopping cart can still report all of the sales data.

So cross domain tracking issues can an easily skew your ecommerce reporting in GA and thus resulting in data mismatch, between GA and shopping cart.

#11 Your shopping cart does not fully support Google Analytics

There are many shopping carts (usually old custom made) which still do not fully support Google Analytics.

Because of this lack of proper support/integration, they are unable to send all of the ecommerce data to Google Analytics.

This can create discrepancy between your GA and shopping cart sales data.

So make sure you either update your shopping cart or use popular shopping cart service providers like shopify.

#12 Google Analytics is not an accounting software

Last but not least, Google Analytics was never designed to act as an accounting software.

So we can’t expect 100% accuracy in sales data from it.

Also, it is highly unlikely that the GA sales data will exactly match with your shopping cart/accounting software data, if your website receives lot of cancellations, refunds and unfulfilled orders on daily/weekly/monthly basis and/or you provide promo codes, discounts etc.

Whenever there is a trade off between GA and shopping cart sales data, trust the shopping cart data.

This is because the probability of your shopping cart data to be less accurate is far less than that of the GA. Use GA sales data as a guide only.

Most Popular E-Books from OptimizeSmart

Learn to read e-commerce reports book banner

How to learn and master Web Analytics and Google Analytics?

Take the Course

Check out my best selling books on Web Analytics and Conversion Optimization on Amazon

How to get lot more useful information?

I share lot more useful information on Web Analytics and Google Analytics on LinkedIn then I can via any other medium. So there is really an incentive for you, to follow me there.

Himanshu Sharma

Certified web analyst and founder of OptimizeSmart.com

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 twelve 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 OptimizeSmart.com and EventEducation.com

I am also the author of four books:

error: Alert: Content is protected !!