Practical Ecommerce

Google Analytics Set-up Checklist for Ecommerce

This article offers a step-by-step approach to setting up Google Analytics tracking for an ecommerce website.

Step 1: Creating Google Analytics account

This is the most basic of steps: Head over to Google.com/analytics and sign up for Google Analytics account.

Google Analytics home page.

Google Analytics home page.

Step 2: Properties and Views Architecture

Start by taking note of all domains and subdomains that you are about to install the Google Analytics tracking code on. For each, decide if you’d want to give it a unique Property ID, identified by the ID UA-#######-#.

As a rule, if the main domain and subdomains are interconnected and related in terms of goals and business objectives, then they should all use the same Property ID. That way you may want to have (a) all data from the domain and subdomains collected from the same Google Analytics property, and (b) additionally create a separate view for the domain and subdomain (note the image below).

Assign Property IDs to domain and subdomains.

Assign Property IDs to domain and subdomains.

However, if the sites have different goals you may consider creating a separate Google Analytics property for each of them (as show below).

If your domains and subdomains have different goals, consider separate Property IDs.

If your domains and subdomains have different goals, consider separate Property IDs.

Step 3: Insert Google Analytics Tracking Code or Google Tag Manager

To parse traffic data from your site to Google Analytics, you need to place either Google Analytics Tracking Code (GATC) or GTM (Google Tag Manager) on all pages of the site. You can find GATC at the Property level setting in Google Analytics (as shown below).

GATC is at the Property level setting.

GATC is at the Property level setting.

To use Google Tag Manager to send the data to Google Analytics, you will need to create a GTM account.

Using Google Tag Manager requires a separate account.

Using Google Tag Manager requires a separate account.

As a next step you will need to create a container for your website and place the code — which is automatically generated — on all pages of the site.

Place the GTM code on your website.

Place the GTM code on your website.

After the GTM snippet is placed on the website you will need to create a tag to fire on all pages that will send all the data to Google Analytics, as shown below.

Create a tag to fire on all pages that will send all the GTM data to Google Analytics.

Create a tag to fire on all pages that will send all the GTM data to Google Analytics.

Step 4: Setting up Ecommerce Tracking Using GATC or GTM

A must-have for any ecommerce site is ecommerce tracking — i.e. sending transaction details to Google Analytics for the analysis of data in context of other metrics and dimensions available in Google Analytics, such as performance by traffic sources, keywords, and countries and regions.

First, you will need to enable ecommerce data collection in your Google Analytics account. It is done at the View level; note the image below.

Enable ecommerce data collection in your Google Analytics account.

Enable ecommerce data collection in your Google Analytics account.

Next, place ecommerce tracking using either Google Analytics Tracking Code or Google Tag Manager — depending on which option you chose.

For the Tracking Code method, place the code on the thank-you page (or confirmation page) of your website.

For the Tracking Code method, place the code on the thank-you or confirmation page.

For the Tracking Code method, place the code on the thank-you or confirmation page.

// 

If you opted to use Google Tag Manager to send data to Google Analytics, transaction details on your thank-you page should be pushed to the dataLayer in GTM, as follows.

Using Google Tag Manager, transaction data on your thank-you page should be pushed to the dataLayer.

Using Google Tag Manager, transaction data on your thank-you page should be pushed to the dataLayer.

After the above code is placed you will need to create a transaction tag in GTM container — to fire on the thank-you page — as shown below.

Create a transaction tag in Google Tag Manager container.

Create a transaction tag in Google Tag Manager container.

Step 5: Popular Filters

There are several filters you will want to consider, depending on the function of each of your views.

Show full URLs of domains and subdomains. If you have multiple subdomains, it is often helpful to see how visitors move between them. A common example is if you have a blog on a different subdomain. It could be interesting to see how many of your visitors are coming from blog pages, and which pages are sending the most buyers. With this filter, Google Analytics will record the full URL of each page.

Here’s how to set up this filter on your subdomains profile.

Create filters for your subdomains.

Create filters for your subdomains.

Exclude internal traffic. Locate the IP addresses of your office(s), and create exclusions to ensure that internal traffic does not inflate the numbers from your site visitors. The following predefined filter should be used to exclude single IP addresses.

Create filters to exclude internal traffic.

Create filters to exclude internal traffic.

To exclude a range of IP addresses, create a custom filter that allows the use of regular expressions for a range of IP addresses.

Create a filter to exclude a range of IP addresses by using regular expressions.

Create a filter to exclude a range of IP addresses by using regular expressions.

Step 6: Goal Setup

Goal setup is a quite common practice that sets out to identify activities considered to be conversions based upon users’ completion of specific actions on your site.

For an ecommerce site, making a purchase is considered to be a macro conversion. However, there could be other types of user activities that qualify as micro conversions such as email signups, sharing a product with a friend, and adding to cart.

Step 7: Conversion Funnel Setup

Even though transactions are tracked as ecommerce events (see Step 4), I highly recommended to set up a funnel of pages leading up to the purchase thank-you page.

Set up a funnel of pages leading up to the purchase thank-you page.

Set up a funnel of pages leading up to the purchase thank-you page.

Having goal completion set up this way enables the view of users’ flow through the conversion path and identifies weak points through the purchase funnel, as shown in this image.

Setting up goal completion enables the view of users’ flow through the conversion path and identifies weak points.

Setting up goal completion enables the view of users’ flow through the conversion path and identifies weak points.

Conclusion: Analytics Set Up Is Ready

The above steps allow tracking of the essential metrics for an ecommerce website. After tracking has been verified, you can move into the setup of more advanced tracking, like events, dashboards, custom dimensions and metrics, enhanced ecommerce, user ID, and so on.

Kunle Campbell
Kunle Campbell
Bio  |  RSS Feed


Get the Practical Ecommerce RSS feed

Comments ( 8 )

  1. Carlos Rivera November 11, 2014 Reply

    That’s a very solid setup for Google Analytics. It’s great to have all this detailed information in one article. Thanks!

  2. Jessica November 11, 2014 Reply

    I want to use the GATC method to track ecommerce and I’m having a hard time understanding what to use as the Transaction and Item data. Should I make up arbitrary numbers that fit the format of what’s actually on my e-commerce store? Thanks!

    • Kunle Campbell November 12, 2014 Reply

      Jessica – ask your developers to push transaction and product ID values to your ‘thank-you’ page. Dynamic numbers/values will be matched with completed payments in your store and passed to GA in real-time as orders come in.

  3. Begoña November 13, 2014 Reply

    Where can I get the ecommerece code from? As it is not as the Analytics one, which can be extracted from the admin area of the account.

  4. Imtiaz November 13, 2014 Reply

    Indeed a very detailed article for E-Commerce tracking setup.

    Thank You :-)

  5. David Arnoux November 19, 2014 Reply

    EXTREMELY helpful checklist, so clear and easy to follow (thanks for the screenshots). I’ve sent it directly to our dev team.
    It is missing an actual checklist thought so I’ve gone ahead and created it. Our dev team just ticked the items one by one as they were being done. If you’re reading this don’t hesitate to use it yourself and share it around, free tool, no register or sign-up needed: http://bit.ly/1vpquga

  6. Jake Beresford December 2, 2014 Reply

    A word of warning if you are using this guide to set up ecommerce tracking with universal analytics. You need to include the ecommerce plugin before any ecommerce tracking code. You will need the following line:

    ga(‘require’, ‘ecommerce’);

  7. Patrick January 28, 2016 Reply

    Hello Mr. Campbell,

    I have a question about setting up the Ecommerce html with google analytics and not googles tab manager..

    After we have turned on the Ecommerce settings in Google Analytics..

    Can we just copy and paste the edited Ecommerce hmtl into the Thank you pages of our site & will it work?

Email Newsletter Signup

Sign up to receive EcommerceNotes,
our acclaimed email newsletter.

And receive a free copy of our ebook
50 Great Ecommerce Ideas



PEC IGNITE
Coming Sept. 16-17.
Register today!
View Agenda