GTM Tip: Prevent Duplicate Enhanced eCommerce Events

Follow this tip to prevent duplicate ecommerce data being sent to Google Analytics.

Brad Redding

Brad Redding is the Founder & CEO of Elevar. Specializing in analytics, tracking, GTM, and conversion optimization.

If you’re like me there are always surprises with Google Tag Manager – in good and bad ways!

Over the past few years I’ve seen so many ways where data collection is compromised which then leads to analysis and decisions being made on inaccurate data.

I know I’ve had my fair share of self-inflicted tracking issues. Sometimes the only way to learn is to fail!

This GTM tip shows how you can prevent sending duplicate enhanced eCommerce event hits to Google Analytics with a simple change in your Google Analytics variable setting.

The Problem

Let’s assume that you have a dataLayer implemented on your store (if you’re a customer of our GTM + DataLayer app for Shopify then you have a dataLayer formatted to Google’s standards).

Now let’s assume that you have event tracking configured in GTM for things like: tracking scroll depth, click events, etc.

The event tag might look something like this in GTM:


Take note of the Google Analytics Setting of {{ GA UA – 12345678-0 }}.

Now looking at the settings on this Google Analytics variable we see that enhanced ecommerce tracking is enabled by default:


This looks harmless – of course we want to send enhanced ecommerce data to GA when we can!

Unfortunately this isn’t the case.

When a dataLayer exists with properly formatted enhanced ecommerce data (like a product view), and another Google Analytics tag fires (like a scroll depth event), when this scroll depth event triggers then it will attached the enhanced ecommerce data to the scroll depth hit as well.

So the scroll depth event sends a product detail view event like this below (the arrow is pointing to the Google Analytics extension in Google Chrome):


If this product page had 4 unique scroll depth triggers (25,50,75,100%) and a user scrolls the entire way then this product page view would show 5 product detail views in Google Analytics.

The Solution

This is a simple fix.

At Elevar we recommend all Google Analytics variables have this “enabled enhanced ecommerce” setting disabled by default like this:


When you need to send enhanced ecommerce hits which consist of:

  • Impressions
  • Product views
  • Add to carts
  • Remove from carts
  • Checkouts
  • Purchases

Then enable the enhanced ecommerce data by overriding the Google Analytics settings on the individual events like this:


That’s it!

When you have your tags configured in this manner then you will prevent accidental enhanced ecommerce data like product views, add to carts, transactions, etc being sent to Google Analytics.

If you have any questions or issues – please leave them in the comments below!

Leave a Reply

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

You may also like