Meet Your South Africa: YouTube strategy.

1.6 million
Video views.

How can custom events enhance and future proof your tracking?

May 12, 2022 / Reading Time: 3 minutes /
Rhodri Lloyd

Following on from recent news regarding the impending deadline for Universal Analytics (UA) reporting, the migration to Google Analytics 4 (GA4) will soon be necessary for most websites. This means that now more than ever it is essential to review your existing tracking setup. Primarily this will help ensure that you are tracking what you should be tracking, to align with your commercial objectives. Secondary to this, with the upcoming migration from UA to GA4 considered, you will need to establish what needs to be done to future proof your tracking setup.

One way you can look to future proof your tracking setup is by using custom events to track conversions rather than destination URLs or “Thank You” page URLs.

Data studio report

In this blog post we have looked to answer a number of questions, with the aim of introducing custom events, how they are setup and why they are particularly relevant for GA4.

Why should we move away from destination URLs in tracking goals?

When putting together a tracking implementation plan for our clients, our approach is to create and use custom events to track events and conversions on websites. In the past, it was common practice to create a goal based upon thank you page URLs. In other words, you monitored the number of page visits to thank you pages and order confirmation pages URLs, to track when users completed the higher priority actions on your website.

However, through our own experience reporting on clients’ websites, we have found there are often some inaccuracies when we are reliant on such URLs to track conversions, especially for ecommerce websites. With these issues in mind, under the following headings we have provided more details on the specifics of what a custom event is, how to set them up, and how to use them for your reporting.


What is a custom event?

A custom event allows you to track more specific user actions that are not tracked by default in UA or GA4. Google Analytics already reports on metrics such as ‘bounce rate’ and ‘session duration’, but if you wanted to track the number of clicks into a specific CTA button or form completions for example, you would need to setup events through Google Tag Manager (GTM), to then view the metrics for such user actions in UA or GA4.

At a more basic level, GTM will allow you to track more straightforward user actions such as button or links clicks. However, if you wanted to measure something more specific (such as form completion, utilising an on-site tool, the users selections in a dropdown form field, or if the user’s logged in status), you would need to create a custom event to track these.

With GA4 specifically, the platform runs solely on events, rather than sessions or page views. It does allow you to automatically track some initial user actions through enhanced measurement. However, if you wanted to track more specific or advanced user actions on your website (as per the examples above), you would need to setup custom events in GTM.

How do you setup a custom event?

Our recommended approach to setting up a custom event is to create the custom event as a trigger and then the relevant event tag in GTM. You can then work with a developer who can manually hard code the custom events and related event parameters within the code on your website. As we covered in more detail in an existing GTM blog, we would strongly recommend that event tags are created in GTM to allow for easier tag management, and to reduce the amount of development resources and costs.


What is a dataLayer variable?

The use of custom events also provides a further opportunity to create and use dataLayer variables (DLVs). These variables essentially can pull out additional information when a user completes an action on your website. Whereas a custom event could be used to solely track a successful form submission for instance, a DLV can then be used to pull out specific information from the form, such as the ‘enquiry type’ dropdown or if a checkbox is ticked or not. In addition, they can be used to pull out specific information from an online purchase, such as the product category or price. For example, for an enquiry form on an estate agents website, you could use DLVs to track the enquiry type (such as sales or lettings) and then the property location.


Why are custom events relevant for GA4 to track conversions?

The use of custom events goes hand in hand with the data model used by GA4 to report through events and conversions only. As we have spoken about extensively in our recent ‘What is GA4 blog posts’ (part 1 and part 2), all user activity (including page views) in GA4 is tracked through events, with higher priority events then able to be tracked as conversions. There are a number of different ways you can setup events, directly through GA4 and also through GTM, ranging from tracking specific clicks on a page through to tracking form submissions and ecommerce purchases.

If you don’t already have custom events on your website and want to create custom events solely for use with GA4, we would very strongly recommend that moving forward you look to use GTM to create your event tags, to allow for improved tag management and a lesser need for development time and resources.

If you would be interested in discussing how you can use custom events to enhance your tracking and reporting capabilities, or would simply like someone to review your existing tracking setup, get in touch.

Speak to a specialist about your tracking today.

Share this

social_facebook Share via Facebook logo-twitter-glyph-32 Share via Twitter Share via Email

Ways we can talk...