Guide To Setting Up eCommerce Tracking in Google Analytics

By May 26, 2017eCommerce

Google Analytics is a partner every eCommerce business needs. It provides valuable insights about your website, website visitors and where they came from, and all this data helps you strategize new or better ways to attract new customers and improve conversion rates.

eCommerce tracking, if you don’t know what it is, is a feature Google Analytics offers that lets eCommerce businesses track online transactions on their websites. This feature provides the information you need to make sound business decisions. It gives you practical user data that you can use to tweak parts of your website based off customer and site visitor preferences.

Some of the eCommerce tracking data you’ll receive includes:

  • Total products sold
  • Revenue generated from each individual product
  • Total revenue
  • Total transactions
  • Average cost of orders
  • Number of days and session that lead up to a transaction
  • Conversion rates.

In a nutshell, eCommerce tracking through Google Analytics will show you real-time information of your products and marketing efforts and provide the detailed data that’s going to help you establish your best path to maximum ROI.

But before you can reap all these benefits, you first have to create a Google Analytics account, if you haven’t already, and then you have to set up eCommerce tracking for your business inside your Google Analytics account.

Google Analytics eCommerce tracking overview

Steps to Set Up eCommerce Tracking

Before starting these steps, make sure you’re the one to do this. If you understand editing HTML and JavaScript then go for it. If not, find someone who’s a web developer and have them help you with the following steps.

PS – Setting up eCommerce tracking should take roughly an hour to do. That is if you have to do some custom coding.

For sites built on platforms such as Shopify and Woocommerce with WordPress it is substantially less. It is as simple as copying and pasting analytics code or installing a plugin.

Here is how to do that on Shopify.

Here is a plugin when using Woocommerce with WordPress.

Step 1: Upgrade to Universal Analytics

For some of you this step won’t be necessary, but for those of you who haven’t upgraded yet, having Universal Analytics is required to have the Google Analytics enhanced eCommerce plugin.

If you don’t have any other tracking set up already, this upgrade is as simple as pushing a button. Really, there’s a Universal Analytics Upgrade button. You just need to go to Admin, then Property and then click on the Transfer button. This could take between one to two days to transfer completely, so don’t touch your tracking code until it’s completely finished.

If you have other tracking measure not associated with Google Analytics, they’ll need their syntax changed because Universal Analytics uses a special syntax, so change your other tracking methods to correspond.

Step 2: Install Tracking Codes on Every Page You Want Tracked

Boring as it may be, though, it’s necessary to add the right codes to every page you’re wanting tracked. And while it’s a repetitive process keep in mind that codes have to be added in the right order. If they’re not, if even just one step is wrong, your whole chain falls apart.

The first part is — ga(‘create’, ‘UA-XXXXXXXX-X, ‘auto); — This generates your tracker object.

Second is — ga(‘require’, ‘ec’); — This must come before the coding for the wanted action.

Third, you need a specific command. This represents the precise function you want or command to gather certain data.

Last in this sequential process is —ga(‘send’, ‘XXXXXX’); — Add the send command to the bottom of the page code so the right data is sent to Google Analytics.

As far as the specific commands you can use, Google Analytics enhanced eCommerce provides numerous trackers. Below are some common ones:

  • ‘ec:addImpression’ + product ID — This command measures the number of impressions a certain product receives. It can be added to any website page except the individual product page.
  • ‘ec:addProduct’ + product ID, followed by ‘ec:setAction’, ‘click’ — As you might guess, this command counts the number of clicks a product receives.
  • ‘ec:addProduct’, followed by ‘ec:setAction’, ‘checkout’, {‘step’:1} — With this specific command, the number of checkouts started is tracked.
  • ‘ec:addProduct’, followed by ‘ec:setAction’, ‘purchase’ — This one tracks how many checkouts were completed.

To see and find out more, check out Google Analytics Enhanced eCommerce Guide.

Step 3: Enable Enhanced eCommerce

The last thing on your to-do list is to turn on enhanced ecommerce inside your Google Analytics account, which you can find by going to Admin, View and eCommerce Settings. Once there, you simply have to switch this function to on, and you’ll then be able to see all the information the enhanced eCommerce plugin provides.

enable ecommerce on Google Analytics

For even more eCommerce tips, read our blog post, 10 Rules for Growing eCommerce Sales with Content Marketing.

About Jordan Foutz

Jordan Foutz is a digital marketing manager at Stryde with over 10 years experience in eCommerce and digital marketing management. By day, he markets all the things, but by night and on weekends, he enjoys his family, ping pong, hiking in Utah, water sports, and copious amounts of Diet Mt. Dew.

Leave a Reply