Google Analytics Events and how to create Events tracking.

Google Analytics is a free tool that helps you see what’s going on with your web traffic. You can see how much time people are spending on each page, where they are getting referrals to your website from, and sometimes you can even see the keywords they used to find your site. But there’s an often underused feature in Google Analytics that has tremendous value for small business owners and marketers: event tracking.

Google Analytics Event Tracking

Google Analytics Event tracking is a feature that enables you to record interactions with elements of your website that aren’t tracking as a standard within Google Analytics. You can track events manually, or by using the Google Tag Manager.

In this post, I’ll explain how to create the events, and why you should be creating events within Google Analytics. Events shouldn’t be confused with Goals. I’ve written about how to set up goals in Google Analytics in another post.

How to Create Events in Google Analytics

After you’ve installed Google Analytics on your website, you can set up event tracking and create events. But before setting things up, consider:

  • Which elements of your site you want to track – be it file downloads, or clicks on outbound links
  • Adopting a consistent and clear naming convention for the different actions, labels, and category options that are available to you when you set up event tracking. Every name you apply to categories, actions, and labels is shown in your tracking reports. If your naming doesn’t make sense, then your report won’t either.
  • Whether you want to set up automatic event tagging or manually tag the links on your site, if you have a lot of documents and page elements you want to track, it will be worth the time to set up auto event tagging and using Google Tag Events Manager.
  • There used to be two different ways to set up event tracking on a website for standard Asynchronous Google Analytics (ga.js) and Universal Google Analytics. The Asynchronous Google Analytics methods are now depreciated, so you should ignore any guidance that talks about using event tracking with ga.js.

Automatic event tagging, done with Google Tag Manager, will work in the following situations:

  • When users click on links
  • On submission of a form
  • After a specified visit duration or at timed intervals
  • When users click on any page element

If there are any other actions you want to track, you can set it up in Google Tag Manager. Here’s how to do it:

  1. Log into Google Tag Manager
  2. Select “Tags” from the left-hand side
  3. Create a new tag and select Universal Analytics as the Tag Type
  4. Set your Google Analytics Tracking ID
  5. Choose “Event” for the track type
  6. Set your Event Category, Action, Label, and Values. You can use Google Tag Manager variable names such as {{click url}}
  7. Set your triggers as required

Check that you’ve enabled the right variables selected for your event. Create a new tag in Google Tag Manager and change the track type to event. Configure your tag by adding the values for the category, action, label, and value. Select the event the tag will fire on.

If you want to do this manually rather than relying on the automatic approach, you’ll add a custom code snippet to the link code on the items you wish to track. When the item is clicked, the element is tracked and then shows as an event in Google Analytics.

The event tracking code is made up of four elements, defined by you, to describe the user’s interaction with your website:

  • Category: This required field is the name you give to the group of objects you want to track.
  • Action: This required field is the type of interaction, such as downloading a PDF.
  • Label: This optional field is useful for summarizing what the event is about, such as clicks on a navigation menu option
  • Value: This optional field can be used if you want to assign a numeric value to your file download.

When the event happens on your website, the input for those four attributes can be useful in helping you understand what users have engaged with on your page. This is why your naming conventions are important.

The event tracking code for an event tracked link in Universal Analytics looks like this:

onclick=”ga(‘send’, ‘event’, ‘Category’, ‘Action’, ‘Label’, ‘Value’);”

The code is placed after the href link, as shown in this example:

<a href=”” onclick=”ga(‘send’, ‘event’, ‘Category’, ‘Action’, ‘Label’, ‘Value’);”>

Why You Should Create Events in Google Analytics

The short answer is you should create events in Google Analytics simply so you can see more about your conversions and learn more about what your audience is interacting with on your website. You can use the data to make adjustments to your strategy to boost conversions.

You should always set up a custom event to track any call to action clicks, file downloads (so you can see how many people are taking advantage of your freebies, or which digital products are the most popular) and more. You can see when users scroll down the page, click on video’s play/pause/stop buttons, abandon a form field, share content, move their mouse, and more.

The more information you have about what people are doing on your website (and whether they’re doing what you want them to or not) the better you can tailor your SEO and digital marketing strategies.