How to setup Enhanced Ecommerce tracking?

This article is for users of my Google Tag Manager for WordPress plugin v1.11 or newer. If you are using an older version of my plugin, please consider to upgrade.

Enhanced Ecommerce for Google Analytics is the next generation of e-commerce tracking with lots of new features. If you are new to this please read the introduction article of the Google help first.

Step 0: pre-setup checks

Before you get started please review the following checklist to ensure everything is setup properly on your side:

Please note that you can not use both standard/classic ecommerce and enhanced ecommerce in your Analytics views. You can activate both tracking code in GTM4WP options to make sure you can use both tracking codes if you are using multiple Google Analytics tracking IDs on your site.

For a specific Google Analytics tracking ID, you should only use either standard OR enhanced ecommerce. The recommended tracking code is the enhanced version.

Enabling Enhanced Ecommerce preserves you existing ecommerce data in your Analytics views. Transactions and product data collected using the standard ecommerce tracking will be available in your new reports as well.

Please note that since WooCommerce does not have any internal banner system by default, this plugin does not utilize Internal Promotion tracking of Enhanced Ecommerce. This can change in future versions.

Step 1: enable enhanced ecommerce in plugin settings

  • Open plugin settings page in your WordPress admin area located under Settings / Google Tag Manager
  • Click on the Integration tab
  • Click on the WooCommerce sub-tab
  • Check the box next to the label Track enhanced e-commerce
  • Enter the number of products to track in a single batch on pages with product lists. 10 should be a good start.
  • Click Save changes at the bottom of the screen
Enable enhanced ecommerce in plugin settings

Step 2: check the tag type of your Google Analytics main pageview tag

Checking the tag type of your Google Analytics Pageview tag
  • Open your Google Analytics pageview tag in Google Tag Manager
  • Check the value of Tag Type
  • If you see Google Analytics: Classic, you have to upgrade your Google Tag Manager setup to use “Google Analytics: Universal Analytics” tags.
  • If you see Google Analytics: Universal Analytics, you are ready to move on

Step 3: deactivate your transaction tag

Google Analytics tag with track type set to Transaction
  • If you are already using standard ecommerce tracking in your Google Tag Manager setup, you should already have a tag with Track Type set to Transaction
  • Open this tag
  • Remove everything from “Firing Triggers”
  • Delete the tag from your Google Tag Manager container

Step 4: enable Enhanced Ecommerce in your Google Analytics pageview tag

If you are using a Google Tag Manager variable of type “Google Analytics” to keep GA settings in one place, do NOT turn on enhanced ecommerce in this variable. You will track interactions that are not part of ecommerce tracking. Turning this on could cause to collect the same ecommerce action multiple times.

Google Analytics variable: enhanced ecommerce options

Instead, leave enhanced ecommerce off in your Google Analytics Settings variable and use the override feature in your tags.

  • Open your Google Analytics pageview tag
  • Enable overriding settings
  • Scroll down to the More settings section
  • Click on More settings if this section is closed up
  • Select “True” in the Ecommerce features section
  • Check Use data layer
  • Save your tag
Google Analytics pageview tag: enable enhanced ecommerce

Enabling this will activate tracking of the following ecommerce actions:

  • Product detail page
  • Checkout funnel first step
  • Transaction/order tracking

Step 5: setup tracking ecommerce interactions

  • Create a new trigger in your Google Tag Manager container
  • Select the trigger type: Custom Event
  • Add the following event name value: gtm4wp.productClickEEC|gtm4wp.addProductToCartEEC|gtm4wp.removeFromCartEEC|gtm4wp.checkoutOptionEEC|gtm4wp.checkoutStepEEC|gtm4wp.changeDetailViewEEC
  • Turn on the Use regex matching checkbox
  • Name the trigger as you wish (for example: ‘Event – Ecommerce Events’)
  • Save the new trigger

Then:

Create your ecommerce action event tag
  • Create a new tag
  • Tag Type should be Google Analytics: Universal Analytics
  • Track Type should be Event
  • Set values to Event Category, Event Action and optionally Event Label
    • My suggestions:
    • Event Category = Ecommerce helper
    • Event Action = {{Event}}
    • Event Label can stay empty: many people want to add product name into this parameter but this is not needed, ecommerce reports will be much more useful
  • Select your Google Analytics settings variable (just like in your pageview tag)
Create your ecommerce action event tag
  • Enable overriding settings
  • Scroll down to the More settings section
  • Click on More settings if this section is closed up
  • Select “True” in the Ecommerce features section
  • Check Use data layer
  • Add the previously created ecommerce event trigger
  • Save your new tag

Enabling this will activate tracking of the following ecommerce actions:

  • Product list clicks
  • Add to cart
  • Remove from cart
  • Product detail views on variable product pages
  • Checkout steps after the first step
  • Selecting checkout options (shipping method and payment method)

Step 6: setup product impression tracking

Steps are the same as in Step 5 but with a different event name and a slightly modified Google Analytics event tag.

  • Create a new trigger in your Google Tag Manager setup
  • Select the trigger type: Custom Event
  • Add the following event name value: gtm4wp.productImpressionEEC
  • Name the trigger as you wish (for example: ‘Event – Ecommerce Product Impressions’)
  • Save the new trigger
  • Create a new tag
  • Tag Type should be Google Analytics: Universal Analytics
  • Track Type should be Event
  • Set values to Event Category, Event Action and optionally Event Label
    • My suggestions:
    • Event Category = Ecommerce helper
    • Event Action = {{Event}}
  • Set Non-Interaction Hit to true – this will ensure that this tag does not mess with your bounce rate
  • Select your Google Analytics settings variable (just like in your pageview tag)Scroll down to the More settings section
  • Enable overriding settings
  • Scroll down to the More settings section
  • Click on More settings if this section is closed up
  • Select “True” in the Ecommerce features section
  • Check Use data layer
  • Add the previously created ecommerce product impression trigger
  • Save your new tag

All done!

At this point you setup everything to track enhanced ecommerce in your WooCommerce store. Enjoy! 🙂