Tracking Events for Google Analytics 4 (Including Google Tag Manager Option)
Disclosure: Some of the links are ‘affiliate links.' This means if you click on the link and purchase a product, I will receive a commission. There is no additional cost to you!
Tracking custom events for Google Analytics is an important part of measuring user behavior for your website or web property.
You can add code directly to your website or use a tag manager like Google Tag Manager to create tracking for custom events.
Whatever method you choose, you can gain insight on how users engage with specific elements on your website.
With Google Analytics 4, tracking events has taken on more importance as Google Analytics 4 uses an event-based data model. This is different from the Universal Analytics version of Google Analytics that uses a hit-based data model.
Data sent to Universal Analytics falls into one of several categories, including page view hits, event hits, e-commerce hits, and social interaction hits.
Google Analytics 4’s event-based model allows you to capture any interaction as an event. That means any data collected and seen in Google Analytics 4 is an event.
Tracking Events with the Universal Analytics Version of Google Analytics
For the Universal Analytics version of Google Analytics, you can use the Google Analytics: Universal Analytics event tags to capture data and report data for event dimensions in Google Analytics.
These event dimensions offer a hierarchical data structure and include the event category, event action, and event label.
The event tags require a trigger to define conditions for which the event tags will fire to track the specified event.
Tracking events for Google Analytics 4 is a bit different than tracking events for the Universal Analytics version of Google Analytics. There are two main options that don’t require writing code to configure event tracking for Google Analytics 4.
The first option is creating event tracking directly in the Google Analytics 4 interface, which is not possible in the Universal Analytics version of Google Analytics. The second option is using Google Tag Manager.
View the detailed video guide on tracking events for Google Analytics 4:
Tracking Events Using the Universal Analytics Version of Google Analytics
Tracking events for Universal Analytics involves setting values for the event variables–event category, event action, and event label. Google Analytics 4 does give you more flexibility by allowing you to track up to 25 event parameters with each event.
You can track more event data using event parameters to provide more context to the tracked events.
Automatically Collected Events in Google Analytics 4
When you install Google Analytics 4, it automatically collects and tracks common events. These include events such as pageviews and scroll. By default, these event parameters are automatically captured with every event:
Enhanced Measurement Events in Google Analytics 4
Enhanced measurement events include:
- Pageviews (required)
- Outbound clicks
- Site search
- Video engagement
- File downloads
You can simply enable tracking for enhanced measurement events in the admin section of Google Analytics and by clicking on data streams. Once you choose your data stream, it’s one of the first sections shown.
Enhanced Measurement admin section
You can enable all enhanced measurement events or toggle on the events you want to measure.
Enhanced Measurement events
Google’s Recommended Events for Google Analytics 4
Google recommends tracking specific events in Google Analytics 4 for various use cases, including eCommerce sites and gaming web properties. You can review Google’s recommended events and use the ones applicable to you.
Creating New Event Tracking Directly in Google Analytics 4
You can create event tracking directly in Google Analytics 4 by navigating to the Configure section in the left navigation in the Google analytics 4 interface.
Main events configuration page
There are a few rules to remember when tracking events in Google Analytics 4:
- Event names are case sensitive.
- Event names can only use letters, numbers, and underscores. This doesn’t include spaces.
Event tracking configuration screen
You can add up to 25 event parameters for each event you create.
Creating Google Analytics 4 Event Tracking Using Google Tag Manager
Before you can create event tracking in Google Tag Manager, you need to create a Google Analytics 4 configuration tag (VIDEO).
Tracking events for Google Analytics 4 using Google Tag Manager gives you more flexibility as well as the ability to use variables (VIDEO) for your event tracking.
Create tags for specific events you want to track and triggers to define the specific conditions for which your tag will fire.
Test and validate your event tracking by using the DebugView feature and the real-time reports in Google Analytics 4. If you configure event tracking in Google Tag Manager, you can still use the preview mode to test your tracking and adjust your tracking configuration.
Using Event Parameters In Google Analytics 4 Reporting
If you create new names for event parameters and you want to use that data in Google analytics 4 reports, you need to create new custom dimensions for those parameters.
Define new custom dimensions in the Configure section from the left navigation. There’s a page for custom definitions where you can create new custom dimensions.
Custom definitions section
If you’re looking for Google Analytics support, take a look at the help available at Fiverr.
AUTHOR: Isaiah Stone
Isaiah Stone is a digital analyst in the consumer goods industry. He is fascinated with productivity, business growth, and accomplishing more.