Last updated: 26 December 2024

GA4 Event tracking via Google Tag Manager

Nick van Maaren
Freelance Ads & Analytics expert

In this article, I will guide you step by step on how to set up event tracking in Google Analytics 4 via Google Tag Manager.

1. What is event tracking?

Event tracking means measuring specific actions on your website within Google Analytics. In addition to tracking page views, event tracking also lets you measure the actions visitors perform. These actions are called Events.

For example, actions like submitting a form, clicking on a particular button or link, watching a video, etc. If you run an online store, you can also track events like transactions, add-to-carts, remove-from-carts, etcetera. However, these fall under “E-Commerce tracking,” which I will cover in a future blog.

Accurate tracking of actions on your website is essential for effective digital marketing. It provides insights into:

  • How much your website generates overall.
  • How various online channels contribute to your online results.
  • The paths visitors follow on your website before performing specific actions.
  • And much more.

2. Difference between Events and Key Events

Under “Configure” in Google Analytics 4, you’ll see Events and Key Events (formerly known as Conversions). It’s important to understand the difference between the two.

A Key Event is an Event representing a completed activity that’s significant for your business. Some Events are inherently more important than others. It’s basically a selection of events that you deem more important.

Setting up Key Events is important as it will provide you with new data. The main difference is that GA4 will assign a Default Channel Group to Key Events and will track the paths leading up to Key Events (formerly known as Conversion paths). Also, Key Events can be imported to Google Ads and will be available as a separate statistic in Looker Studio. Therefore, if you mark an event as a Key Event it will give you more possibilities when analyzing the data.

Later in this blog, I’ll explain how to mark Events as Key Events.

3. Important things to know before we continue

If you have experience with Conversion Goals in Universal Analytics, note that these are called Key Events in GA4.

  • In Universal Analytics, a Conversion Goal was measured only once per session. In GA4, a Key Event counts every time the action occurs.
  • In Universal Analytics, an Event consisted of several fields (Category, Action, Label, and Value). In GA4, you primarily work with just one field (Name). However, you can send custom parameters to GA4, though this is beyond the scope of this article.
  • Universal Analytics allowed up to 20 Conversion Goals. In GA4, you can mark up to 30 Events as Key Events. Think carefully about which Events you want to set up as Key Events.

Additional notes:

  • Avoid using spaces in Event names, as you cannot create Key Events with spaces in their names.
  • An Event can only be marked as a Key Event if it has been triggered in the selected time period. Alternatively, you can manually create a Key Event with the same name (as long as there are no spaces).
  • Marking an Event as a Key Event does not include historical data. For example, if an Event has been triggered 10 times before being marked as a Key Event, the Key Event count will start at 0.
  • Only Key Events can be automatically imported into Google Ads—not regular Events.
  • You need Editor permissions to manage Events and Key Events in GA4.
  • The default retention period for Events in GA4 is 2 months, but you can extend this to 14 months under Admin > Data Settings > Data Retention.

4. Which events should you track?

Before diving into setting up Events in Google Analytics, take a moment to decide which Events and Key Events you want to measure. Every website is different, so go through your site and create a list of actions you want to track. Then determine which Events are critical enough to be tracked as Key Events (keep into account that only Key Events will give you insight into conversion paths, can be imported in Google Ads and will have their own statistic in Looker Studio).

Commonly important Events to track include:

  • Successfully submitted forms (per form)
  • New user registrations
  • Clicks on email addresses
  • Clicks on phone numbers
  • Adding products to the cart (E-Commerce tracking)
  • Removing products from the cart (E-Commerce tracking)
  • Completing a purchase (E-Commerce tracking)

5. Sending Events to GA4 via GTM

Step 1: Create a Trigger
Before creating a tag, you need to set up a trigger:

  • Go to Triggers.
  • Create a new Trigger.
  • Select a trigger type based on the action you want to track. If you’re unsure how, refer to my earlier blog explaining GTM basics.
  • Make the trigger more specific by adding conditions. Ensure the correct variables are selected or created (also explained in my GTM basics blog).

Step 2: Create a Tag
To send an Event to GA4 via GTM, create a Tag:

  • Go to Tags.
  • Create a new Tag.
  • Select tag type “GA4 Event”.
  • Select the configuration tag (you’ll need to create a GA4 configuration tag first).
  • Enter an Event name (no spaces).
  • Choose a trigger (created in Step 1).

Save your changes in GTM by clicking “Submit” (blue button, top-right).

If everything is set up correctly, Events will be sent to GA4. You can test this using the Preview feature in GTM and GA4’s Debug mode. Events will automatically appear in GA4; you don’t need to create them there (in Universal Analytics you had to create the events in order to ‘receive’ them).

Step 3: Mark an Event as a Key Event
You can mark Events as Key Events in GA4 under Configure > Events. This list shows all Events triggered at least once during the selected time period.

To mark an Event as a Key Event, click “Mark as Key Event.” If the Event hasn’t been triggered yet, you can manually create a Key Event with the same name.

Remember, historical data isn’t included when marking Events as Key Events, so do this as early as possible.

Learning track: How to set-up GA4?

This article is part of the learning track: "How to set-up GA4?" In this step-by-step guide, we’ll walk you through the entire process of setting up your GA4 tracking. You don't need any prior experience with setting up GA4 to follow these steps. Explore the other articles in this learning track below.

Discover this track

Join the community

Level up your analytics skills in our free Discord community.

Join MeasureBase
This site is registered on wpml.org as a development site. Switch to a production site key to remove this banner.