eCommerce Marketing Growth Hacks 

UPCOMING WEBINAR:
November 21st 4:30pm GMT / 11:30am EST
with Kunle
Campbell

Facebook Funnels for Ecommerce that CONVERT

Register now

2X eCommerce Podcast

Kunle interviews Founders of Fast Growing 7-8 Figure Online Retail Business & E-commerce Marketing Experts

View podcasts

Download your free ebook

More

The eCommerce Marketing Blueprint

Universal Analytics: Guide to Event Tracking for Ecommerce

Posted on 16th October 2014 , by Kunle Campbell in Analytics

Event Tracking is a must have on the to-do list of any data driven Ecommerce business. Just by adding an extra code snippet, it enables you collect data on additional website actions and activities that are not ordinarily tracked with standard Google Analytics code.

From clicks on buttons (add to cart, view product, proceed to checkout, etc.) or links (internal and external), to what fields of the checkout form are filled and what errors users experience when they navigate through your store.

I intend covering Event Tracking with Google Analytics Universal in this post.

First off, Event Tracking fundamentally works through passing the following information to Google Analytics:

  1. Category // Typically the object that was interacted with (e.g. button). – Required.
  2. Action  // The type of interaction (e.g. click). – Required.
  3. Label    // Useful for categorising events (e.g. nav buttons). – Optional.
  4. Value    // Values must be non-negative. – Optional.

This data is also completely customisable – as you’ll get to choose the event Category, Action (Label, Value) specific to each activity to pass through to Google Analytics.

The data comes under the Behavior Report in Google Analytics:

Event Categories in Google Analytics

Before deciding on how to label the activities in your store, take a look at how information is likely to be accessed.

This is where grouping Actions applies: as you will want to group similar activities like ‘clicks’ together as a single action that can be broken down by category and labels, rather than having too many varying actions.

In a similar vein with Categories, try to find ways to group and analyse similar categories like ‘buttons’ together with the ability to break them down by labels and actions.

Basic Code

Broken down to its bare bones, the code is structured like:

ga('send', 'event', category, action, opt_label, opt_value);

Replace each aspect (except ‘send’, ‘event’) with the actions that you’d like tracked and parsed to Google Analytics. Although you only need to include Category and Action, the other two are optional.

As an example, to track clicks on Add to Cart events, I am going to assign:

  • Category: Product Category Page – place where the product is selected or added to cart by a customer
  • Action: Add to Cart
  • Label: Product SKU

The important point to note, is that if you want the Event to fire when someone clicks something, you will need to put the code inside an onClick function, like:

onClick="ga('send', 'event', 'All Brands', 'Add to Cart', '23499');"

In this example, we’re tracking clicks on add to cart buttons, so the full code of button will look like:

<input type="button" onClick="ga('send', 'event', 'All Brands', 'Add to Cart', '23499');" button=”Add to Cart”> Product 23499 </a>

You can see how the extra line of code sits within the ‘Add to Cart’ button code and how reusable it is after a single implementation.

And because it is JavaScript, dynamic data insertion is possible, (as against static data).

In this example you would have to define the event ‘Category: Page Category or URL’  and event ‘Label: Product SKU’ variables elsewhere in the code, so that the JavaScript knows which bit of information to pull in.

Event Labels in Google Analytics

This way when you look at the Google Analytics report you are able to see the number of times a specific product was added to cart and from what page (if the same product can be added from multiple locations).

Calculate Add-to-Cart to Sales Conversion Rate

You can go even further and compare product-to-cart data against your eCommerce report and calculate the conversion rate of all products added to cart (i.e. what percentage of products added to cart products of each type (SKU) have made it actual purchase). This could help improve your shopping cart user experience or identify products with issues such as high shipping rates.

Value of Events

As with goals and ecommerce data, adding a tangible value to your reports can give you so much more performance and progress insights, so it is highly recommended setting values wherever possible.

In Event Tracking code, the value is an integer that can be used for whatever metric you want, as long as it’s a positive number.

You can either set the value based on:

  • What the Event is worth to the business, e.g. when a product is added to cart its price can be set as a value.
  • Average final revenue and then multiply this by the conversion rate (the likelihood you will get revenue from the Event) to work out how much each Event could be contributing.
  • Alternatively, based on values as arbitrary numbers on a scale of importance. This will help you compare a visits/pages/traffic sources that have measured 100 low importance interactions compared to visits/pages/traffic sources that have measured just a couple of very high importance Events.


ga('send', {
'hitType': 'event',
'eventCategory': 'product1',
'eventAction': 'add-to-cart',
'eventLabel': 'prodcuct-category1',
'eventValue': 150.99        //150.99 is the monetary value of the product that is added to cart
});

Using either method here will then give you a much better idea of performance, especially when tracking more than one Event type.
ga('send', {
'hitType': 'event',
'eventCategory': 'video',
'eventAction': 'watch',
'eventLabel': 'home-credo',
'eventValue': 20.21        //20.21 is the amount of time that video was watched
});

Alternatively, you may choose to use the value field for another metric such as time (for tracking videos watched or time on site)
ga('send', {
'hitType': 'event',
'eventCategory': 'keyword',
'eventAction': 'search',
'eventLabel': 'brand-name',
'eventValue': 4        //4 is the rank of that specific keyword
});

Or as search engines positions or rankings. If you use these then you may want to make sure that everyone able to view reports in your Google Analytics account is aware that these values are not monetary values.

Conclusion

With Event Tracking you can collect insightful data and use it in many ways to measure your business’s performance and improve the results. However, before setting up Event Tracking (as well as any other type of data collection), answer the following fundamental questions:

  • What exactly do you want to measure with each event tracking set-up? (This ensures that you see what really needs to be tracked vs. what could be tracked and never used). Why add tracking code if the data is of no use?
  • How should event tracking data be reported? (This can help you work out how best to name your Events for analysis).

About the author:

Kunle Campbell

An ecommerce advisor to ambitious, agile online retailers and funded ecommerce startups seeking exponentially sales growth through scalable customer acquisition, retention, conversion optimisation, product/market fit optimisation and customer referrals.

Did You Enjoy Reading this Article?

Get Free Email Updates by Signing Up Below:

Podcasts you might like

Universal Analytics: Guide to Event Tracking for Ecommerce

Posted on 16th October 2014 , by Kunle Campbell in Analytics

Event Tracking is a must have on the to-do list of any data driven Ecommerce business. Just by adding an extra code snippet, it enables you collect data on additional website actions and activities that are not ordinarily tracked with standard Google Analytics code.

From clicks on buttons (add to cart, view product, proceed to checkout, etc.) or links (internal and external), to what fields of the checkout form are filled and what errors users experience when they navigate through your store.

I intend covering Event Tracking with Google Analytics Universal in this post.

First off, Event Tracking fundamentally works through passing the following information to Google Analytics:

  1. Category // Typically the object that was interacted with (e.g. button). – Required.
  2. Action  // The type of interaction (e.g. click). – Required.
  3. Label    // Useful for categorising events (e.g. nav buttons). – Optional.
  4. Value    // Values must be non-negative. – Optional.

This data is also completely customisable – as you’ll get to choose the event Category, Action (Label, Value) specific to each activity to pass through to Google Analytics.

The data comes under the Behavior Report in Google Analytics:

Event Categories in Google Analytics

Before deciding on how to label the activities in your store, take a look at how information is likely to be accessed.

This is where grouping Actions applies: as you will want to group similar activities like ‘clicks’ together as a single action that can be broken down by category and labels, rather than having too many varying actions.

In a similar vein with Categories, try to find ways to group and analyse similar categories like ‘buttons’ together with the ability to break them down by labels and actions.

Basic Code

Broken down to its bare bones, the code is structured like:

ga('send', 'event', category, action, opt_label, opt_value);

Replace each aspect (except ‘send’, ‘event’) with the actions that you’d like tracked and parsed to Google Analytics. Although you only need to include Category and Action, the other two are optional.

As an example, to track clicks on Add to Cart events, I am going to assign:

  • Category: Product Category Page – place where the product is selected or added to cart by a customer
  • Action: Add to Cart
  • Label: Product SKU

The important point to note, is that if you want the Event to fire when someone clicks something, you will need to put the code inside an onClick function, like:

onClick="ga('send', 'event', 'All Brands', 'Add to Cart', '23499');"

In this example, we’re tracking clicks on add to cart buttons, so the full code of button will look like:

<input type="button" onClick="ga('send', 'event', 'All Brands', 'Add to Cart', '23499');" button=”Add to Cart”> Product 23499 </a>

You can see how the extra line of code sits within the ‘Add to Cart’ button code and how reusable it is after a single implementation.

And because it is JavaScript, dynamic data insertion is possible, (as against static data).

In this example you would have to define the event ‘Category: Page Category or URL’  and event ‘Label: Product SKU’ variables elsewhere in the code, so that the JavaScript knows which bit of information to pull in.

Event Labels in Google Analytics

This way when you look at the Google Analytics report you are able to see the number of times a specific product was added to cart and from what page (if the same product can be added from multiple locations).

Calculate Add-to-Cart to Sales Conversion Rate

You can go even further and compare product-to-cart data against your eCommerce report and calculate the conversion rate of all products added to cart (i.e. what percentage of products added to cart products of each type (SKU) have made it actual purchase). This could help improve your shopping cart user experience or identify products with issues such as high shipping rates.

Value of Events

As with goals and ecommerce data, adding a tangible value to your reports can give you so much more performance and progress insights, so it is highly recommended setting values wherever possible.

In Event Tracking code, the value is an integer that can be used for whatever metric you want, as long as it’s a positive number.

You can either set the value based on:

  • What the Event is worth to the business, e.g. when a product is added to cart its price can be set as a value.
  • Average final revenue and then multiply this by the conversion rate (the likelihood you will get revenue from the Event) to work out how much each Event could be contributing.
  • Alternatively, based on values as arbitrary numbers on a scale of importance. This will help you compare a visits/pages/traffic sources that have measured 100 low importance interactions compared to visits/pages/traffic sources that have measured just a couple of very high importance Events.


ga('send', {
'hitType': 'event',
'eventCategory': 'product1',
'eventAction': 'add-to-cart',
'eventLabel': 'prodcuct-category1',
'eventValue': 150.99        //150.99 is the monetary value of the product that is added to cart
});

Using either method here will then give you a much better idea of performance, especially when tracking more than one Event type.
ga('send', {
'hitType': 'event',
'eventCategory': 'video',
'eventAction': 'watch',
'eventLabel': 'home-credo',
'eventValue': 20.21        //20.21 is the amount of time that video was watched
});

Alternatively, you may choose to use the value field for another metric such as time (for tracking videos watched or time on site)
ga('send', {
'hitType': 'event',
'eventCategory': 'keyword',
'eventAction': 'search',
'eventLabel': 'brand-name',
'eventValue': 4        //4 is the rank of that specific keyword
});

Or as search engines positions or rankings. If you use these then you may want to make sure that everyone able to view reports in your Google Analytics account is aware that these values are not monetary values.

Conclusion

With Event Tracking you can collect insightful data and use it in many ways to measure your business’s performance and improve the results. However, before setting up Event Tracking (as well as any other type of data collection), answer the following fundamental questions:

  • What exactly do you want to measure with each event tracking set-up? (This ensures that you see what really needs to be tracked vs. what could be tracked and never used). Why add tracking code if the data is of no use?
  • How should event tracking data be reported? (This can help you work out how best to name your Events for analysis).

About the author:

Kunle Campbell

An ecommerce advisor to ambitious, agile online retailers and funded ecommerce startups seeking exponentially sales growth through scalable customer acquisition, retention, conversion optimisation, product/market fit optimisation and customer referrals.

Did You Enjoy Reading this Article?

Get Free Email Updates by Signing Up Below:

eCommerce Marketing Growth Hacks 

UPCOMING WEBINAR:
November 21st 4:30pm GMT / 11:30am EST
with Kunle
Campbell

Facebook Funnels for Ecommerce that CONVERT

Register now

2X eCommerce Podcast

Kunle interviews Founders of Fast Growing 7-8 Figure Online Retail Business & E-commerce Marketing Experts

View podcasts

Download your free ebook

More

The eCommerce Marketing Blueprint