Close this search box.

How to Track Events with GA4 and Google Tag Manager

Last Modified on January 18, 2024

Remember when Google announced that it is going to be retiring our beloved Universal Analytics next year in July? 

Since then, more and more marketers, companies, and well pretty much everyone has become super interested in implementing GA4, and rightly so!

GTM For Beginners

Sign up to the FREE GTM for Beginners Course...

So, how do you track events with GA4 and GTM? What are the things you should be aware of? Are there any limits? 

You’ve heard that everything is an event in GA4. So, why track it? So many questions and confusion, but don’t worry we’ve got your back!

This post will provide a solid base for understanding GA4 events and tracking them.

Some of the major topics we’ll cover are:

If you are planning to migrate to GA4 or have to migrate multiple client accounts to GA4, have a look at our handy GA4 migration guide.

Now, without further ado, let’s dig in!

How Do Events Work in GA4?

The data model in GA4 works differently than UA ( Universal Analytics) and provides you with more flexibility in terms of how much information you want to collect and what is mandatory.

The good news is that since every interaction is an event, we no longer have to worry about sessions and pageviews because even a pageview is measured as an event.

GA4 events come with parameters that can provide us with much more detail and it depends entirely upon the person who is setting them up and how much information they want. 

In UA, there were the following four event parameters:

  • Event Category
  • Event Action
  • Event Label
  • Event Value

In contrast, GA4 does not require you to fill in that information and as long as you have an event name (required) you can completely skip the event parameters or send several event parameters if you want to. 

GTM event tag for GA4 showing that Event Name is required and that we can add multiple parameters for an event

🚨 Note: There is a limit of 25 custom parameters that you can send with an event.

Different Types of Events in GA4

In short, GA4 has four types of events and they all have their specific use-cases. These events are:

  1. Automatically collected 
  2. Enhanced measurement
  3. Recommended
  4. Custom

1. Automatically Collected Events

Once you set up your GA4 on the website or the GA4 SDK on your app, these events are collected automatically without any further coding or tagging.

Here’s a comprehensive list by Google that also includes enhanced measurement events.

A few examples of automatically collected events include session start, first visit, and user engagement.

Wondering why a session start is an event? Well, remember everything is an event in GA4.

2. Enhanced Measurement Events

These events are collected once you enable the enhanced measurement events in GA4 and can be helpful in measuring the actions that would previously require you to set up separate events.

These events are triggered in GA4 for certain predefined actions that a visitor takes on your website.

Enhanced measurement events as seen enabled in the GA4 admin panel

Let’s talk briefly about these events and what else you can do with them.

  • Page views are turned on by default and work every time a user reloads the page
  • Scrolls logs an event when the user reaches the bottom of the page (you won’t see it for 25%, 50%, or 75% scroll depth)
  • Outbound clicks event tracks the clicks that lead to external websites

💡 Top Tip: For cross-domain measurement, you can go under Additional Settings → More Tagging Settings → Configure your domains and add all your domains.

  • Site search event is triggered every time a visitor performs a search on your site based on a query parameter
  • Video engagement events like video starts, progression, and ends will be logged automatically when visitors view embedded videos on your website
  • File downloads will track anytime a user downloads a common type of file extension. Scroll down on this page to view the full list

If you want, you can also turn off any individual event or go into their advanced settings from the same settings section.

Option to turn off or configure advanced settings of enhanced measurement events in admin panel

In advanced settings, you can toggle any event you don’t want to track.

Settings to turn off or configure advanced settings of enhanced measurement events in the admin panel

3. Recommended Events

These events are recommended by GA4 in the events report and do not trigger/track unless you manually set them up using exactly the same event name and parameters as recommended by Google.

While GA4 event tracking is quite flexible with names and what events you can track, these events require you to follow Google’s recommendations for them to trigger and track properly. 

These recommended events are grouped under three business verticals:

  1. All properties (generic)
  2. eCommerce / Online Sales
  3. Games

You can view the list of these events here. These events show up in the Events report as recommendations.

If you are looking to track the events that already exist in any of these verticals, it’s better to use the event names and parameters Google wants us to. This would ensure we have proper tracking in place and we will receive quality data.

4. Custom Events

What if you want to track form submissions or button clicks but they do not fall under any of the above three categories? It would be good to start with the custom events in GA4.

Custom events need to be set up manually, but you have to use your own event names. We will be looking at how to set these up in the next section.

Tracking Events with GA4 and GTM

🚨 Note: If you haven’t connected these tools already, check out our guide on how to install GA4 with GTM.

Understandably, you won’t have to do a lot for automatic and enhanced measurement events.

So, we will show you how to manually add custom events. The same process would also work for the recommended events as long as you use the event names and parameters mentioned by Google here.

Let’s say you want to track CTA button clicks on your website. We will start by firing up your GTM account and creating a new tag. 

Choose the Google Analytics: GA4 Event tag type in the template gallery.

Choosing the GA4 Event tag type when creating a new tag in GTM

Next, select the Configuration Tag. Assuming that you have already installed GA4 on your website, you can choose your GA4 pageviews tag here and add an Event Name.

Selecting the Configuration Tag when setting up a new tag in GTM
Selecting the Configuration Tag when setting up a new tag in GTM 2

If you haven’t set up the configuration, you can select the None – Manually Set ID option and enter your GA4’s ID in the Measurement ID section.

This would be equivalent to your Universal Analytics tracking ID found in the admin settings panel.

Adding GA4 Measurement ID if the chosen configuration tag is None-Manually Set ID
Adding GA4 Measurement ID if the chosen configuration tag is None-Manually Set ID 2

Next, you need to enter event parameters (similar to Universal Analytics). How you set these up depends on what information you want to send with your tracking to your GA4 account.

For this example, we want to know what’s the text of the button. We will set button_name as the parameter name and select the button’s value from the already available Click Text (Auto-Event Variable).

Selecting the Click Text from Choose a variable setting for the parameter value of our event

Now your tag configuration section would look something like this:

Tag configuration section with Configuration Tag, Event Name, Parameter Name, and Value setup
Tag configuration section with Configuration Tag, Event Name, Parameter Name, and Value setup 2

We have now successfully configured the tag, but still have to choose a trigger for our event to fire up. Click on the triggering area and choose All Clicks trigger.

Choose All Clicks to trigger for our button’s triggering criteria

Then, choose Some Clicks for the triggering condition, as you don’t want your tag to fire for all the button clicks. Enter Click Classes that are unique to the button(s) you’re tracking. 

Choosing Some Clicks for Click - All Elements trigger configuration and entering Click Classes

Depending if all the buttons share the same classes and you only want to track a few of them, you might have to further narrow down by adding more filters like Click Text or Click ID that capture only that specific button.

Adding more filters to the trigger configuration to be more specific in tracking. Click Classes and Click Text together can accomplish that

After adding the trigger, save your tag and check in the preview mode of GTM if the new tag is firing. 

GTM debugging window showing that the tag has fired successfully

We can now also verify if GA4 is correctly receiving the event found under ConfigureDebugView. Find if the event we just set up is showing up.

GA4 DebugView showing the event that we tested in GTM’s preview mode
GA4 DebugView showing the event that we tested in GTM’s preview mode

🚨Note: We’ve also created a GA4 event tracking checklist which will ensure you’re setting it up correctly.

Custom Definitions in GA4

Now that we are receiving the event in GA4, we need to set up our custom definitions for this event. Doing so will ensure that we can see it under the Events report.

You can create custom definitions for any event you are sending to GA4. Go to ConfigureCustom Definitions → click on the Create custom definitions button

How to get to the Custom definitions section in GA4 to create custom definitions for our events

Now, we can add our event’s details for it to show up in the Events report. This prompt requires us to add four things:

  1. Dimension name – This can be anything you want to show up in different reports later on.
  2. Scope (User / Event) – We will go with the event scope since we want all events to be tracked. If we wanted to get data for users, then we would select User. Once selected, the scope cannot be changed later on.
  3. Description – This is an optional field, but if you want to add more information for other people, then this is the place.
  4. Event parameter – This should be the same event parameter we used in GTM and the most important part if you want to pull in the correct data. Therefore, we will use button_name here.
Creating custom definitions in GA4 and entering the details like dimension name, scope, description (optional), and event parameter

And there you go! Now we will wait for another 24-48 hours for our event to show up on the Events report, where we can toggle the Mark as conversion switch.

Events under Configure section showing events we can Mark as conversion by toggling the button

This process is similar to how we add Event Category, Event Action, and other optional fields in Universal Analytics and then save it as a goal.

Creating and Modifying Events in GA4

What if the event you are marking as the conversion is collecting several CTA buttons, and you only want to count conversion when only a specific button is being clicked? 

If you’re already sending a dedicated event with GTM, then you don’t need to do anything. 

But what if you’re tracking all the button clicks and want to count only CTA button clicks as conversions? 

The simple solution would be to create a new event from your existing event by narrowing its scope.

You can simply go to ConfigureEventsCreate event and configure a new event from your existing events

Create event button found in Configure then Events section

In the configuration, we need to enter the name of the event that we want to display, but it cannot have spaces. After that, we need to add the details of the event we are looking for and the conditions for this new event to be created. 

In this case, we want a new event to be created if the event value contains cta- in it. For Parameter configuration, if we want the same values to be copied, then we can leave the Copy Parameters from the source event checked. 

Otherwise, enter the new parameter and value along with the old one. Add another row, but leave the new value field empty to remove any parameter.

Create new events from the existing events configuration section by matching existing event conditions and adding the parameter values
Create new events from the existing events configuration section by matching existing event conditions and adding the parameter values 2

Save it and wait 24-48 hours for these events to show up. Don’t forget to mark them as conversions once they show up.

If you want to modify an event you created previously, you can simply go to ConfigureEventsModify event and configure your modifications.

Modify the event button found under Configure then Events section

Modifying the event configuration works the same as creating a new event except that you can give any name without worrying about the spaces.

🚨 Note: Modifications don’t apply to any past data and there is a limit of 50 modifications for each property

Modifying existing events from modify events configuration section by matching existing event conditions and adding the new parameter values

If you don’t want to wait 24-48 hours for the events to show up as conversions, you can set them up instantly by going to ConfigureConversionsNew conversion event button by using the same name you used for your event.

Creating a conversion instantly under Configure then Conversions using the same event name used in the modification or creation of a new event


What are the different types of events in GA4?

GA4 has four types of events:

1. Automatically collected events: These events are collected without any additional coding or tagging once G