How to successfully Track Events with Google Analytics 4

Introduction

Google Analytics 4 is a powerful analytics tool that was introduced as an event-based analytics solution. This means that every user action, from page views to purchases, is recorded as an event. With so many new features and capabilities, it can be overwhelming to understand how to effectively use this tool.

To help users navigate this new analytics landscape, a comprehensive blog post and video tutorial have been created. This blog post will focus specifically on how to track events with Google Analytics 4 and Tag Manager.

While we could write additional paragraphs to pique your interest and captivate your attention, this post is already quite lengthy and contains a wealth of valuable information and tips. Additionally, it's important to note that this post primarily focuses on the setup process, which is essential for ensuring accurate event tracking.

By following the step-by-step instructions and best practices outlined in this blog, you'll be well on your way to effectively tracking user behavior and gaining valuable insights into your website's performance. With Google Analytics 4 and Tag Manager, you can take your analytics game to the next level and make data-driven decisions that drive real results.

Categories of Events in GA4

In GA4, events are divided into four categories, each with a different purpose and level of customization. Let's take a closer look at these categories:

Automatically collected events

These are the most basic events that GA4 tracks automatically without any setup required. Examples of automatically collected events include pageviews, screen views, and session duration. You can view these events in the default reports without any additional configuration.

Enhanced Measurement events

These events are also tracked automatically, but they require some additional setup in order to work properly. Enhanced Measurement events include interactions such as scrolls, clicks on outbound links, and downloads. You can enable Enhanced Measurement in GA4 by adding a few lines of code to your website or app.

Recommended events

These events are pre-defined by Google and are recommended based on your website or app's category. Examples of recommended events include video engagement, social interactions, and search queries. These events use a consistent naming convention and can be easily added to your tracking setup.

Custom events

If none of the above categories fit your specific tracking needs, you can create custom events. Custom events allow you to define your own event names and parameters, giving you complete control over what you track. To create a custom event, you'll need to add some code to your website or app and define the event details in the GA4 interface.

Now that we've covered the four event categories in GA4, let's take a closer look at how to plan your event tracking setup. The following steps can help you decide which events to track and how to structure them:

Check if the event is automatically collected

Before creating a custom event, make sure that the event you want to track isn't already being collected automatically. You can find a list of automatically collected events in the GA4 documentation.

Check if the event is an Enhanced Measurement event

If your event isn't automatically collected, check if it falls into the Enhanced Measurement category. Enabling Enhanced Measurement can give you valuable insights into user interactions that would otherwise go unnoticed.

Check the recommended events

If your event isn't automatically collected or an Enhanced Measurement event, check if it falls into one of the recommended event categories. These events are pre-defined by Google and can be easily added to your tracking setup.

Create a custom event

If none of the above categories apply to your event, you can create a custom event. Custom events allow you to track any user interaction and give you complete control over the event name and parameters.

By following these steps, you can ensure that your GA4 event tracking setup is well-organized and provides meaningful insights into user behavior.

#1. Events Automatically Tracked by GA4

The blog is focused on web tracking and this guide follows suit. By default, GA4 tracks certain events without any additional setup required. The following is a list of automatically captured events for websites:

first_visit: When a user visits a website or launches an app for the first time.

session_start: When a user begins a new session on the app or website.

user_engagement: This event fires 10 seconds after a visitor has stayed on a page. It may also periodically fire while the app is in use. More information on this event is available here.

page_view: This event is not listed here as it is included in the Enhanced Measurement section. For a list of app events, refer to this link.

#2. Events Tracked via Enhanced Measurement

When setting up a web data stream in GA4, there is an option to enable Enhanced Measurement. This feature helps marketers to collect as many events as possible without needing the help of developers or configuring Google Tag Manager. To enable Enhanced Measurement, go to Admin > Data Streams > Select the web data stream, and you will see a section called Enhanced Measurement.

Tracking events in GA4

Enabling and Disabling Enhanced Measurement Events

Enhanced Measurement is automatically enabled, and it tracks specific events when you set up Google Analytics on your website. Here are the events that Enhanced Measurement tracks by default:

  • Page views (event name: page_view)
  • Scroll (event name: scroll)
  • Outbound link clicks (event name: click with the parameter outbound: true)
  • Site searches (event name: view_search_results)
  • Video engagement (events: video_start, video_progress, video_complete)
  • File downloads (event name: file_download)
  • Form tracking (events: form_start, form_submit)

If you want to disable or enable these events individually, you can do so by clicking the gear icon in the Enhanced Measurement section. Then, click on the toggle buttons to turn the events on or off according to your preference.

In addition, some of the events can be customized. Let's take a short look at each event and its settings.

page view. When a new page loads or the URL of a page changes without reloading the page, this event is transmitted to GA4 (a.k.a. history change events)

Scroll 

This event is sent to GA4 when a visitor scrolls below the 90% threshold of the page height.

This event can help you understand how engaging your content is and how far visitors are scrolling down your page.

Click Event

This event registers in GA4 when a visitor clicks on an outbound link that redirects them to another domain.

An additional parameter "outbound" with the value “true” is also passed to GA4.

Other parameters like link_classes, link_domain, link_id, and link_url are also sent along with this event.

If your business operates on several domains, the outbound click event will fire regardless.

To prevent this, you need to go to Tagging Settings > Configure your domains and enter the domains of your business that shouldn't trigger the outbound link click event.

view_search_results

This event is triggered when the page loads, and its URL contains a query parameter, such as q, s, search, query, or keyword.

Up to 10 query parameters can be included and passed back to GA4.

This event can help you understand how visitors are searching on your site and what they are looking for.

video_start, video_progress, and video_complete

Enhanced Measurement may detect interactions with your website's embedded YouTube video and transmit "video_..." events to GA4. But, the URL of such embedded YouTube video players must include the?enablejsapi=1 argument. And it is not always possible to find this information on websites. Additionally, here's a list of reasons why Youtube video tracking might not function out of the box, requiring some tweaking.

Because of these intricacies, I'd argue that automatic video tracking will not work in as many scenarios as you might assume, hence I'd recommend performing it with GTM instead.

file_download

When a link with one of the following file extensions is clicked, this event is reported to GA4. .pdf, .xls, .xlsx, .doc, .docx, .txt, .rtf, .csv, .exe, .key, .pps, .ppt, .pptx, .7z, .pkg, .rar, .gz, .zip, .avi, .mov, .mp4, .mpe, .mpeg, .wmv, .mid, .midi, .mp3, .wav, .wma. To put it another way, if the link opens/downloads a file. It is now difficult to add new extensions to the list in the GA4 interface.

form_start and form_submit

When a website user interacts with or successfully submits a lead form throughout their session, these events are logged. When GA4 is launched, it saves parameters such as form id, form name, form destination, and form submit text.

Once you've decided which events to measure, click Save in the top right corner and then check that Enhanced Measurement is enabled (the toggle is blue).

Your Google Analytics 4 will begin automatically tracking the occurrences from that point forward.

#3. Recommended events

The following is a list of recommended events that can be useful for your event planning process. Before picking a name and parameters for your event, it's important to take a look at the automatically tracked events, the Enhanced Measurement events, and the recommended events list. Here are some recommended events provided by Google:

Generic: This list of recommended events is applicable to all properties.

Online Sales: This list of recommended events is specifically designed for events related to online sales.

Games: This list of recommended events is designed for events related to gaming.

So, it's best to start with the recommended events list to find the most relevant events for your event planning. Here’s Google’s help page on recommended events.

#4 Custom Events

Google Analytics provides a wide range of automatically tracked events, Enhanced Measurement, and Recommended events. However, if you want to track an event that is not included in these options, you can create your own custom events. Custom events enable you to track specific user actions on your website or app and gather data that is relevant to your business goals.

Creating Custom Events

Creating custom events in Google Analytics is easy and involves the following steps:

Define the event you want to track

You need to decide what user action you want to track, such as clicks on a call-to-action button or menu links.

Choose an event name

You will need to come up with a unique event name for your custom event. For example, if you want to track clicks on a call-to-action button, you could name the event call_to_action, cta_click, cta, or anything else that makes sense to you.

Set up the event tracking code

You will need to add the event tracking code to your website or app to start collecting data for your custom event.

Let's consider an example of tracking clicks on menu links on a website. To create a custom event for this, you can follow the steps above and name the event menu_link_click. Then, you can add the event tracking code to the menu links on your website.

Custom events in Google Analytics provide you with the flexibility to track specific user actions and collect data that is relevant to your business goals. By creating custom events, you can gain valuable insights into how users interact with your website or app and optimize your marketing strategies accordingly.

Testing Events in GA4

After configuring your events, it is essential to test them in Google Analytics 4 to ensure they are tracking correctly. This can be done easily using the DebugView feature built specifically for debugging GA4 data.

Steps to Test Events in Google Analytics 4:

  • Log in to your Google Analytics 4 account
  • Navigate to the Admin section
  • Click on the DebugView option
  • Once you access DebugView, you will be able to see real-time event data as it is sent to GA4. This will help you to identify any errors or issues with your tracking implementation.
  • Use the information from DebugView to fine-tune your tracking implementation and ensure accurate event tracking in the future.

Debugging is an essential process when working with Google Analytics 4 (GA4) to ensure that the data is collected correctly. It's crucial to know where to perform the debugging and understand the differences between the GA4 Debug Mode and the GTM Preview and Debug Mode.

Here are the different options to enable the GA4 Debug Mode:

Use the GA Debugger Chrome Extension: Install the extension and click its icon to see the ON ribbon. You'll start seeing events in DebugView.

Send a Debug_mode Parameter with an Event: Include the Debug_mode parameter in the event code to see it in the DebugView.

Enable GTM Preview Mode: In GTM, you can enable the Preview mode on a page you're debugging to see the events in the DebugView.

To send the Debug_mode parameter with an event in GTM, open the GA4 Configuration tag and add the following parameter:

Key: debug_mode

Value: true

If the debug_mode parameter contains any value, the event will show up in DebugView. If you are using a hardcoded gtag.js, here are the instructions for including the debug_mode parameter.

But since we are working with Google Tag Manager, having the GTM Preview mode enabled automatically sets the debug_mode to true, thus the data will start appearing in the GA4 DebugView.

When you start seeing data in the DebugView, you can click on every individual event to list out the parameters it passes along.

Conclusion

Google Analytics 4 (GA4) has changed the way events are tracked on websites and apps. Now, everything is an event, even pageviews. This means that tracking events with GA4 requires a different approach than before. 

Here is the recommended process for tracking events with GA4:

  1. Check the automatically tracked events and what Enhanced Measurement has to offer. GA4 automatically tracks some events, such as pageviews, scrolls, and clicks. Enhanced Measurement offers additional events that can be enabled in the GA4 settings. Check these events first to see if they meet your tracking needs.
  2. If an event you want to track is not listed in the automatic tracking or Enhanced Measurement, check the recommended events and try to use their names and parameters. GA4 provides a list of recommended events and parameters that can be used to track common actions on websites and apps.
  3. If none of the recommended events match your needs, then create a custom event. GA4 allows you to create custom events with custom parameters that can be tailored to your specific tracking needs.

Key Takeaways

Event Category, Event Action, and Event Label fields are no longer available in GA4. Custom parameters can be created if needed.
The total number of events that can be sent to GA4 is unlimited, but the list of unique event names cannot exceed 500 per visitor/user.
Enhanced Measurement events do not count towards the limit of 500 unique event names per visitor/user.
Up to 25 parameters can be sent with a single event, but to see a parameter in the GA4 report, it must be registered as a custom definition. A limit of 50 registered custom dimensions and 50 registered custom metrics per property applies.
Events can be created and modified in the GA4 interface, but there are limits to the length of names and parameters.
Google Analytics 4 DebugView can be used to test incoming events at a granular level.

A careful approach is required to track events with GA4, taking into account automatic tracking, Enhanced Measurement, recommended events, and custom events.

By following the recommended process and being aware of the available options and limits, effective event tracking can be achieved on websites or apps using GA4.

You can also check out our blogs on the key features of GA4 and GA4- From a Business owner’s perspective to better understand GA4 and adapt timely as well as effectively to GA4. Alternatively, you can also check out Our Offerings in terms of GA4, if you’d like to explore the option of us coming in and doing it for you.

Get in touch with us

Don’t worry about making a large commitment without knowing much about what we can offer. Book a call with us, help us understand your business and then we’ll offer you a free ad account audit and an actionable marketing strategy. Like the strategy? Hire us! Don’t want to hire us? No problem. The strategy is on us!
Book Intro Call

Best Part?

Are you a digital business looking to win the BFCM (Black Friday Cyber Monday) this Thanksgiving? Get in touch with us and we’ll send over a free guide on the best BFCM myth-busters!

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.