Demac Media Demac Media Brand Demac Media Brand



Testing Google’s Enhanced eCommerce Analytics on Magento

Timer Icon 5 Mins

Conversion Optimization, Marketing

A few weeks back on the Demac Media Blog we posted an article by our Director of Product, Jason Kemp, that introduced what Enhanced eCommerce for Google Analytics is and how it works. This gets a lot of data and marketing folks excited for the visual representation of the Shopping/Checkout Behaviour reports generated. While this puts stars in the eyes of the marketing and executive team, it is not as simple as flipping a switch in the Google Analytics Admin tab and away you go. Specific actions and session based behaviour is identified through a series of script to send the data to Google Analytics which is well documented in the Enhanced eCommerce Developers guide.

As is the case for all Magento websites, you are going to need to test this first. But the code your developers apply to your Magento store affects data being imported into Google Analytics for analyzing site performance, not a new feature on the site.

Related: Understanding eCommerce Conversion Optimization

So how would you go about testing Enhanced eCommerce on Magento?

Logically the first place you turn to for your testing initiatives is a staging environment (assuming you have one). Commonly I have seen staging sites that use either the Google Analytics account number of the same account that is generating reports for the live website. I recommended creating a Property with a separate tracking ID within the same account where all of your testing data will live moving forward. It is quite simple actually, start by accessing the admin tab in Google Analytics.


This is a very simple procedure as I am sure everyone with a Google Analytics account has been through this before. I am simply providing the steps to save anyone the trouble of accidentally creating multiple accounts or hard coding multiple different tracking id’s onto sites.

First off, in the 2nd column which is property, select “Create new property” (you have up to 50 properties so don’t be shy)


Labeling the site settings is equally important so that your different teams and Webmasters know which property is used for what (live reporting vs testing). Typically we go by Staging, but you can also name the website after your brand and call it “Testing”. In the website URL field, provide the staging/testing url, then get your tracking ID.


GA-Tracking ID Screenshot 2015-01-07 10.48.36

Google Analytics Property sequence uses the same account number of your original property but ends with the next number in line. Ex. -1 , -2, -3. This is clearly laid out in the Analytics account.

GA-Account ID's

Once your Staging account is created, you have to replicate your Admin Settings to what you have on the website. In particular, you want to make sure your Goals are set up correctly, as well as your checkout funnel for Shopping Analysis reports. Magento checkouts typically follow the same funnel, but this does differ from site to site, but below is a standard checkout Goal set up.

I use Regular Expression to identify the checkout process, however this set up is entirely up to you. If you have a One Page Checkout, you should specify “opc” in the url that way Google Analytics will be able to walk through the checkout with the users and record the data correctly.

Screenshot 2015-01-09 12.05.34

The Shopping Analysis reports will identify data according to the label you provide GA in the Ecommerce Settings. If your checkout follows the same structure as the one I listed, you can simply give each step the name as the particular step you are in, then Save your settings.

Related: Lessons on the Importance of eCommerce Dashboards from a Retired General

Screenshot 2015-01-09 12.14.11Then you just go ahead and test your site. Ideally this means browsing around the site, checkout product pages and finally going through the motion of testing out an order. There are a few different things you are looking for once you have completed your test. The activity you want to see in your Enhanced Ecommerce reports is Session and Checkout Behaviour.

If you have set everything up correctly, and enabled it on staging, your reports should start to shape up and collect data. The first image is what the Shopping Behaviour report will look like (taken from Google Help Centre). The results below with have very little sessions depending on how many tests you run

Screenshot 2015-01-09 12.23.41

For when you are complete your test order, your Checkout Analysis will look like the test I personally ran a few times below.

Checkout-1 Screenshot 2015-01-09 12.22.52

You are ready to promote to production!

After promoting, keep an eye on your real time Analytics so you do not have any down time on your reports. Once the site has had a change to Flush Cache, the updated script will override your old Analytics configuration which you have now Disabled.

Related: Increase Revenue with On-Site Search

Subscribe to the Blog

Stay updated with 20,000+ eCommerce leaders in our community

Sign Up

Let’s talk about your 10X return

Icon/Social/Phone Contact us for pricing information