Setting up Enhanced Ecommerce Tracking in WooCommerce via Tag Manager

Setting up Enhanced Ecommerce Tracking in WooCommerce via Tag Manager

Enhanced Ecommerce Tracking in WooCommerce is fairly simple as compared to other websites. But still many of the people face difficulties setting this implementation.

This is a step by step guide to implement enhanced ecommerce tracking for WooCommerce and also includes an awesome DataStudio ecommerce template at the bottom.

To follow this tutorial I am assuming that you have a WooCommerce store and have installed Google Tag Manager using DuracellTomi’s plugin.

 

Step1: Prerequisites

  1. You should be using Universal Analytics

  2. Enabled enhanced ecommerce tracking in Google Analytics

The best practice to setup enhanced ecommerce is to create a new view and test before setting it up in the master view. If you have already setup enhanced ecommerce you will still be able to see the reports in the enhanced ecommerce reports.

 

Step2: Enable Enhanced Ecommerce Tracking in Wordpress

For enabling enhanced ecommerce tracking, open your wordpress dashboard and navigate to Settings >> Google Tag Manager.

google tag manager plugin

Go to integration, select WooCommerce and enable ‘track enhanced ecommerce’ checkbox.

enable enhanced ecommerce tracking

Click Save changes button at the bottom of the screen.

 

Step3: Verify Data is Pushing to Data Layer

Once you enable enhanced ecommerce tracking from the wordpress plugin, it’s time to verify if it is pushing e-commerce data to the data layer.

To do this install data layer inspector extension in your browser:

On your website right click and select inspect element

Navigate to console and you should see the data layer data as shown in the image below.

datalayer inspector

If you are not seeing the data layer like above, open a product page or go back to your wordpress and make sure you have saved the changes.
 

Step4: Enable Enhanced Ecommerce in Universal Pageview Tag

To enable enhanced ecommerce from tag manager, follow the steps below:

  1. Go to your Google Tag Manager account and open Universal Analytics pageview tag

  2. Click on More Settings

  3. Click E-commerce

  4. Change the Enable Enhanced Ecommerce Features to true and check the Use Data Layer checkbox.

  5. Save the tag.

enable enhanced ecommerce tag manager

Enabling enhanced ecommerce features will activate some of the data collection:

  1. Product impressions

  2. Product detail impressions

  3. Checkout impressions

  4. Transaction tracking

 

Step5: Setup Custom Events in Tag Manager

For tracking add to cart or checkout steps, we will have to setup custom events in tag manager. To do this, follow the steps below:

Create a new trigger

  1. From the left menu, click on triggers and click new button
  2. Select the trigger type as custom event
  3. Enter this in the event name field: gtm4wp.addProductToCart|gtm4wp.productClick|gtm4wp.removeFromCart
  4. Check the use regex matching checkbox
  5. Enter a name for the trigger and save
enhanced ecommerce tracking trigger

Create a new tag

  1. Create a new tag
  2. Select the tag type as Universal Analytics
  3. Set track type as Event
  4. Add values to Event Category and Event Action (Ecommerce & {{Event}})
  5. Enable advertising and any other feature that you enabled in the pageview tag
  6. Click more settings and enable enhanced ecommerce tracking and check use data layer like we did in the previous tag
  7. Add the trigger we created in the above step to this tag
  8. Enter a name for your tag and save the tag.
tag manager ecommerce tag

Once you complete the steps above, you will now be able to see ecommerce reports in Google Analytics within less than two hours. To verify your e-commerce setup, go to your website and purchase a product and check the ecommerce reports in analytics later.

To view your ecommerce reports, navigate to conversions >> ecommerce >> overview.

To see how visitors navigate through the purchase process, click on shopping behavior under ecommerce.

ecommerce reports

To see the checkout behavior, you will have to add the checkout steps under ecommerce settings.

ecommerce checkout funnel

Once you add the checkout labeling, you will be able to see the checkout behavior report under ecommerce.

ecommerce funnel

The final step is to implement the goal flow to understand the conversion funnel. The goal flow report will help you see the irregular purchase behavior.

ecommerce purchase goal funnel

 

Bonus: Google DataStudio Ecommerce Report

For helping you understand ecommerce data, I have created an ecommerce DataStudio template. Click on the link below to use this template and understand your ecommerce data.

ecommerce datastudio template

I hope you are able to setup enhanced ecommerce tracking on your WooCommerce store using this guide. If you have any questions please let me know in the comments below and if you’re looking for a perfect ecommerce analytics consultant, please check our services.

Noman Karim

Hey, I am Noman, Content Marketer at MarketLytics conducting in-depth analysis of latest marketing trends and aligning them with my personal prospects to produce stage-managed and engaging content. I am a passionate blogger, a cat hoarder and an enthusiastic writer when it comes to analytics, online marketing, and SEO.