Google Analytics Custom Events – The How and Why

cnxt_dev
cnxt_dev
2018/11/14 08:00

events google analytics

Find out how to boost your conversions by setting up and tracking events on your website.

Google Analytics boasts a number of useful features, providing businesses with in-depth data on their websites and how customers are interacting with their brands.

Goals and Events are two features that work hand-in-hand to give you an overview of how your website visitors are engaging with specific elements on your site.

While some people might argue that you only really need to use Goals to track how users are moving through your customer journey, there are certain elements that just can’t be tracked with Goals, this is where Custom Events come in.

What Custom Events Can Track

Basically, Events allow you to track actions that aren’t linked to a web page loading. Here are a few examples:

  • AJAX elements
  • Document or ebook downloads
  • Flash elements
  • Web forms that don’t redirect users to a Thank You or Successful Submission page

While Custom Events make it possible to track these types of actions, they don’t offer any in-depth reporting and can’t be linked to the overall customer journey without the help of Goals, which is why it makes sense to use them both.

Setting Up Custom Events

To create a Custom Event in Google Analytics, you’re going to need to add a snippet of code to the website element that you want to track. If you aren’t familiar with JavaScript, you are going to need the assistance of a developer to set each event up.

The other option is to use Google Tag Manager, which can make the process of creating the code snippets slightly easier but you will still require the assistance of a developer to implement the tags on your site.  

There are 4 elements that will make up the snippet of code for each event, namely:

  1. Category. This refers to the group of events that you will be tracking. For example, if you wanted to track several contact forms on your site, you could make the category ‘Contact’.
  2. Action. This is the specific action that a user will need to take to trigger an event. In the Contact category, you could define an action as ‘Submit’.
  3. Label. This is an optional field that helps separate actions that aren’t the same but are similar. Think of it as a description for each of the actions that fall under one specific category. If you have several contact forms that all have a Submit action, you can use labels to identify each of these forms.
  4. Value. This is also an optional field that allows you to assign a value to each action. In most cases, it’s a monetary value but it can also refer to the length of a video or even the size of a downloadable file.

Each code snippet will follow this formula: onclick=”ga(‘send’, ‘event’, ‘Category’, ‘Action’, ‘Label’, ‘Value’);”

Once you have added the snippet of code to each of the elements that you want to track, you will need to check that they are being tracked in Google Analytics by navigating to Behavior Flow > Events.

Linking Events & Goals in Google Analytics

To really get Events to work for you, it’s important to link them to a Goal so that you can pull reports that are more detailed.

Here are the steps to follow:

  1. Login to Google Analytics and click on Admin > Goals
  2. Click on “New Goal”
  3. Select the “Custom” radio button, name your Goal and select the “Event” radio button
  4. You will now be presented with 4 conditions that are exactly the same fields that you needed to complete for each of your Events. Simply use the same data to complete these fields
  5. Save the Goal and you’re good to go

Events and Goals can be one of the most useful tools for optimising your customer journey and boosting your conversions. Setting them up does take some time and effort but the data is truly invaluable.