Data You Should Be Tracking Using Google Analytics Custom Events

Google Analytics Custom Events

Out of the box, Google Analytics already tracks a bunch of really useful data points. What the default setup lacks, though, is context and events that are specific to your website and business.

Custom Events provide a perfect solution for adding context and tracking more specific user actions. In this article, we are giving you a good amount of ideas for custom events you should implement on your own and/or your clients’ websites.

This post is divided into sections by different event categories so you could skip the ones that are not relevant for you.

Clicks

For almost all websites, the most common user interaction is a click. By default, Google Analytics isn’t very good at tracking them. Let’s see how we could improve this situation.

Navigation clicks

Tracking usage of the main menu, sidebar and other navigation elements is critical. This is how your visitors explore your business and move in the funnel.

Detecting navigation interactions is easy with Google Tag Manager and sending data to Google Analytics works as with any other event.

Since there may be several navigation elements containing links to the same page, it is important to also pass the information about which navigation was used. For example, you might a have link to your blog both in the header and in the footer.

Recommended event parameters:

category: click
action: top-navigation, sidebar etc.
label: link text
non-interaction: false

CTA clicks

Tracking clicks on all of your CTAs (call to actions) is extremely important if you have more than one CTA on a single page pointing to the same location (i.e. long-form sales pages).

Don’t forget that buttons like “Get a Quote”, “Add to Cart” and “Checkout” are also CTAs.

Setup is the same as with generic click tracking using GTM.

Recommended event parameters:

category: click
action: CTA
label: text (and index the same CTA appears multiple times)
non-interaction: false

Outbound link clicks

Also known as tracking website exits, this custom event tells you exactly to which external pages people navigate from your site.

Again, setting this up is quite easy with GTM.

Recommended event parameters:

category: click
action: outbound link
label: link URL - link text
non-interaction: false

File download clicks

Doesn’t matter if you provide whitepapers, ebooks, PDFs, or other types of downloadable files, you should be tracking how often they get downloaded.

There are some really good tutorials online but we recommend setting it up using Google Tag Manager. A simple “just links” click trigger with a regex that matches desired filetypes should work just fine.

Regex Example:

\.(pdf|docx)$

Recommended event parameters:

category: click
action: download
label: filename / link text
non-interaction: false

Rage clicks

Visitors rage clicking on certain elements on your website is a good indicator of a UX error. For example, people may click on a blue text that is not a link or on an image that has no click functionality.

We have a separate blog post about tracking rage clicks using Google Tag Manager and Google Analytics.

Recommended event parameters:

category: click
action: rage click
label: element selector
non-interaction: false

Button clicks

Your website is likely to have all sorts of clickable buttons. There might be some other ways for you to get an overview of the usage of the features related to those buttons but knowing how many clicks each button received definitely helps.

Some ideas for which buttons should be tracked:

  • Add to wishlist/favorites
  • Add/remove item from cart
  • Update cart
  • Continue shopping
  • Log in/out
  • Register
  • etc.

Recommended event parameters:

category: click
action: button
label: button text/description
non-interaction: false

Form Interactions

When it comes to tracking forms, I would like to recommend a few good articles by Simo Ahava that cover everything you need for getting started.

Since forms are the most important part of many websites (i.e checkout, lead form etc.) you should really nail tracking them correctly.

A/B Testing

Experiment and Variation

Most A/B testing tools provide some sort of integration with Google Analytics. Most of them, though, are using custom dimensions. A problem with custom dimension based integration is that you need to make sure that the dimensions aren’t overlapping between experiments because otherwise, you might end up overwriting the dimension value for some experiments.

What we recommend having, besides the default integration, is a secondary event-based integration. That is, sending a custom event for every running experiment in a following format:

category: ab testing
action: experiment ID
label: variation number
non-interaction: true

PS! One event per experiment-variation combination.

This gives you raw information about each experiment and variation that the visitor saw. You can easily use this information in your custom segments or reports.

Every testing has a bit different solution for exposing experiment data to the front-end but here are a few links that should be helpful.

  • VWO – instead of custom dimension, send this data using custom event action and label.
  • Google Optimize – this allows you to get experiment data to the datalayer, now send it using a custom event.
  • Optimizely X – access data about live experiments using Javascript.

Google Optimize Anti-Flicker Snippet timeout

If you have any experience with JavaScript-based A/B testing and/or personalization tools you know that flicker can be a real headache.

In case your tool of choice is Google Optimize, you should be using their official anti-flicker snippet to minimize the flicker effect.

We wrote a full separate article on Tracking Optimize Anti-Flicker Snippet Timeout in Google Analytics.

Recommended event parameters:

category: optimize
action: snippet timeout
label: true/false
non-interaction: true

Scroll depth

Whether you are working with a blog, some landing pages or any other page that is longer than a fold, you want to know how far down do the visitors scroll.

It used to required some custom Javascript but now, tracking scroll depth is a built-in feature of Google Tag Manager.

Recommended event parameters:

category: scroll
action: scroll depth threshold
non-interaction: false

Social interactions

While Google Analytics has a dedicated feature for tracking social interactions, having this data in custom events gives you more flexibility in reporting.

There is a really thorough blog post about tracking social interactions using Google Tag Manager – although, if you want something simpler, tracking clicks on your social icons is a good starting point.

Recommended event parameters:

category: social
action: share/like/follow
label: social platform
non-interaction: false

Video events

Doesn’t matter if it’s a sales video, a video that explains how your product works or a tutorial – you do care about how many people start the video and how far through will they make.

Google Tag Manager provides a really easy solution for tracking YouTube videos but tracking others such as Vimeo is completely doable as well.

Recommended event parameters:

category: videos
action: start/pause/percentage
label: video id
non-interaction: false

Errors

No matter how good your site is, there will always be errors. Since errors are directly related to bad user experience, tracking them is absolutely crucial.

The first step here should be sending your Javascript errors to Google Analytics. Next, consider sending other errors like popup alerts and system errors as well.

Recommended event parameters:

category: error
action: error message
label: feature or other relevant information
non-interaction: true

reCAPTCHA bot score

Google Analytics does have a simple bot-filtering system in place but it comes nowhere near catching all the bots that visit your site. Even tools like reCAPTCHA by Google can’t usually say for sure whether a visitor is a bot or a human but they can give you a score (from 0.1 to 1). Simo Ahava has put together a great tutorial for tracking the reCAPTCHA both score using Google Analytics custom dimensions.

Recommended event parameters:

category: reCAPTCHA
action: reCAPTCHA answer
label: reCAPTCHA score
non-interaction: true

Don’t forget to test whatever new custom event you add to your setup.

Should you have any questions related to custom events in Google Analytics, shoot them in the comments below.

PS! If you need help with implementing custom events, you can hire us to help you out!

Photo by Annie Spratt on Unsplash

4 thoughts on “Data You Should Be Tracking Using Google Analytics Custom Events

  1. I’ve worked for 3 SEO agencies, and NONE of them track this kind of data, which is really disappointing. In fact, GTM is RARELY used.

    Would you say that it is impossible to be a “data driven” agency without the use of GTM?

    1. Well, there are alternatives to using GTM – doing everything in the source code, using another tag manager etc. But there is no alternative to proper tracking setup and good quality data.

  2. Amazing work! This is by far the best list of custom events to install for Google Analytics. Since I’m doing a lot of fresh setups, I am definitely going to bookmark this post.

  3. Pingback: Most Common Google Analytics Configuration Issues (In-Depth Overview) - Reflective Data

Leave a Reply

Your email address will not be published. Required fields are marked *

Sign up for Reflective Data

5,000 sessions / month ×

Please enter your email

Submit

After submitting your email, we will send you the registration form.