How to implement Enhanced E-commerce on a webshop?

For years we have relied on the original e-commerce tracking in Google Analytics. However, now it’s possible to upgrade to enhanced e-commerce, which brings along a lot of new features. You can read more about the Enhanced E-commerce features here.

In this guide we will go through how to implement it. However, first a very important warning. While installing normal e-commerce tracking is relatively simple, installing enhanced e-commerce is not. Enhanced e-commerce requires (depending on which features you want to implement):

  • A lot of updates on front page, category pages, product pages, cart pages and checkout pages
  • A lot of updates in Google Tag Manager (recommended way of getting the actual data into Google Analytics)

In addition, it can easily give problems with your current implementation if done wrong.

My suggestion is: if you’re a small startup and really have to worry about every cent, try implementing yourself (i.e. using this guide). If you have a webshop in production with important data, I’d strongly suggest looking into our consulting service.

With this warning in place: let’s get started on how to implement Universal Analytics.

What enhanced e-commerce features are worth mentioning?

Let me quote our service page:

– Register impressions (and clicks) on product level, so you know conversion rates on each product

– Register impressions (and clicks) on recommendations and banners, so you know which banners convert

– Get info about removing and adding items in the cart

– Register coupons

– Import refunds, so you get the numbers after product returns

– Import cost prices, so you can see profit and not only revenue

Migration to Universal Analytics is required before implementing enhanced e-commerce!

Before you can start implementing Enhanced E-commerce, you have to migrate to Universal Analytics.

How to migrate from normal Google Analytics to Universal Analytics is outside the scope of this guide, but you can always contact us if you need help.

You know you’ve implemented Universal Analytics if your tracking code looks something like this:

 

<script>
(function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,’script’,’//www.google-analytics.com/analytics.js’,’ga’);

ga(‘create’, ‘UA-12345678-1’, ‘auto’);
ga(‘send’, ‘pageview’);

</script>

 

If not, you have to start here.

If you do not have a Google tracking code present in your code, you might have implemented it through Google Tag Manager. In that case, you have to review that account (again, contact us if you need help).

How to activate enhanced e-commerce reporting in Google Analytics

You need to activate enhanced e-commerce in the admin setting of the view. Click on the image below to see a large version of how to do it:

Activate enhanced e-commerce

This guide assumes you implement enhanced e-commerce with Google Tag Manager

When you implement this, you can either do it with direct calls to Google Analytics or Google Tag Manager. While we’ve seen normal e-commerce tracking implementations use Google Analytics, we STRONGLY suggest using Google Tag Manager for the implementation.

The reason for recommending Google Tag Manager is the flexibility. When you have the data in the datalayer, you can later change how the data should be imported in Google Tag Manager itself. If you do the actual import directly in code and not the datalayer, you have to deploy new code in order to make an update to the imported data.

How to register impressions (and clicks) on product level in Google Analytics

Which products get how many impressions? What is the click-through rate on those products? How many people click for extra details? How do you track impressions for multiple products on the same page (as needed in some stores)?

All of this wasn’t doable before, but is now possible with enhanced e-commerce.

Enhanced e-commerce allows for making a datalayer with relevant information about the products the user sees. In addition, an extra event can be fired when clicking for extra details.

The impressions can be used in multiple ways, i.e.:

  • Category pages / search results (simply sending all the impressions on a page)
  • Product page

This can be used in combination with the impression/clicks on recommendations (see headline below). There is no specific way to do this, but we recommend firing product impressions/clicks on product views such as categories and search, and then using the recommendations banner for actual recommendations.

How to implement:

How to register impressions (and clicks) on recommendations and banners in Google Analytics

We all want to improve our basket size, and “help our customers” by giving them more products than they might have expected in the first place.

But then, the following questions arise:

  • Which of our recommendations actually work?
  • Which products work as recommendations?
  • Which banner positions give the best revenue?

These questions can easily be answered if enhanced e-commerce is implemented correctly.

With enhanced e-commerce, we can track exactly what products have been shown in which banners, and even more importantly, which ones have been clicked. Then we know exactly what banners work, their conversion rates and even how much extra revenue they have provided.

How to implement:

How to get info about removing and adding items in the cart in Google Analytics

A user might put a product in their cart, but that absolutely does not mean they will actually make the purchase. Before the transaction is complete, the user may have modified something in their cart.

With enhanced e-commerce, we can track any modification to the cart: added products, removed products and modified quantities. This lets us understand if there are particular products that might be removed more than others (which could leads to interesting insights), or products that are bought in higher quantities more often than others.

How to implement:

How to register coupons and giftcards in Google Analytics

How to implement:

How to import refunds in Google Analytics

Unfortunately, sometimes users want refunds. Not only is this annoying, it also skewers data. All products don’t have the same return rate, which causes a problem: it means some products will get returned much more than others.

By having this data in Google Analytics, we can do two very interesting things:

  • We can find out which products are returned the most, and then investigate why
  • We can find our real revenue (and profit) of the individual products, instead of trusting the usual product insights

To get the full benefit of imported refunds, it’s also worth looking into importing cost prices of products. This is not a part of enhanced e-commerce, but it’s still something we can help with.

How to implement:

How to analyse the whole checkout flow in Analytics

Google Analytics has always been good at visualizing checkout flow. By showing the checkout funnel using goals, we could see the conversion rate and drop-off rate of every step.

However, with enhanced e-commerce we can do some very interesting things:

  • Track options
    • Payment methods. We can track which payment method is used, and then see the conversion rate on different payment methods. Let’s say that something is wrong with the implementation for PayPal; we could probably see that on the conversion rate.
    • Shipping methods. We can also see the shipping methods, meaning we can see conversion rates (and quantity) of individual shipping methods.
  • Track steps. We can provide more information about the actual steps, and handle more complex steps than before (when we relied on a linear flow).
  • Track products in the checkout flow.
  • Track giftcards and coupons used in the transaction.

How to implement:

A conclusion on implementing enhanced e-commerce

Whoa.

Enhanced e-commerce is a big task. However, the data is great and really useful. But as we started out with, we hugely recommend getting help doing the implementation if it’s a webshop in production. We can help with the implementation, and if you’re interested, just contact us.

If this guide helped you, please help us by sharing it! 🙂