A Step-by-Step Guide to Using Google Analytics’ Enhanced Ecommerce

Avatar

By Daniel Mastropietro

updated over 2 years ago

Google Analytics Enhanced Ecommerce gives you the opportunity to get better insights in the shopping behavior of your users by sending product details, sales data and events directly into your Google Analytics (GA) reports. In this quick guide we'll show you how to set it up either via the GA's global site tag (gtag.js) or via the Google Tag Manager.

Enable Enhanced Ecommerce

To start collecting Enhanced Ecommerce data, first enable it in your Google Analytics account - go to Settings -> Property -> Property Settings and take a note of your Tracking ID - UA-XXXXXXXX-X - we'll need it later.

Then go to Settings -> View -> Ecommerce Settings and enable both Ecommerce and Enhanced Ecommerce. Save your settings:

Setting up via the Global Site Tag

If you've installed Google Analytics via the Global Site Tag, i.e. with the code snippet from your Analytics account: 

<!-- Global site tag (gtag.js) - Google Analytics --> 
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'UA-XXXXXXXX-X');
 </script>

Then you are done! Ecommerce data will be automatically reported with your orders.

Setting up via the Google Tag Manager

If you're using Google Tag Manager instead, there is a little more required:

Open your Google Tag Manager and go to Variables. Define a variable for your Google Analytics Tracking ID:

For Variable Type select Google Analytics Settings and enter your Tracking ID.

Under Tags create new Tag. Click on Triggering and add new trigger: 

For Trigger Type select Custom Event and for Event Name enter ecommerce (lowercase). 

Back on the New Tag screen, click on Tag Configuration and choose Google Analytics: Universal Analytics. For Track Type pick Event and enter a category name (ECommerce, for example). Select your Google Analytics variable under the Google Analytics Settings.

Next, check the Enable overriding settings in this tag checkbox, then under More Settings expand ECommerce, select TRUE for Enable Enhanced Ecommerce Features and check the "Use Data Layer" checkbox.

Your Tag should now look like this:

Save it and Submit your workspace:

That's it! ECommerce data should start reporting to your Google Analytics account. You can keep track of it in GA under Conversions -> ECommerce:

With the Enhanced ECommerce integration, the following events will be reported to your Google Analytics reports: 

  1. Adding a product to cart
  2. Removing a product from the cart
  3. Initiating checkout
  4. Entering payment details
  5. New Order / Purchase

Did this answer your question?