How To Accurately Track Events with GA4 & GTM

The new and improved data model lets you track events with GA4 in a much more flexible way than before with Universal Analytics.

We will show you how uncomplicated it is for you to set up and track events with Google Analytics 4 with no mistakes. We’ll cover every little step that will help ensure the most accurate data possible!

What Was Different with UA Events?

Universal Analytics has its limitations, and we extensively compared the differences between GA4 and UA. But the most significant difference regarding events is the four parameters you could send together with every event to UA.

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

The first two are required, while the second half is optional. 

Also, this list doesn’t include custom dimensions.

But, getting back to the point, you see the Event Category when you open UA event reports but not the others. To see Action, Label, etc., you have to go down the rabbit hole.

GA4 doesn’t have this issue! Giving a name to an event is customizable, and anyone who’s setting it up has the freedom of naming the event.

How?

Find the parameter called Event name. Your structure dictates every next step, and you could possibly need no additional parameters or add parameters that give context to the created event. It depends on you. 

If someone filled in the Request demo form on your website; you could send the following event: 

Event name: request_demo

product_name: amazing product

company_size: 99-250

company_industry: internet and telecom

annual_revenue: 50-100M

The custom parameters you created are sent with the event. Nice, huh? It is, but there are some limitations to how much these custom parameters you can actually send with a single event. Read more about those limitations.

Like with limitations, there are some best practices regardings the categories of events in GA4. For starters, let’s see what those categories are & what we can do now that we couldn’t get before with UA.

Event Categories in Google Analytics 4

There are four categories in GA4 to choose from.

  • Automatically collected events
  • Enhanced Measurement events
  • Recommended events
  • Custom events

Ask yourself when in the process of planning the structure of your events, including names and parameters:

1. Is the event I want to track among the Automatically Collected Events?

2. If the answer is no, is the event tracked by Enhanced Measurement?

3. If the answer is no again, can you find the event among Recommended Events?

4. If nothing applies, should I create a Custom Event with an event I want? (Hint: Yes!)

We will dig deeper to get more familiar with these four categories of events. And how to configure them. Also, clarify where to look and how to find the appropriate category and think about event structure.

Automatically Collected Events

As you can see in the list here, there are more than a couple of dozen events that GA4 can automatically track. That’s a list with both app and web events, and you can also see Enhanced Measurement events listed.

For the time being, we’ll turn our focus to automatically collected events – which you should not add to any other event category. There are over 40 automatically collected events:

  • first_visit (app, web). This is the first time a user visits a website or launches an Android app with Analytics enabled.
  • scroll (web). This is the first time a user reaches the bottom of each page (i.e., when a 90% vertical depth becomes visible)—collected by default via Enhanced Measurement.
  • click (web). Each time a user clicks a link that leads away from the current domain, this event is recorded. It is collected by default via the Enhanced Measurement feature.

Enhanced Measurement Events

The Enhanced Measurement feature in Google Analytics 4 makes it easier for advertisers to get all the events they need without having any developer cooperation or configuration in Google Tag Manager.

If you go to Admin > Data Streams > Select the web data stream, you’ll see the section Enhanced Measurement.

Google Analytics 4 keeps this section enabled to track a list of events automatically:

  • Page view (page_view)
  • Scroll (event name: scroll)
  • Outbound link click (click with the parameter outbound: true)
  • Site search (view_search_results)
  • Youtube Video Engagement (video_start, video_progress,
  • video_complete)
  • File Download (file_download)

You can also turn off/on specific measurement options in settings. Click on the gear icon in this section and then toggle the buttons.

If you’re wondering… You can customize some events in Enhanced Measurement. But, let’s first do a breakdown of what these events do:

page_view. GA4 receives this event when a new page loads or the URL of the page changes without reloading the page (or history change events)

scroll. This one is sent to GA4 once per page when a visitor scrolls below the 90% threshold of the page height.

outbound link click. When a clicked link redirects a visitor to another domain, this event is sent to GA4. There are a bunch of other parameters that more closely describe the event when it occurs, like link_classes, link_domain, link_id, and link_url.

By clicking the Tagging Settings of the same event stream, you can click Configure Your Domains. This is helpful info if your business operates on several domains because, like that, all listed domains will not trigger an outbound link click event.

view_search_results. This event is triggered every time the page loads, and the URL contains parameters such as q,s, search, query, and keyword. More could be included, up to 10.

Adding query parameters

If the address of your website’s search results page looks like this:

https://www.yourwebsite.com/search?key=my+search+term, you should enter just the word key. If the search results URL contains more parameters, add them too. 

video_start, video_progress, video_complete. This is an innovation in GA4, but one that isn’t certain. Rather, it often isn’t available on websites. The whole point of these parameters is to track the interactions of embedded YouTube videos in GA4.

Until it’s perfected, try doing that in GTM instead.

file_download. This event is fired when a visitor opens a link/downloads a file if it contains one of the following extensions: 

.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.

You cannot add more extensions to this list, but you don’t have to select all for your website. 

Select the ones you want to track, click Save, and ensure that Enhanced Measurement is enabled. From there, GA4 will track these events.

Recommended Events

Now that we’ve covered Automatically Collected and Enhanced Measurement events, there is room for more in GA4. These events don’t quite fit in these two event categories or require more context to be meaningful and thus aren’t sent automatically.

Read more and see the exact parameters here, but Google has published several pages for different industries:

  • For all properties
  • For games
  • For online sales

When you are looking for events on your website, it is vital to see if the Recommended Events will be something that can benefit your site.

GA4 data model is adjustable, and you have the freedom to name recommended events. Although, implementing Google’s recommended events and parameters when they make sense to you will help the reports better understand your data and apply it in their machine learning capabilities.

Google recommends using parameters for these events to add more context to the event. For example, if you use a generate_lead event, using the parameter method would make sense if you have multiple forms on your website.

Example of a Recommended Event: Form Tracking

We’ve just gone over the recommended events, and we’ll demonstrate how to utilize this category on successful form tracking that leads to a thank you page.

First, you will need to create a tag.

#1 Go to Tags

#2 Click on the New button

#3 In the Tag Configuration, pick the Google Analytics: GA4 Event

#4 In the Tag Configuration field, click on your current GA4 configuration tag. The event tag that we are creating will reuse the settings from the configuration tag (e.g., Measurement ID)

#5 In the Event Name field, enter event convention like generate_lead

#6 Next, the trigger type of this event depends on how you develop your form. 

When you have a tag, the next thing you will need is a trigger.

If you have a thank you page directing users after submitting the form, you can create a page_view trigger that only fires on the thank you page.

#1 Open Triggers in Google Tag Manager

#2 Press the New button

#3 Choose trigger type – Pageview and Some page views

If the visitor is redirected to https://www.example.com/thankyou.html, you can set the following rule for this trigger: Page URL contains /thankyou.

If you have multiple forms and all have different thank you pages, you don’t need to set any custom parameters to the GA4 event tag. GA4 already automatically tracks page_location, and you can distinguish form submissions with a dimension such as Page Path.

Suppose you have multiple forms and one Thank you page. In that case, you will need to check if you can get a variable that contains some form identifier (e.g., form id, form name, etc.). 

Now, use it as an additional parameter in the GA4 generate_lead event tag. It can be something like form_id, form_name, lead_type… (if your forms are located on a different page, you can differentiate them by the referrer, which is automatically tracked in GA4). 

generate_lead event tag configuration

Now, it’s time to test. Enable the Preview mode in GTM, log in to your website and check if your GA4 tag fired on that event. If the tag fired, go to Google Analytics 4 and check the DebugView:

Custom Event Tracking

Aside from collecting basic and eCommerce data, you are probably very interested to know how to set up more events that are highly relevant and adapted to your business needs.

However, before creating these events, it’s good to look at Google’s Recommended Events list first. You can easily include the events you’ll see on that list (e.g., search and sign in.) They come with relevant parameters, so their implementation will allow you to have more detailed reports and use the GA4’s full power to your advantage.

The event parameters in GA4 new reports effectively replace certain portions of previous Google Analytics versions’ event components.

Event category, label, or action don’t have to restrict you. There’s no need to remember indexes for custom metrics and dimensions anymore because you have the option of creating the descriptive naming that you can utilize in both the Configuration Tag and Event Tag.

Register your new event parameters in the GA4 interface, and you’ll be able to use them freely in GA4 reports. Also, don’t forget the event parameter limitations. There’s a maximum of 50 custom dimensions and 50 custom metrics per property.

Additionally, the length of parameters is restricted by limits. The names of each parameter should not exceed 40 characters, and the parameter value should not exceed 100 symbols. If you see that you will exceed these limits, make sure you shorten them manually with JavaScript.

If you’re interested in seeing more, look at the complete list of collection and configuration limits that Google provided.

After discovering that none of the Automatic Events, Enhanced Measurements, or Recommended events are adequate for your needs, it’s time to use custom events. Custom events have many benefits compared to predetermined events since they provide more variation and expression in terms of event and parameter naming.

You can create custom events both in GTM and GA4. They may combine existing events based on selecting event parameters that appear to be adequate.

Event configuration

GA4 has many beneficial changes, one of which is the goal creation process. 

The goal creation process is much more straightforward. This feature is handy for assigning an existing event as a conversion right in the events list. 

Marking the conversions right there and then is a critical step for differentiating genuinely valuable events from the rest.

Toggle buttons for conversion marking

Test Your Events in GA4

Once you’ve set up your events, it’s time to test them and make sure everything is working correctly. The DebugView is the essential feature developed for debugging GA4 data. Go to Configure section and click on the DebugView on the left side of the GA4 interface.

Click here in GA4 to open DebugView

Once the page loads, the data in the DebugView might look similar to this example:

Blue icons with hands symbolize events, and a green icon with a flag is the symbol for conversions. Click on these icons to see the parameters sent together with a specific event. To see the values click on the parameters.

Parameters for specific events in GA4

After you test and confirm data is coming in and showing correctly in the interface, submit your GA4 changes to the GTM container and publish them. Just click the Submit button in the top right corner and go ahead and complete the following steps in the user interface.

Once that is completed, you can see your newly set data in the Realtime report.

Where Can I Find Events Data in GA4 Reports?

There are three places where you can find reports with varying levels of detail.

These are:

#1 Configure > Events

#2 Reports > Engagement > Events

#3 Explore (Exploration reports)

Every report is influenced by events that you send because GA4 is an event-based analytics platform (in one way or another). The previous examples are just the most notable ones. Since the first option only shows the list of events with counts, we advise looking into the following two options.

Reports > Engagement > Events

This report will show you a list of all events tracked by your GA4 property. To see a more detailed view, click on the event you want to explore.

You’ll notice that this is a summary of all events sent to your property, plus a few charts present as well. When you go down the page, you get to see a list of clickable events and show more data about any event of your choice.

Events within Reports

Explore (Exploration Reports)

You can create various reports in Exploration, such as the Free Form, Path Exploration, Funnel exploration, and Segment Overlap. These reports can help you see data more granularly and improve your insights.

In this example, we will see which forms our leads came from on the website, with a breakdown based on different device categories.

Go to Explore and click on the Free Form.

Overview of Explore reports

Since we have already created event generate_lead with event parameter lead_type that gives us information about which one of the forms on the website was submitted, we need to include the lead_type custom dimension in the Variable column by clicking on the + icon.

How to add custom dimensions

To see the lead_type dimension in the list, it needs to be registered as a custom dimension, which we have created and named Lead type.

Next, we will delete any current dimensions from the Rows section, and instead of them, we will include the Lead type. In the Columns part, the Device category needs to be added, and in the Values, Event count.

As a result, we have generated a report where we can see how users from different devices were interacting with forms on the website.

If there is a need to see just a particular set of data, for that purpose, we can use filters under the Tab settings.

In the top left corner, under the Variables section, we can change the name of the report and the date range.

Variables section in Explore Reports

Event Limits in GA4

There are some restrictions that you should know. Make sure you get familiar with this page. Meanwhile, we want to emphasize a few of them in this section.

#1 At the moment, there is no limit for events in total. As we all know, the maximum number of hits per property for free accounts in Universal Analytics was 10 million monthly. We’ll see if this is something that changes over time with GA4.

#2 You may have up to 500 distinct event names per property Enhanced Measurement events are not included). If you have a login event and a Login event, these will be recorded as two distinct event names.

#3 Remember that you can register up to 50 custom dimensions and 50 custom metrics in a property. You do that by going into the Configure section in the left sidebar and clicking the Custom definitions button to configure them. If you send more custom parameters, but they aren’t registered, it’s all good.

#4 With an event, you may send up to 25 parameters.

#5 Both the event name and the parameter name must be up to 40-characters-long.

Still haven’t made the switch?

On July 1, 2023, GA4 will replace UA for good. Before it’s too late, get to know the new platform and migrate everything for your business. Read more about the essential GA4 advantages on our blog and get ready for the big update.

Final Thoughts

Now that you know how to set up events with Google Analytics 4 and Google Tag Manager. Now it’s your turn – take the time to start tracking and testing these newly created events.

Remember, the first try is always experimentation: Try out different combinations of events and see which ones give you the most valuable insights into your website traffic and user behavior.

And as always, if you need help setting any of this up, keep following our blog to learn more about Google Analytics 4 and updates in the web analytics and conversion tracking industry.

Follow us on —> https://diligent.biz/ for more!

Request an Account Audit with 50+ dimensions checked

We'll go over all your PPC accounts, conversion tracking, Web Analytics setup, and landing pages you're using in the account audit. You'll receive several doc files with audit outputs, prioritizing what we're suggesting to work on and our proposed timeline.

Get Free Audit

    Thank You. What's Next?

    in 24h we contact you to schedule an intro call

    in 7-10 days after the call, we run audits and have the strategy ready

    in 100% chances, we find improvement opportunities