Why Data Quality in E-commerce is So Very Important

Damien Smith - Thursday, July, 06, 2017

Nothing causes senior management or a business owner to distrust the numbers faster than errors in the data. Once that trust is gone it’s very difficult to win back.

Whilst it is important that any user of Google Analytics Enhanced E-commerce understands that the transactions that are recorded will not match your accounting system exactly, they should be very close. Typically we aim for an error rate of less that 5% but have seen differences up to 10% on a healthy website with no tracking issues.

Some of the key errors that might be influencing your data are listed below:

Missing Transactions

Whilst a small amount of missing transactions is virtually unavoidable sometimes errors can creep in.

Common issues that cause this are:

  • Unexpected characters in the JavaScript code. E.g. the $ or , characters appearing in the price field or quotation characters in the product description.
  • Incomplete data being sent to Google Analytics. The user exiting the browser if the confirmation page takes too long to load is a common cause.
  • The customer is not always sent to the confirmation page that sends the data to Google Analytics. Paypal and other external payment gateways can sometimes cause this if the customer doesn’t fully complete the process and return to the thank you page.

Too Many Transactions

If you see that the total count of transactions is higher than expected it is likely that some customers can reload the confirmation page that sends the data to Google Analytics and cause that transaction to be double counted.

This can happen if you send a confirmation email to the customer that encourages to return to their order details and your system reloads the Google Analytics code when the user visits that page. It can also happen if the customer reloads their confirmation page.

The solution to this is to only send the data to Google Analytics the first time. This may require modifications to your shopping cart as many will allow for the full transaction details to be reloaded when the confirmation page is refreshed.

To check if your data includes any duplicate transactions, click on the link below to view a custom Google Analytics report and select your normal Google Analytics view when prompted. The number of transactions per transaction ID should only be “1”.

Duplicate Transaction Report

Not Tracking Refunds

Whilst it is a little harder to implement if your store receives a large number of refunds this can significantly bias the data. Google Analytics can reverse transactions by sending a refund event. Removing these sales is important to ensure that you accurately measure the results of your marketing campaigns.

Incorrect Sales Attribution

This is the number one issue that we are brought in to solve time and time again.

There are two main causes of this:

Domain Issues

The first occurs when your payment gateway is on a different domain and the final confirmation page is on that domain. The symptom that you will see is that all sales are attributed to that domain. The reason for this is that the customer’s is tracked as a different user on the payment gateway site.

The solution to this is to implement cross domain tracking so that the user can be tracked consistently across both domains.

Tip: Use Google Tag Manager. It makes solving this problem much, much easier than doing this using straight Google Analytics code.

Referrer Issues

The second occurs when the customer is taken to a different payment gateway and then is redirected back to your own store to see the confirmation page. In this case you might see your own site, Paypal or some other payment gateway as the source of the sales from your site.

The solution to this is to add all of your sites and the payment gateway domains to the list of ignored referrers in your Google Analytics settings.

There are many other ways in which you can receive unexpected data. If you need help in solving these please contact us for support.

Getting Started with Enhanced E-commerce

Damien Smith -

Google Analytics Enhanced E-commerce requires additional JavaScript code to be added to your website to collect the data it needs for its reports.

It is strongly recommended that you use the Google Tag Manager service wherever possible to implement Google Analytics. There are many reasons for this but the main one is that it makes updating or adding features to tracking your website easier and reduces your reliance on a web developer to make changes to your website.

If for some reason you are unable to implement the Google Tag Manager service you can directly add the necessary JavaScript code to your website.

IMPORTANT: Google Analytics Enhanced E-commerce requires that you are using the Universal Analytics version of the tracking code. If you are using an earlier version then you will need to upgrade this to the Universal Analytics version before proceeding with the remaining steps in this article.

Step 1: Turn on Enhanced E-commerce in your Google Analytics Settings

Step 2: Setup the variables or data layer

Step 3: Connect the Google Analytics code

Step 4: Test and test again

Step 1: Turn on Enhanced E-commerce Settings

Login to Google Analytics.

Go to the view that you want to configure.

Click on the Admin icon at the bottom left hand side of the screen.

Click on the E-commerce Settings icon

Turn on the Enable E-Commerce status

Click Next step button to configure the Enhanced E-commerce settings.

Change the Enable Enhanced E-commerce Reporting toggle to On

Under Funnel Steps, add labels which match each step in your checkout process.

Note: Tracking checkout steps requires that you send this data to Google Analytics using JavaScript code. Changing these settings won’t automatically record this for you.

Click on the Submit button to save these changes.

Step 2: E-commerce Variables / Data Layer

This is the hardest step for most people. Getting the data that you need from the web page to populate the Google Analytics reports can be tricky.

The full details on what you need to track can be found at:

Google Tag Manager:

Universal Analytics:

Rather than recreate this documentation here, you can send this to your web developer for them to implement.

If it is not possible to implement all of the features on your shopping cart platform then you might want to consider implementing some of the more important features only. From our experience these are:

  • Transactions
  • Checkout Steps
  • Product detail views
  • Add to cart events
  • Internal promotions
All pagesInternal promotionsThis feature allows you to track the effectiveness of your promotions within the website. For instance a home page hero image that is used to direct customers to selected products will be tracked using this feature.

Wherever you show a promotion on the site you can record an impression and a click.

Content groupWhilst not part of enhanced e-commerce content groups give you a powerful way of assessing the value of your SEO activities.

Product category pagesProduct list trackingProduct list tracking shows you how many times a product was displayed in a category or list and the number of times it was clicked. This is one of the more difficult features to implement but can provide a lot of value for the analyst if it is implemented.




Add to cartIf your online store allows your customers to add products to their shopping cart from a product list then you can track this using Google Analytics.


Product detail pagesProduct detail viewsWhen the customer views a product details page on your website recording that view in Google Analytics provides the basis for measuring the effectiveness of that product in generating sales. If a product is frequently viewed but not frequently purchased then this may indicate that you need to change that product.

Add to cartAdding the product to the shopping cart is a key measure of the potential sales for that product.


View cartCheckout stepMeasuring whether the user proceeds from the view cart stage to start checkout is a recommended measure for your website. By adding a checkout step at this stage you can create audience remarketing lists that you can use to bring customers with abandoned carts back to your website.


Remove from cartThis feature allows you to track whether a user has removed an item from their shopping cart. If some items are frequently removed from the shopping cart this may indicate issues with shipping costs or other aspects of that product.

Add to cartWhen the user increases the quantity of an item within the shopping cart you can use the add to cart event to record this.

Note that Google Analytics doesn't currently have an adjust cart event and implementing this feature may bias your add to cart reporting. Our recommendation is to use the Google Analytics event tracking to record this rather than using the add to cart event.

CheckoutCheckout step/sTracking the customers' progress through the checkout process can provide valuable information on whether your checkout is working at peak efficiency.

As a number of shopping carts use a one page checkout this can require custom implementation to match your set up. Also some shopping carts that use a 3rd party system may not be able to track all steps. One example of this is the popular Shopify service.


Transaction detailsNaturally this is the most important feature that you must implement to get the value of the Google Analytics e-commerce reporting.

This feature allows you to record what sold, the amount, shipping, tax and the details of the products sold.


CurrencyGoogle Analytics supports using multiple currencies. This allows you to see which currencies customers are using to purchase from your store.

For Google Tag Manager you need to include the dataLayer variable 'currencyCode' which should be included in all transactions.


Custom product attributesWhen you record a transaction you can also extend Google Analytics' product fields to include custom dimensions and metrics. For instance if you are selling clothing you can include the product style, size and colour as 3 additional dimensions. You can also include custom metrics such as the cost of the product (though be warned if you use this you might be disclosing your profits).

AdministrationRefundsIf a user returns a product then you can record a refund event to cancel out that transaction in Google Analytics.


Step 3: Connect the Google Analytics Code

If you are using Google Tag Manager (and we recommend that you do), you must set up the variables, triggers and tags for any of the features you’re implementing.

The tags are the JavaScript code which runs in the visitor’s browser to query the data layer and send the data across to Google Analytics.

The configuration specifics for Google Tag Manager can be found with the details of each feature here: https://developers.google.com/tag-manager/enhanced-ecommerce

Step 4: Test and Test Again

Testing that each of the enhanced e-commerce features is functioning is imperative to ensure the data in Google Analytics is reliable.

There are a number of methods for conducting the tests:

1. Google Tag Manager’s Preview Function

Google Tag Manager has the ability to show all tags which have (and have not) fired on each page.

As an example, see the testing section for our Tag Manager Plus Magento Extension:


2. DataSlayer

DataSlayer is a Chrome extension which shows tag activity and data layer details. This is only useful for a Google Tag Manager implementation.

Download DataSlayer here.

3. GA Debug

This is another Chrome extension which shows all data being transmitted from to Google Analytics. The format of the data isn’t as easy to read as DataSlayer, but it can be used with analytics.js tagging or Google Tag Manager.

Download GA Debug here.

4. Google Analytics Realtime Reports

While the above 3 methods show data which is being sent to Google Analytics, the Realtime Reports will confirm the data is arriving as expected.

Specifically, look at Realtime > Events to confirm that all events which are triggered on the website are appearing in Google Analytics.

google analytics realtime report

If you would like to find out more, or require assistance with implementation documentation for your developers, contact us to discuss your requirements.

Why Every Retailer Should Use Google Analytics Enhanced E-commerce

Damien Smith -

If you are serious about growing your online business then you need good information to help you make decisions about where to invest your energy and resources. Google Analytics is one valuable source of this information.

Google Analytics has two different sets of e-commerce reports. The standard reports which only provide basic e-commerce information and enhanced e-commerce which provides a richer set of data. It takes more work to set up the enhanced e-commerce reports but the results are worth it.

The enhanced e-commerce reports provide a much richer and detailed source of data that helps you to understand more about:

  • Which products are being viewed, added to cart and sold,
  • The results of your efforts to promote these products on your own website using promotional tiles and other offers,
  • Coupon code redemptions and
  • The effectiveness of your checkout process.

The key differences at a glance:

 Standard E-commerceEnhanced E-commerce
Transactions & revenue trackingYY
Products/SKUs soldYY
Product attributes (brand, colour, etc)NY
Product categoriesBasicDetailed
Days and sessions to purchaseYY
Transaction refundsNY
Product viewsNY
Product add to / remove from cart eventsNY
Track checkout stepsY (Using goal funnels)Y
Create audience remarketing lists for abandoned cartsNY
Checkout optionsNY
Track on-site promotional tiles and offersNY
Track coupon code redemptionNY
Affiliate trackingNY

Next: Read Getting Started with Google Analytics Enhanced E-commerce or contact us for a quote.


The problem with prediction, in particular presidential prediction

Rod Jacka - Thursday, November, 10, 2016

I really like the word phantasmagorical but I rarely have a chance to use it.

It’s by no means a common word – so a simple definition might be useful:

‘a confusing or strange scene that is like a dream because it is always changing in an odd way’
Mirram-Webster Online Dictionary

Now with that in context, it’s fair to say that Donald Trump’s election has surprised more than a few, and that the use of the word phantasmagorical is highly justified. From many a perspective, it was inconceivable that someone with his rhetoric or political inexperience would be elected leader of the USA.

From the start, Nate Silver’s FiveThirtyEight website has provided great insight. It’s had a solid history of good predictions and is seen as a reliable source of information, condensing large numbers of variables into a predictive state. During the election I also chose to revisit Nassim Taleb’s book Antifragile as a companion to FiveThirtyEight. Ever since reading his first two books, Fooled By Randomness and The Black Swan several years ago I have been fascinated with statistics, volatility and randomness in general.

A key message I took from Taleb’s books was that prediction of rare events is not possible. The world is a chaotic and complex system with many variables where interactions lead to unexpected and unpredictable outcomes. Whilst we can measure many things using solid historical data, it is the unseen variables and their even greater unknown interaction (both seen and unseen) that can quickly send predictions through the floor…..as we saw.

As a long term practitioner of analysis using statistical tools and approaches I have long come to respect that models are just models – they are not the world itself. In the oft quoted words of George P. Box and Norman R. Draper (1987) “Essentially, all models are wrong, but some are useful”. Equally I have come to understand that to correctly use statistical tools you absolutely must deeply understand how they work and what their limitations are. (Like whether the media is involved?)… side thought.

There are many cases where forecasts and predictions based on data and analytics has worked, but we must always be mindful when using these tools that we are making predictions based on past observations. There have been 58 presidential elections in the entire history of the USA. As such, any model trained on predicting an event which only occurs every 4 years with 58 outcomes across 227 years is likely to get it wildly wrong from time to time. To give an analogy, all swans are white until you see a black one.

What I think we have seen with the US election results, and Brexit too, are black swan events.  They’re emerging from many factors which are leading towards some large changes in the future. It seems very likely to me that the forecasts which were being made during the election campaign were inaccurate simply because nothing like this had been observed before.


http://www.dailywire.com/news/10660/just-how-wrong-were-pollsters-final-polls-vs-final-james-barrett#Statistics and predictive analytics are great tools, but I also strongly encourage you to examine and understand the work of Nassim Taleb, Daniel Kahneman, Amos Tversky, Philip Tetlock and many others who work in the areas of of understanding human behaviour, the limitations of our minds and complexity science.They may not help you to predict your outcomes, but adding their approaches to your toolkit of techniques will help you to better understand the world, appreciate the limitations of data and analytics, and make you a much better marketer and analyst.