• Courses
    • Courses
    • Course bundles
  • Blog
  • Services
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • About
    • About
    • Contact
  • Login
  • Courses
    • Courses
    • Course bundles
  • Blog
  • Services
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • About
    • About
    • Contact
  • Login

December 7, 2022

How to Track Events with Google Analytics 4 and Google Tag Manager

Updated: December 7th, 2022

When Google Analytics 4 was introduced, it was announced as the event-based analytics tool where everything is an event (from pageview to purchase).

There are so many things to know about all of this that eventually, everything materialized into a blog post and a video tutorial.

Today, I will show how to track events with Google Analytics 4 and Tag Manager.

Sure, I could write a couple more paragraphs in this introduction to hook you up and intrigue you, but I will be honest: this article is already a behemoth. It is almost 7000 words long and includes many valuable things and tips. And every artificially inserted paragraph would just simply be disrespectful.

Also, keep in mind that this guide focuses mainly on the setup. I will include a chapter with a quick overview of reports where you will see the event data (including custom events), but that’s about it.

 

Table of Contents

+ Show table of contents +

  • Video tutorial
  • 4 categories of events in Google Analytics 4
    • #1. Automatically captured events
    • #2. Events tracked via Enhanced Measurement
    • #3. Recommended events
      • #3.1. Example of a Recommended Event: login tracking
    • #4. Custom events
      • #4.1. Example of a Custom Event: Menu Link Click Tracking
      • #4.2. Register custom definitions
  • Create new events (in the GA4 interface)
  • Modify Events (in the GA4 interface)
  • Test your events in real-time reports and DebugView in Google Analytics 4
  • Where can I find the events data in Google Analytics 4 reports?
    • “Reports → Engagement → Events” report
    • Exploration reports
  • How to plan your event naming convention and structure
  • Event limits
  • Useful resources about event tracking in Google Analytics 4
  • Final Words

 

Video tutorial

If you prefer video content, here’s a tutorial on my Youtube channel (*cough* consider subscribing *cough*). However, the blog post is more in-depth. Consuming both formats of content would help you understand this topic better.

 

4 categories of events in Google Analytics 4

In GA4, events fall into 4 categories:

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

The process of how you should plan the structure of your events (names and parameters) is by doing the following:

  1. Check if the event that you want to track is among the automatically collected events
  2. If not, then check if your event is mentioned among the Enhanced Measurement events (e.g. scroll or file_download)
  3. If not, then check the recommended events and their naming convention
  4. If none of the above categories apply to your events, create a custom event with an event that you want

As you read through, you will learn to determine which of these categories your event belongs to. And once you get more familiar with events (and how to configure them), I will share some tips (and a sample spreadsheet) that can help you think about the structure of your events and a naming convention.

 

#1. Automatically captured events

Since my blog focuses on web tracking, this guide will take the same route.

GA4, by default, automatically tracks certain events. You can find a complete list here (it contains both app and web events). For now, let’s ignore Enhanced Measurement events and focus only on automatically captured events. The list of website events goes like this:

  • first_visit. This is the first time a user visits a website or launches an app.
  • session_start. When a user engages the app or website and starts a new session
  • user_engagement. This event is fired 10 seconds after the visitor has stayed on a page. But it also might periodically fire while the app is in the foreground. You can learn more here.

I didn’t mention the page_view here because I added it to the Enhanced Measurement section. And once again, if you want to see the app events, you can check them here.

 

#2. Events tracked via Enhanced Measurement

When you configure a web data stream in Google Analytics 4, you have an option to enable Enhanced Measurement. Enhanced Measurement Events help marketers get as many events in the reports as possible without the need to cooperate with developers or configure in Google Tag Manager.

If you go to Admin > Data Streams > Select the web data stream, the following window will open where you will see a section called Enhanced Measurement.

By default, this feature is enabled and will automatically track the following events:

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

If you want, you can disable/enable events individually, and you can do that by clicking the gear icon in the Enhanced Measurement section and then clicking the toggle buttons.

In addition to this, you can customize some of the events. Let’s take a quick look at each event and their respective settings.

page_view. This event is sent to GA4 when a new page loads or the URL of the page changes without reloading the page (a.k.a. history change events)

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

click. This event registers in GA4 for the outbound link click. (when a clicked link redirects a visitor 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, link_url, are also sent along with this event.

If your business operates on several domains, the outbound click event will fire regardless. You would need to go to Tagging Settings (of that very same event stream) > Configure your domains and then enter the domains of your business. All the domains that are listed there will not 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, keyword. You can include up to 10 query parameters to be passed back to Google Analytics 4.

If the URL of the search results page is https://www.yourwebsite.com/search?key=my+search+term, then you should enter the word “key” (without quotation marks in the settings of the search event). Keep in mind that you can pass only 10 parameters from the search URL back to GA4.

For example, if the URL of your search results looks like this:  https://www.yourwebsite.com/search?key=search+term&results=50,you could include the “results” (without quotation marks) in the 2nd field of the configuration. Then this parameter will be automatically tracked by GA4.

video_start, video_progress, video_complete. Enhanced Measurement can track interactions of the embedded Youtube video on your website and then sends “video_…” events to GA4. But those embedded Youtube video players must contain the ?enablejsapi=1 parameter in their URL. And that is not always available on websites. Also, here’s a list of reasons why Youtube video tracking might not work out of the box, hence you will definitely need some tweaks.

Because of those nuances, I’d say that this automatic video tracking will not work in as many cases as you might think, hence I’d personally vouch for doing that with GTM.

file_download. This event is sent to GA4 when a link is clicked and that link contains one of the following file 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. In other words, if the link opens/downloads a file. It is currently impossible to update the list with other extensions in the GA4 interface.

form_start, form_submit. These events are recorded when the website user interacts or successfully submits a lead form during their session. GA4 records parameters like form_id, form_name, form_destination, and form_submit_text when it is fired.

Once you select which events you wish to track, hit Save in the top right corner and then make sure that Enhanced Measurement is enabled (the toggle is blue).

From that moment, your Google Analytics 4 will start automatically tracking the events. See this chapter to learn how to check if your data is coming in correctly.

 

#3. Recommended events

As I have previously mentioned in this blog post, when you try to pick the name (and the parameters) for your event, first take a look at automatically tracked events (maybe those events are already being tracked), then check the Enhanced Measurement events. If none of those events cover your case, look at the recommended events list. Google has published several pages for different vectors:

  • Generic (for all properties)
  • Online sales
  • Games

Even though Google Analytics 4 data model is very flexible (and you can use a different event name for login, for example, logged_in), Google recommends that you implement the recommended events when it makes sense to you.

Together with those events, you can use recommended parameters. For example, for the login event, there is a method parameter. It would be helpful to track if users can log in to your website via email, google login, facebook login, etc.

 

#3.1. Example of a Recommended Event: login tracking

Let’s continue with the login example mentioned above. Let’s say that I am working on a website where visitors can log in. I want to track the exact moment when users/visitors do so and which login method they use.

I have asked a developer to activate the following dataLayer.push() code when a user logs in to his/her account.

<script>
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
	'event' : 'login',
	'loginMethod' : 'email' // this should be replaced with an actual login method
});
</script>

The user’s login method should replace the loginMethod parameter’s value. That is the developer’s job to write custom code that replaces it.

When a developer implements that code and I successfully log in to GTM’s preview mode, I should see the following Data Layer event (see the screenshot below).

Remember that this event is a GTM (or Data Layer) event. It is not sent to GA4 (or any other platform) yet. Right now, it is just a collection of data points that are at our disposal, meaning that we can send the data further to other tools like GA or FB pixel (or any other analytics/marketing platform that we use).

Now, let’s create a Data Layer Variable that will access the value of the loginMethod and also a Custom Event Trigger for the login event in the Data Layer.

In Google Tag Manager, go to Triggers > New > Custom Event, enter the following settings and press Save.

Then go to Variables > User-defined variables > New > Data Layer Variable and enter the following settings:

I entered the loginMethod because that is what a developer pushed to the Data Layer. If your parameter’s name is different, then enter that name. Important: variable names are case-sensitive.

After you create a variable and a trigger, it’s time to make a Google Analytics 4 event tag. With it, we can send the event data to GA4.

In Google Tag Manager, go to Tags > New > Google Analytics: GA4 Event in Google Tag Manager.

Before you do this, I expect that you are already tracking pageviews and have a GA4 configuration tag. If you are new to it, read this guide (it includes a video on how to proceed with the migration).

In a nutshell, the GA4 configuration tag is usually responsible for containing your GA4 Measurement ID and some additional configurations (if you have them).

So, when you create a new GA4 event tag, you will need to:

  • Define the GA property ID (also known as a Measurement ID)
  • And then event name + parameters

To avoid manual work and to set up all the fields/customizations (such as GA Measurement ID) in every tag, you should select your main configuration tag in the event tag.

google analytics 4 event tag

This tag can contain a lot of settings/configurations. If you link it with other GA4 event tags, they will inherit some changes.

But at the same time, you can still configure additional settings in your event tag. For example, if both the event tag and the configuration tag contain a particular parameter/field, the event tag’s field gets a higher priority.

Now, let’s continue the configuration of an event. Enter the event name. Since we are tracking the login event and Google recommends the name “login” for such events, we shall go ahead.

Let’s enter an additional parameter, the login method. To do that, expand the Event Parameters section, click Add Row, then enter method in the Parameter Name field and insert the previously created Data Layer Variable in the Value field.

Why did I enter the method in the Parameter Name field? Because I saw that in the list of Recommended Events.

What about custom parameters? What if you also want to pass the user’s pricing plan or something else?

Sure, you can do that. But I will explain custom parameters/dimensions in the next chapter. All you need to know right now is that it’s completely possible to send custom parameters with recommended events.

Now, it’s time to test. Enable the Preview mode in Google Tag Manager, log in to your website and check if your GA4 Event Tag fired on that event. To do that, you must click on the login event in the Preview mode’s left side and check if the tag fired.

If you indeed see that the tag has fired, that’s a good start. Now, you will need to go to Google Analytics 4 and check DebugView. You will learn more about that in this chapter of the blog post.

By the way, if you want to implement sales (a.k.a. Ecommerce tracking), you must also use recommended events and follow Google’s strict requirements. Learn more here.

 

#4. Custom events

You can create custom events if you want to send an event that is not mentioned among the automatically tracked events, Enhanced Measurement, or Recommended events.

The configuration of Custom events is pretty much identical to recommended events. The only difference is that you will need to come up with your own names.

For example, if you want to track clicks on a call-to-action button, the name of the event can be any of these:

  • call_to_action
  • cta_click
  • cta, etc.

Or anything else.

Speaking of custom event tracking, let’s look at the example where we want to measure clicks on menu links on a website.

 

#4.1. Example of a Custom Event in GA4: Menu Link Click

Note: menu link click tracking trigger conditions differ on most websites (because of different click classes, IDs, etc.). Try to do your best to apply this example.

I have several menu links on a demo website that I want to track.

The first step is to create a trigger with the right conditions that distinguish any click from a menu link click.

Enable Google Tag Manager’s Preview mode and try clicking any of the menu links on a website. Once you do the first link click, you should see the Link Click event in the Preview mode’s left sidebar when you click on any of the links.

If you don’t see it, you should:

  • have at least one Just Links GTM trigger activated on a page
  • or have “File download” or “Outbound links” tracking enabled in your Enhanced Measurement Settings

Let’s say, that you don’t use Enhanced Measurement in GA4. Go to Google Tag Manager > Triggers > New > Just Links. Set the trigger to “All link clicks” and save the trigger.

Creating this trigger will enable the link-tracking functionality in Google Tag Manager.

Then go to Variables > Configure (in the “Built-in Variables” section) and enable all Click-related variables.

Refresh the preview mode (by clicking the Preview button once again).

Then go to your website and click any of the menu links. Actually, click at least two of them. Return to the preview mode, and you should start seeing Link Click events in the preview mode.

Click the first Link Click event and go to the Variables tab of the preview mode.

Then click on the second Link Click event. I am currently looking for some variable to help identify a menu link click. I don’t want to fire my GA4 event tag on any link click. Instead, I want to fire it precisely on a menu link click.

After taking a closer look, I see that both links contain the same Click Classes value, site-nav__link site-nav__link–main. By the way, nav means “navigation” in this context.

Great! Now I’ll use this in my Just Links trigger.

Go back to the list of triggers in your GTM container and click the previously created trigger for All Link Clicks. We’ll edit it and add a condition: Click Classes contains site-nav__link–main

Save the trigger.

Now, it’s time to create a Google Analytics 4 event tag. Go to Tags > New > Google Analytics: GA4 Event. Select your existing GA4 Configuration tag and then enter the event name. Its value is up to you. Any of the following options are perfectly fine:

  • menu_click
  • menu
  • menu_item_click
  • menu click
  • etc.

Just keep in mind the limitations of name length.

I decided to use menu_link_click as the event name.

But this time, sending just the event name is not very useful. You’d probably want to know which exact menu items get clicked more often. How about we also send the menu item’s name and URL?

We could do that by including additional event parameters. Even though you could use parameters that are already mentioned in the documentation of the Enhanced Measurement (like link_url and link_text), let’s create two custom parameters (because I just want to show you how to configure them).

I am going to pass two parameters, menu_item_url, and menu_item_name. I made these parameter names up and you can do it too. GA4’s flexible data model allows this.

To send custom parameters, you must expand the Event Parameters section in the Google Analytics 4 event tag and then click Add Row.

Configuring the GA4 event tag for menu link clicks

Enter the name of the first parameter. In my case, that is menu_item_url. Then, I will insert a variable that returns a clicked URL in the Value field.

Luckily, GTM already offers such a variable called Click URL. Then, click the Insert Variable button and select the {{Click URL}} variable.

Let’s add another parameter, menu_item_name. For that purpose, GTM offers {{Click Text}}. Insert it as well.

Since visitors of your website can translate your page, {{Click Text}} value will also change. Hence you will see a more diverse list of collected values in your GA4 reports.

Adding custom parameters to be captured by the GA4 event tag

If you want to send more parameters, Google allows you to send 25 parameters with a single event.

Assign the previously created Just Links trigger to this tag. Save the tag. Refresh the GTM Preview mode and click a couple of your menu items.

Go back to the Preview mode and click those Link Click events. Check if the GA4 event tags for Menu Link Clicks have fired.

menu link click event in google analytics 4

Head over to Google Analytics 4 to Google Analytics 4 and check the DebugView. You will learn more about that in this chapter of the blog post. After you test everything, hit PUBLISH in the top right corner of the GTM interface.

IMPORTANT: even though you will see your custom parameters in Real-time reports and DebugView in GA4, you will not be able to see them in other GA4 reports. Unless you register those parameters as custom dimensions in Google Analytics. Read the next chapter of this blog post.

 

#4.2. IMPORTANT: Register custom definitions

If you are sending custom parameters to GA4 and you plan to use them in places like the Google Analytics 4 interface or Google Data Studio, you have to register them as custom definitions.

Here’s an exhaustive article on how to set this up. If you want to learn all the details, read it.

But if you are in a rush, here’s a quick summary. In Google Analytics 4, go to Admin > Custom Definitions. Since we sent 2 custom parameters with the menu link click, we must register them here.

Click the Create Custom Dimensions button and then enter:

  • The name of the parameter. It can be whatever you want; your reports will display the dimension. For example, you can name it “menu_item_url”, “Menu item URL”, or anything else.
  • Scope. Since we want to apply this parameter only to one event (and not to all events of the same user), we need to select Event.
  • Event parameter. This is where you have to enter its name precisely as you entered it in the GTM tag. If your parameter name is menu_item_url, you must enter it here precisely like that. Don’t worry if the autocomplete feature of that field does not show your parameter yet. Just enter it and save the dimension.

Then register a second parameter (in my case, that was menu_item_name) and save it. By the way, I sometimes use the words “custom parameter” and “custom dimension” interchangeably. In general, custom metrics and custom dimensions are both grouped as custom parameters.

And now we wait. Within the next 24 hours, the custom parameters will start appearing in your Google Analytics 4 reports.

======

Sometimes, you might want/need to create/edit events directly from the Google Analytics 4 interface. Well, now you can. Read the following two chapters to learn more about these features.

 

Create new events (in the GA4 interface)

Creating conversions (formerly known as goals) in GA4 (compared to Universal Analytics). It’s enough just to click a toggle next to an event in the Admin > Events list.

But there is one problem. If you toggle the event and mark it as a conversion, ALL of those events will be treated as conversions (from this point moving forward). But what if you want to have only certain events marked as conversions?

Example: you have a “Thank you” page to which users are redirected when they subscribe to a newsletter. Let’s say that the URL is https://www.mywebsite.com/thank-you/. If I mark the page_view event as a conversion, ANY pageview will become a conversion. How can I separate only those pageviews that happened on the /thank-you/ page?

One way to do this is to send a dedicated event (with a different name) from Google Tag Manager/Gtag.js. Another option would be to use the Create Event feature in the GA4 interface.

This feature allows you to create a new event based on other incoming events. Go to Admin > Events page, click Create Event and then click Create.

Enter the name of the custom event. You can name it whatever you want. Make sure the name is clear to understand. thankyou_page_visit might be a good option.

Then let’s move on to the Matching Conditions section. Here we must tell GA4 what kind of event we are looking for. Then, when that particular event is spotted, our thankyou_page_visit should also be created.

In my case, I need to enter the following conditions:

  • event_name equals page_view
  • page_location contains /thank-you/

If you want to copy all the parameters from the page_view event to the new event, keep the checkbox Copy parameters from the source event enabled.

If some of the parameter’s name is incorrect and needs fixing, you can Add Modification in the Parameter Configuration section. For example, if an event contains the parameter pricingPlan but you want it to be pricing_plan, you can introduce a new field (and reuse its value) while removing the incorrect parameter (by leaving the New Value empty).

Take a closer look at [[pricingPlan]] in the screenshot above. Double square brackets mean that GA4 will reuse the value of the parameter pricingPlan in that event.

Once you save the changes, you can view them in the Real-time reports and the DebugView of GA4. You will learn more about that in this chapter of the blog post.

Also, when you create that new event in GA4 (and you want that to become a conversion), don’t forget to mark that event as a conversion on the Configure > Events page.

If you don’t like to wait for up to 24 hours (because that thankyou_page_visit will not appear in the list of all your events immediately), you can create a new conversion immediately.

Click the Admin section on the left sidebar of your GA4 interface. Then go to Conversions.

Then click New conversion event and enter the name of the event that you have just created. Click Save.

That way, you will mark the newly created thankyou_page_visit event as a conversion (without the need to wait for 24 hours until it appears on the Admin > Events page.

 

Modify Events (in the GA4 interface)

If you don’t want to create new events (like in the previous chapter) but instead, you just want to fix a typo in the existing events, you can use the Modify Events feature in the Google Analytics 4 interface.

If you want a quick rundown on how to get this done, here’s a video tutorial that should help you.

In my Configure > Events report, I see two page_view events.

  • page_view
  • page_view?undefined

I have no idea where that page_view?undefined came from but I don’t want to see it in my reports. How do I fix it?

I can do that by going to the Admin > Events report and clicking Modify Event. 

Then click Create.

  • Enter the name for the fix (this is for internal use)
  • Then enter the matching condition (in my case, that’s event name equals page_view?undefined
  • And then enter the needed modifications (in my case, that’s event_name and page_view)

If GA4 spots an event with the name page_view?undefined, it will change its name to page_view.

As you can see, the interface and flow here are similar to the Create Event feature I described in the previous chapter.

Once you save the changes, you can view them in the Real-time reports and the DebugView of GA4. You will learn more about that in this chapter of the blog post.

Remember that you can create up to 50 modifications per property and that this feature does not apply to historical data, only to the new incoming events.

 

Test your events in Google Analytics 4

Once you configure your events, it’s time to test them. The primary feature built for debugging GA4 data is the DebugView section.

Head over to your Google Analytics 4 account > Admin > Debugview.

That’s the place where your debugging should take place. Do not mix this with the GTM Preview and Debug mode. They are two different beasts.

To enable the debug mode in GA4, you have several options (any of them will work):

  • Enable the GA debugger Chrome extension
  • Send a debug_mode parameter together with an event
  • Have enabled Google Tag Manager’s Preview mode on a page that you’re debugging

In the case of the first option, install the extension here, and then click its icon (so that you can see the ON ribbon). From this moment, you will start seeing your events coming into DebugView.

The other option is to send a debug_mode parameter with every event that you wish to see in the DebugView.

In Google Tag Manager, you can do that by opening the GA4 Configuration tag and adding the following parameter:

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.

Click on that parameter to see the value that GA4 received. Now that is some granular debugging!

However, I have noticed some delays between the event actually happening on a website and then appearing in DebugView. Sometimes, I have to wait for several minutes until the events come in. That’s a bit unfortunate and hopefully, the team behind Google Analytics 4 will improve this in the future.

Also, ensure that you have selected the correct Debug device in the top left corner.

If multiple visitors have enabled the debug view (e.g., they all have enabled the Chrome extension), you will see multiple devices there, which might require more time to find yourself.

I’ve seen this happen to my blog so many times. Many of my readers enable the GA Debugger Extension, leaving me to guess which device (out of the other 15) is mine.

Anyway, once you start seeing data in DebugView, things will look like this.

Events are marked with blue icons and conversions with green. Please ignore the fact that I treat menu_click events as conversions. This is just for demonstration purposes 🙂

You will see the parameters sent along with an event if you click it. Click on the parameter to see its value.

Once you made sure that the data is coming in and displayed correctly, you should submit your GA4 changes in the GTM container and publish it.

You can do that by clicking the SUBMIT button in the top right corner and completing all the steps the user interface asks you to do.

After that, you should soon start seeing the new data coming in your real-time reports as well.

On the left sidebar of the Google Analytics 4 interface, go to Realtime. Here you will see the data coming into your reports. Unlike in the previous version (Universal Analytics), the new report offers you capabilities to know the data on a much more granular level.

First, you will see a map and a bunch of cards with traffic sources, the most popular events, and the number of users in the last 30 minutes.

You can also take a look at the snapshot of an individual user. For example, you can do that by clicking the View user snapshot button in the top right corner.

Then, you will see a stream of all events of that particular user, you can click on them (just like in the DebugView) to see things on a more granular level. If you wish to look at another user/visitor, you can click the button here:

To exit the snapshot, simply press the Exit snapshot button in the top right corner.

 

Where can I find the event data in Google Analytics 4 reports?

This blog post focuses mainly on the setup of event tracking in Google Analytics 4. I will not dive deep into how to find insights, raise questions, answer questions, etc. However, I can show you several places where you can find the event data you just sent to Google Analytics 4.

But if you also want to learn how to analyze the data and get insights out of your GA4, then take a look at my Google Analytics 4 course.

Anyway, let’s take a look at some reports. Here are some of the reports:

  • Admin > Events (this will show just the list of events with counts. Nothing fancy.
  • Reports > Engagement > Events
  • Explore (a.k.a. Exploration reports)

But that is not all. Since GA4 is an event-based analytics platform, every report is affected by events you send (in one way or another). The reports above are just the most notable examples.

 

“Reports → Engagement → Events” report

This is an overview of all events that were sent to your property + a couple of charts. Below them, you will see a list of events and if you click on any of them, you will take a closer look at that event’s data.

 

Explore (a.k.a. Exploration reports)

The Explore section is where you will be able to drill down into your data. In the Explorations, you can use reports such as Free Form, Funnel Exploration, Path Exploration, etc.

Here is an example of a Free Form report. Remember that you will need to wait up to 24 hours for the data to come into your reports (sometimes even up to 48 hours). So if you don’t see the data now, be patient.

Let’s say I want to see how users with different device categories interact with my site’s menu bar.

Remember, I set up the menu_link_click event? So, let’s go to Explore and click on the Free Form block.

 

Then in the Variables column, I need to include the menu_item_url custom dimension because I want to see how many clicks each menu URL got. So, I click the Plus icon and then find the menu_item_url dimension. It will then be included in the list of possible dimensions in the report.

If you CANNOT see the menu_item_url (or whatever custom parameter you are looking for), you must register that custom parameter in Configure > Events > Manage Custom Definitions. And then wait for 24 hours until the data appears in the reports. If the reports don’t work properly, wait for even longer.

Then let’s edit the Tab settings. Start by removing the existing dimensions in the ROWS and include the custom definition that you want to include. In my case, that’s menu_item_url.

In the COLUMNS section, I used the Device category dimension. In the VALUES section, select the metric that you would like to see. I used the Event Count.

Then you will need to filter only those events that contain the menu_item_url dimension. In my case, that is just a menu_click event. (Previously in this blog post, I used menu_link_click, but I accidentally wrote this chapter and created screenshots with menu_click in mind. Sorry for this little confusion.)

You should create a filter at the bottom of the Tab Settings section. Set it as Event name exactly matches menu_click.

That’s it; your report will now display how users with different types of devices are clicking menu items, which ones are the most popular, and the number of clicks.

Also, don’t forget to change the date range if you need it. It is available in the top-left corner of the Exploration interface.

You can also use event data in things like funnel reports, but let’s keep it for another tutorial (hopefully) in the future.

 

How to plan your event naming convention and structure

Note: This chapter will just provide an overview of how you should do it. If you want to learn a lot more details, take a look at my Google Analytics 4 course. Speaking of actual planning, I would say that a spreadsheet is your best friend.

  • Write down all the events that you want to track, and then:
    • Check whether they fall under the categories: automatically collected, enhanced measurement, or recommended.
    • If yes, check the naming convention of event names and parameters (dimensions). If not, then come up with your values. Just keep in mind that there are some limitations related to the length.

Here is an example of the spreadsheet with events that you could prepare and then try to pick the correct naming convention. You can use it as an example/inspiration to create your own spreadsheet. Let’s take a quick overview of the spreadsheet.

There are two sheets:

  • The first one is for the list of events and what kind of parameters you want to track together with them
  • The second one is a list of parameters with their explanations

The first sheet:

  • In column A, you should enter the event name that you will use in Google Analytics 4. You should pick this name based on the previously described process: check the automatically tracked events, enhanced measurement, and recommended events. If none of the events match yours, then add a custom name. Using this principle to name the event, e.g., event_name (all lowercase and connected with an underscore), looks pretty clean. Event names like “Submitted the Form” will also work, but the all-lower-case-with-underscore looks cleaner (I believe the term snake-case applies here)
  • In column B, you can just briefly describe an event in plain English
  • Column C is for type (is it Automatically collected, Enhanced Measurement, Recommended, or Custom?).
  • Column D is for parameters you want/plan to track with particular events. I did not include the default parameters automatically tracked with every event: language, page_location, page_referrer, page_title, screen_resolution.

If you are dealing with mobile apps as well, you could include an additional column “Platform” where you could enter “web” or “Android / iOS”.

The second sheet:

  • Column A is for the parameter name
  • Column B is for a platform. If you are working just with the website, feel free to remove that column.
  • Column C is the type (is it Built-in, Recommended, or Custom). Built-in means that it is used by automatically tracked events or Enhanced Measurement. Recommended parameters are for recommended events. Custom parameters are your own unique events.
  • Column D is for description (in plain English).

IMPORTANT: This spreadsheet is just an example. You don’t have to follow it blindly. If you wish, you can take just some parts and adapt them to your needs.

Once you prepare the plan, you can track events with Google Analytics 4. Don’t rush too soon. Otherwise, you might face the consequences in the long run.

 

Event limits in Google Analytics 4

Keep in mind there are some limits to event creation. I would always recommend that I would always recommend for you to refer to this page when it comes to limits. Most likely, it will be more up-to-date in the future than my blog post.

Anyway, here are some of the things you should remember now:

  • There is no limit for events in total (at least for now). But you never know what might happen in the future 🙂
  • You can have up to 50 custom dimensions and 50 custom metrics registered in a property. The keyword here is registered. This means that you have to go to Admin > Custom Definitions and have them configured there. You can send more custom parameters, provided they are not already registered.
  • You can send up to 25 parameters with an event
  • There are some length limits for event names and parameters as well. Both (the event name and the parameter name) must be up to 40-characters-long.

To learn more about the limits, as always, refer to this page.

 

Useful resources on how to track events with Google Analytics 4

Here are some good resources that you might find helpful:

  • Automatically collected events (by Google)
  • Enhanced measurement
  • Recommended events
  • Custom Dimensions
  • Custom Metrics
  • Collection and configuration limits (by Google)
  • 5 best practices for creating your events and parameters in GA4 (by Ken Williams)

 

Track Events with Google Analytics 4 and  Google Tag Manager: Final Words

Phew! That was a long guide! I expected it to be lengthy, but not THAT MUCH. However, event tracking in Google Analytics 4 is a very extensive topic; hence, the blog post’s length is just proof of that. And the almost 40-minute-long Youtube tutorial supports that statement.

To sum up, here’s is the recommended process of how you should track events with Google Analytics 4:

  • Check the automatically tracked events and what Enhanced Measurement has to offer.
  • If an event (that you wish to track) is not listed there, check the recommended events and try to use their names and parameters.
  • If none of the recommended events match your needs, then create a custom event

Here are some of the key takeaways from this blog post. However, if you just skimmed the article, please read it carefully (and if you have time, watch the video as well). There are many gotchas there.

  • Everything is now an event in Google Analytics 4. Even pageviews.
  • No more Event Category, Event Action, or Event Label fields. If you want, you can create them manually as custom parameters, but that does not make sense.
  • There is no limit for the total number of events in a Google Analytics 4 property (e.g. you can have 1 billion events sent to GA if you want). But the list of unique event names cannot be larger than 500 (per visitor/user). Enhanced Measurement events are not counted in that 500-limit.
  • You can send custom parameters (dimensions and metrics) with events (both recommended and custom).
  • You can send up to 25 parameters with a single event.
  • If you want to see a parameter in the GA4 report, you must register it as a custom definition. There is a limit of 50-registered custom dimensions and 50 registered custom metrics per property.
  • You can create new events in the GA4 interface based on incoming events.
  • You can modify/fix incoming events in the GA4 interface (e.g. if there are some typos)
  • There are some other limits as well (regarding the length of names/parameters, etc.)
  • Use Google Analytics 4 DebugView to test the incoming events on a granular level.

Got more questions about how to track events with Google Analytics 4? Post them in the comments below!

 

Julius Fedorovicius
In Google Analytics Tips
130 COMMENTS
Louisa von Ingelheim
  • Nov 16 2020
  • Reply

Amazing resource, thanks, Julius.

Amar
  • Nov 17 2020
  • Reply

A really great resource for the events in GA4, thanks for writing this Julius!

Shashank Mangal
  • Nov 18 2020
  • Reply

Great work again Julius.

Any guide/tutorials on 'Analysis Types' provided in GA4 and how to use them? It seems a bit confusing right now esp moving from Universal Analytics.

Also, any guide on how we can create Custom User Properties in GA4? In Universal Analytics, we created those thru Custom Dimensions from variables having User level scope.

How can it be done in GA4?

Thanks,

    Julius
    • Nov 18 2020
    • Reply

    I don't have guides for these topics. I just started posting about GA4 last week.

      Shashank Mangal
      • Nov 18 2020
      • Reply

      Sure.

      Shall wait for your upcoming blogs. Thanks

        Shashank Mangal
        • Nov 18 2020
        • Reply

        Hi Julius,

        How can we send Additional Information for Automatically Tracked and Enhanced events so that we can use them as Custom Parameters if required?

        For these event types, DataLayer values pushed as soon as the listener is detected. How can we add the information for these events?

        Thanks,

          Julius
          • Nov 18 2020

          No, you can't. You will need to send separate events from GTM.

Alessandra
  • Nov 19 2020
  • Reply

Great resource!
Thanks for writing Julius.

Matthias
  • Nov 29 2020
  • Reply

Really helpful overview, thank you!

Any idea if we can configure a report so we see the custom events / conversions on an hourly basis and|or hourly comparison day vs. day?

Cheers

    Julius Fedorovicius
    • Nov 30 2020
    • Reply

    I don't think you can do that in GA4

    Guido Hummel
    • Aug 27 2021
    • Reply

    You might want to check out this article from the great Simo Ahava https://www.simoahava.com/analytics/improve-data-collection-with-four-custom-dimensions/#4-hit-timestamp and adapt the custom JS variable to your needs.

    Then, send the value of the variable as an additional parameter, create a custom definition with that parameter, and analyze it later on.

    This is just an idea. I've not tested it myself, but that's where I'd start if I were you.

Gary Le Masson
  • Nov 30 2020
  • Reply

really helpful thanks

Dan Mandle
  • Dec 2 2020
  • Reply

Have been looking through this post to help my team adopt GA4. Thank you for providing such thorough detail, especially compared to what is/isn't available from Google Analytics directly!

Do you know if it's no longer possible to track utm_content data in GA4? We are running on a set-up that IS capturing utm_medium, utm_source and utm_campaign data but the utm_content layer isn't populating for us. Should we have set something up special in GTM in order to capture this with GA4?

tran tri dung
  • Dec 4 2020
  • Reply

Thank you so much!

Kevin Smith
  • Dec 7 2020
  • Reply

Quick question...where can i find the results/data from the google tags i have created in google analytics? For example, I have created a google tag to track a specific email sign up. Everything is firing properly using google tag extension, and everything looks good in debug viewer in ga and gtm. But where can I find my numbers in google analytics from the tags I created? Please advise.

    Julius
    • Dec 7 2020
    • Reply

    There is a dedicated chapter in the blog post mentioning the reports. Please read that. Also, wait up to 24 hours after the event was sent.

      Kevin Smith
      • Dec 7 2020
      • Reply

      I read the section you are referring. The info you have provided is really great. Very detailed and thorough. However, I still am not seeing where my customized google tags data is appearing in google analytics. Follow up Question...If debug view shows data in realtime, then why would I have to wait 24 hours for my data to appear in reports.

        Julius
        • Dec 7 2020
        • Reply

        Because it takes up to 24 hours for the non-debugview and non-realtime reports to process the data.

          Kevin Smith
          • Dec 7 2020

          Good to know. Thanks for the feedback. By the way, the content on your site is phenomenal.

Ziyad
  • Dec 15 2020
  • Reply

Hello,

Thanks for the tutoril, is great. When i create a event for example to track teh share on facebook. A event fire one times in tag manager but in GA4 i teh same events two times.

Do you know why i have this problem ?

Best

kyle rollins
  • Dec 18 2020
  • Reply

I'm trying to figure out the best way to setup 'click to call' events for websites... are these really not out of the box? I'm having a hard time believing this is not in one of the groups, did I miss it or do we have to create custom events?

thanks - great work!

    Julius
    • Dec 18 2020
    • Reply

    This is not out of the box and not among recommended events. Use custom event here.

      kyle rollins
      • Dec 28 2020
      • Reply

      OK thanks for the info. Strange to me that such an important function is not prepackaged.

Mark
  • Dec 23 2020
  • Reply

Great info as always! Do you have any idea if it's possible to modify the enhanced measurement file_download event parameter file_name? What's being reported is the path of the file instead of the actual file name.

For my old GA download event I built a custom javascript variable to split the click element and return the simple fileName section. It would be great if there's a way to use that instead of messy reporting with the entire path. Thanks for any insight you can provide!

    Julius
    • Dec 23 2020
    • Reply

    Yeah, sure. Disable file download tracking in enhanced measurement. And track that event on your own (by setting up everything in GTM and GA4 tag)

      Mark
      • Dec 23 2020
      • Reply

      HA! Of course. Simple and easy. I was busy trying to modify the built-in tracking. Thanks!

Saba
  • Dec 24 2020
  • Reply

For enhanced event tracking (automated one), how can we download the entire event report (like all search term report) instead of just 30 minutes real time one?

    Julius
    • Dec 24 2020
    • Reply

    Hi, please read the entire guide. The answer is there.

Sam
  • Dec 28 2020
  • Reply

How can we track form submissions using GA4

Alessandro
  • Dec 30 2020
  • Reply

Hello Julius,
I think this is a very useful guide.
But how can I set a custom event in GA4 if I am NOT using GTM?

    Alessandro
    • Dec 30 2020
    • Reply

    I mean a click on button event type.
    Thanks.

      Julius
      • Dec 30 2020
      • Reply

      Hi, ask a developer to do that (by followong the GA4 documentation) or learn how to code by yourself.

      Since my blog focuses on GTM, that's why I explain only that part.

Allen
  • Dec 31 2020
  • Reply

This is the greatest article series I have ever seen, thanks Julius.

Hunter
  • Jan 3 2021
  • Reply

Great article! This was very helpful and helped me overcome my issues. It was very hard to find a tutorial that had the updated GA and GTM versions. The level of detail was great. Thanks!!

Derya
  • Jan 6 2021
  • Reply

This is very helpful and amazing resource!It was so hard to find a tutorial about GA4.I have learned many things with this tutorial..Thank you so much..

jasmine
  • Jan 18 2021
  • Reply

Sorry, this question might be silly

but I want to as less as possible involve coding or developer

is it possible to fire an event without dataLayer.push code ?

in this article, it looks like i still need a developer to help me put dataLayer.push code to make event happened

does GTM have preset events i can use??

    Julius Fedorovicius
    • Jan 18 2021
    • Reply

    Hi, chapter #4 of this blog post shows an example without the developer's input.

Rocky
  • Jan 20 2021
  • Reply

Great Article, Can get the ISP provider name & Domain network type by following these steps? Thanks

Ken Weiner
  • Jan 25 2021
  • Reply

I enabled Enhanced Measurement and Video Engagement and added enablejsapi=1 to my YouTube embed URL whose IFrame is directly on the page. Yet, I still don’t see any video events show up in reporting. How can I troubleshoot this? Note, I am using GA4 via GTM and I didn’t do anything special like using the YouTube trigger. Do I need to?

    Julius Fedorovicius
    • Jan 25 2021
    • Reply

    I personally, still prefer more using Youtube trigger than GA4's youtube tracking. It just covers more situations. So if EM does not work for you, go manual

      Ken Weiner
      • Jan 26 2021
      • Reply

      Thanks Julius. I found my problem. My YouTube embed URL was declared as https://youtube.com/embed/{ytid} instead of https://www.youtube.com/embed/{ytid}. I guess the presence of "www" is important to the events firing, but not to the actual playing of the video. After adding the "www", gtm.video events get fired as expected!

Wolfgang
  • Jan 25 2021
  • Reply

Hi Julius,
really a great and helpful "how to" article.
One question: how to track content groups in GA4? Is this feature still available?
Thanks

    Julius
    • Jan 25 2021
    • Reply

    It is not available. Use custom parameters for that.

Lucio
  • Jan 28 2021
  • Reply

Hello.
Whether I use GA or GTM, is it possible to do cross-domain tracking if I don't own the destination domain?
The use case is, the user arrives to my site, clicks to register, it redirects him/her to an external login page which I don't own or have access to modify, then this login page call backs me (OAuth back and forth protocol) and there you have the conversion.
Since I left my domain and this secondary domain doesn't care about any url decoration, is it possible to know if it's the same user?

RichP
  • Jan 28 2021
  • Reply

Great write up, thanks for this.

Has anyone seen GA4 lumping everything into Source/Medium Direct even with UTM parameters set?

The same site shows the correct Source/Medium when using Universal GA.

    ShaneODub
    • Apr 28 2021
    • Reply

    I'm having the same - no success so far in finding out why

    gwsalles
    • Mar 13 2022
    • Reply

    Same here.

    What I realized is that GA4 fetches the UTM parameters for events ONLY in the URLs that have them.

    For example, I have a simple lead funnel with only two pages (landing page + thank you page).

    My "generate_lead" event is in the thank you page, but my UTMs only appears in my landing page URL.

    So what is happening here is that when I see the "generate_lead" event report, my source/medium are all "(not set)".

    When I see my conversion report I can see my source/medium, but still I would like to see it in the events report also.

Marshall
  • Jan 30 2021
  • Reply

Hi Julius. A slightly mistake in the section #4.1

There is one dash missing in the trigger you wrote in the blog.

Blog: site-nav__link–maind (incorrect)
Trigger: site-nav__link--maind (correct)

    Julius Fedorovicius
    • Feb 1 2021
    • Reply

    I have entered correctly in the admin of the text editor but the frontend changes two dashes into one long dash.

Sander
  • Feb 10 2021
  • Reply

Hi Julius,

Thank you for this clear overview. I have a question about the "recommended" parameters for the recommended events.

At this moment, I send the add_to_cart event (via Tag Manager) to GA4. With this event, I send "item" as a parameter (as recommended by Google). In GA4, I do see the item parameter in the debug view (real time). But when I go to events in GA4, I can't see anything of the items data I send with the event. Should I add the item data (such as item ID, item brand, item category, etc.) as a custom dimension in the Analyses Hub section? I thougt this goes automatically, because it's a standard/ recommended parameter that is recognised by Google?

Thank you,
Sander.

    Julius
    • Feb 10 2021
    • Reply

    1. Read GA4 ecommerce documentation to properly format the data
    2. After the event is sent, wait 24 hours

Damjan
  • Feb 12 2021
  • Reply

Thanks for your tutorials!

I’m following your post https://www.analyticsmania.com/post/contact-form-7-event-tracking-with-google-tag-manager/

And it works perfect
I have issue when I’m setting up events/ conversions in new Google Analytics for each Contact form 7

I’ve got two CF7 forms and
I’ve setup event for contact us page id of form is 3130
Matching conditions I’ve put these values
event_name equals generate_lead
form_id equals 3130

and for Parameter configuration
I’ve entered.

form_id [[3130]]

Can you please help me how I can track two different CF7 forms as two different events

thanks

Av
  • Feb 28 2021
  • Reply

Amazing article, amazing good job ! Thank you very much :)

Soumavo Dutta
  • Mar 3 2021
  • Reply

Have you found out more about the User_engagement in the Automatically tracked events?

Kristina Mariz Pabillar
  • Mar 11 2021
  • Reply

Hello Julius,

Thank you for all your help! I've set up the outbound link click event tracking in GA4 and UA because of your amazing tutorials!

May I ask if there's a way to organize those tracked links into folders, say I'd name each folder as the article title, and then rename the links inside too, so that it's easier to identify which gets clicked and monitor them? Right now, all I see are URLs and the only way to identify to which article they belong or which outbound article or item they are is to search them one by one on Google.

Hope to hear from you soon!

John
  • Mar 11 2021
  • Reply

Hi Julius,
I am very grateful to have found your blogs and videos about GA4 for the first time in search today. I have read several of the blogs.
What I am trying to do is track traffic ground in from my writers.
There are 2 types here:
1. Where I track traffic by author (1 writer is shown as author)
2. A less experienced writer I am using as a ghost writer - so show myself as Author but use tags to track her posts.
How do I track the traffic from the tags (2nd type) in GA4.
I did this in UA and had to setup Content Groupings (Author, Blog Post Category, Blog Post Tag). I could get the custom reports working for #1 but I could never get the Custom reports showing any data for #2 (tag tracking).
So if you can advise how to do this in GA4 that would be great!
Thanks in advance

Gregory
  • Mar 18 2021
  • Reply

Hello, Julius! Thanks for your work -it helps a lot. I'm now struggling to delete some unused events I have made and didn't find a way yet. I see that there is availibility to make some king of Data Deletion Request. Maybe t can help? I know you mentioned "And at the moment, you cannot delete unused events (which is unfortunate). Therefore, be careful about creating too many unique event names." Maybe any updates?
Thank you!

    Julius
    • Mar 18 2021
    • Reply

    No updates

Aurelien Bleriot
  • Mar 24 2021
  • Reply

Hello Julius, thanks for his very helpful article
I was wondering : in #4, you mention that once we run out of recommended events, we can create custom events using GTM wide array of triggers. Let's take the ecommerce recommended events "view_item_list" and "select_item". I think these are appropriate also for non-ecommerce lists, like for instance the menu (which is an item list) and clicking on its link. Should I also create a datalayer for each of these lists, or would you advise to create separate custom events as you suggest it in #4 ?
Best regards

Michael Ryan
  • Apr 6 2021
  • Reply

Why have they made tracking a simple contact form submission so complicated.

how do you track thing if you're using a universal analytics code on analytics 4?

    Julius Fedorovicius
    • Apr 6 2021
    • Reply

    Hi, I migrate GA4 to GTM and then do the implementation. It's more flexible and more powerful. It's time to move away from hardcoded setups.

calltrak
  • Apr 11 2021
  • Reply

I think a good call tracking software to look at is http://calltrak.io

gonzalo
  • Apr 16 2021
  • Reply

Its the best tutorial about GA4 and GTM, I was tired of searching spanish documentation before I found this. Congratulations!

Marcel
  • Apr 18 2021
  • Reply

Hi Julius,

Thanks for the explanation but i have a "doubt" that is still not clear for me.

When using GA4 and enable Enhanced measurement do i still need to create TAGS in GTM ? As i understand and see the data is available in GA4 or do i miss something. I dont understand why create a TAG in GTM for example track outbound links as it looks like it is there now as default? Or is there a different ?

Thanks

    Julius
    • Apr 18 2021
    • Reply

    You don't need to create tags for events that arw already automatically tracked by GA4

      marcel
      • Apr 19 2021
      • Reply

      Hi Julius, thanks for the quick reply. I checked the video again and on one point you remove the click from Analytics configuration and setup the same in GTM so that why i was confused.

      Thanks for info

Ann
  • May 11 2021
  • Reply

Hi Julius,

First, thanks for the blog.
I have 2 questions, I'd hope you can help me:
1. I would like to understand what it is the main difference between 'view_search_results'event (enhanced measurement) and 'search' event (Recommended)?
2. Although EE is enabled, I can't see the 'view_search_results'event in my debug mode? What can be possible reasons?

Thank you

    Julius Fedorovicius
    • May 11 2021
    • Reply

    1. Sounds like a bug/inconsistency on the GA end
    2. Thousands of things could have gone wrong. It's difficult to give a solution without seeing the actual situation. Maybe your website is not designed to support that feature, maybe you did something incorrectly. https://www.analyticsmania.com/post/track-site-search-with-google-tag-manager-and-google-analytics/

Matthieu
  • May 11 2021
  • Reply

Hi Julius,
Thanks a lot for your great tutorials. Following them i experiment SAAS product analytics with it and get pretty good results

I just have one main issue with custom event analytics with GTM / GA4: they are
1. I implemented an event following step by step your tutorial (event when clicking on one CTA of our application)
2. In GTM everything is running great : the event is fired once when clicking with all the parameters
3. In GA4 events is fired, counted, parameters are fully ok BUT THE EVENT IS HITED TWICE in GA 4 ??

Checking more in details in the 2 hits there are few differences with parameters/ value : request number (value is different), engagement time (value is different), system property (not available in one hit).

Do you have any explanation / helps to solve this problem ?
According to google research it seems to be a commun issue but not solution finded...

    Sebas Reinders
    • May 26 2021
    • Reply

    Hi Mathieu,

    I have exactly the same problem. Everything works fine, tags and triggers are correctly installed. However, I get all these events twice in GA4. Have you already found a solution?

    Or Julius, do you maybe know how this happens and how we can solve this?

    Kind regards,
    Sebas

    Sebas
    • May 26 2021
    • Reply

    Hi Mathieu,

    It's me again, I found the solution on the internet. This works for me:

    "EDIT: I finally have the solution!

    If you created the event within GA4 and then sent it over via GTM then it gets sent as an event twice, you only have to do it in GTM, not also create it in GA4.

    So go to Events >> Create New Event >> then locate the event and delete it - GTM will create it automatically from the tag.

    I hope that helps?

    Sophie"

    https://webapps.stackexchange.com/questions/152009/why-is-google-tag-manager-click-event-received-twice-in-google-analytics-4

      Matthieu
      • May 27 2021
      • Reply

      Thanks Sebas. I founded exactly the same solution and wanted to share it with you but you commented faster than me :-)

      Works for me too.

      To give a bit more precision maybe use full for others. My mistake come from misunderstanding : i thought creating the custom event in GA4 was a mandatory step in order to see the event sent via GTM.
      That's wrong.
      Event hit by GTM are "automatically" hit into GA4.

      So the behavior that generate event twice :
      1. The custom event "lala" is hitted by GTM --> 1st event
      2. Custom event created in GA4 worked in this way : IF event_name = "lala" THAN create a lala event --> 2nd event

Angel Mendez
  • May 25 2021
  • Reply

Nice article as usual. My question: 25 limits for Event parameters per event includes the automatic collection?.

Thanks in advance!

Matthieu
  • May 27 2021
  • Reply

Thanks Sebas. I founded exactly the same solution and wanted to share it with you but you commented faster than me :-)

Works for me too.

Jérôme Foulon
  • May 27 2021
  • Reply

Hi everyone,

I don't understand how to put a value on a custom event/conversion.

I put in GTM in event parameters 2 rows, one with "value" as parameter name and a 35 (as 35€) as a value and for the 2nd "currency" and "EUR"
I get results in google analytics at the conversion level but the system is not using those datas as Total Revenues.
I wonder if my setup in GTM is right or if i missed smthg in Analytics.

to mke it short : what i want to do is to put a value as Use the event value as the goal value for the conversion. that we had in UA.

Thank you !

    Jérôme Foulon
    • May 27 2021
    • Reply

    i just put this to be able to follow the potential answers

DecR
  • Jun 16 2021
  • Reply

Great article. THanks so much. Question...

In universal GA, we can track "events" (i.e. every single event interaction) and "unique events" (i.e. aggregated events within a single session).

In GA4, I only seem to be able to see "events" and not "unique events". Is that correct?

THanks

    Bart
    • Jun 22 2021
    • Reply

    Yes, I am also worried about the lack of such a "unique events" metric.
    You can only look at the uniqueness of events through the User, but it also will not tell us as much as "unique event".

      DecR
      • Jun 22 2021
      • Reply

      THanks

Bryan
  • Jun 16 2021
  • Reply

Does GA4 provide any support for tracking page printing, or do we need to do something like this, still? https://www.analyticsmania.com/google-tag-manager-recipes/print/

    Julius
    • Jun 17 2021
    • Reply

    No built-in support. You will need to adapt that solution you shared i the comment.

Revel
  • Jul 13 2021
  • Reply

Hi Julius,

I desperately need a report going back 6 months that counts the number of outbound links clicked.

I've got the enhanced measurement defaults activated but no trigger set up in GTM (Which we installed 3 months ago).

Aside from the last 30 mins I can't find a way to distinguish and report on click events where outbound=true.

Is it as all possible for me now to build such a report?

Does the historical event data contain values for the outbound parameter going back as far as the enhanced measurement defaults were activated? - which was when the property was created 6 months ago.

If so, and I can't report on it in GA, is there anyway I can extract that data?

Sharon
  • Jul 15 2021
  • Reply

I am having the same issue as Revel - looking forward to your response. Thank you!

Nahuel
  • Aug 1 2021
  • Reply

Hi Julius, I'm using select_item to track clicks on products and I would like to use something similar to track click on categories (products belong to categories).
For this, I created a custom event "select_category" which reuses most of the parameters of the "select_item".
The event is being tracked but I can't see the ecommerce parameters in my explorations.
I tried creating a custom dimension for the "items" array, but I still can´t see my event parameters. Do you know what I´m missing?
Thanks!

Frank Vasquez
  • Aug 6 2021
  • Reply

Hi, Julius. Thanks for share. What happen in GA4 if I change the tag names in GTM? Is necessary change the event names in GA4 or not? Also, what happen with the data of this events in GA, it reset to zero for this changes? Thanks. Regards from Peru.

    Julius
    • Aug 7 2021
    • Reply

    Tag name in GTM has no impact on data in GA4 or anywhere else

      Frank Vasquez
      • Aug 7 2021
      • Reply

      Thanks, Julius, and sorry, I wrote bad, I mean event name inside the tag in GTM, what happen if I change this in GTM. Regards.

        Julius
        • Aug 7 2021
        • Reply

        Then all *new* events will have that new name.

          Frank Vasquez
          • Aug 7 2021

          Thanks, Julius!

Den
  • Aug 7 2021
  • Reply

Hi julius..

Nice piece.. exactly what i am looking for..

I am a newbie with digital marketing and has very little knowledge with javascript.. i am dealing with multiple login method (email, facebook and google account) for my signup page. How do i go about capturing the signups.. thanks so much..

    Julius
    • Aug 7 2021
    • Reply

    Ask a developer to push login info to the data layer.

Mahmoud M
  • Aug 14 2021
  • Reply

As always simple and complete
thank you dear julius

Giovannni
  • Nov 3 2021
  • Reply

Hi Julius! Thanks for sharing this amazing article!

I am facing a problem that I have never come across with GA4.

I configured a recommended sign_up event using GTM, the event is working with expected behavior. It's firing normally, I validated it in real time on GA4 and also in GTM preview mode. But that's where it gets weird:

GA4 shows the sign_up event in Real time
GA4 shows the sign_up event in Explore
GA4 does not show sign_up event in Reports > Engagement > Events
GA4 does not show sign_up event in Configure > Events

Without showing the event in Configure I can't mark this event as conversion and import to Google Ads to optimize campaigns.

Do you have any tips, have you come across something similar?

Thanks!

    Julius
    • Nov 3 2021
    • Reply

    1. Did you wait 24 hours?
    2. You still can create a conversion. Just go to configure > conversions and enter the event name manually.

      Giovannni
      • Nov 3 2021
      • Reply

      Yes I did. I think is almost 4 or 5 days.

      I thought about creating it manually, but I ended up preferring to wait for the event showing up. I am now considering creating manually because of this slowness.

      Thanks!

Jason Williams
  • Nov 8 2021
  • Reply

As an event in GA4, the file_download count is 279 and it is "marked as a conversion." In the conversions, the count is 0. It's been marked as a conversion for a week.

What has gone wrong here?

    Julius Fedorovicius
    • Nov 9 2021
    • Reply

    Difficult to say without doing a depeer audit

Benjamin
  • Nov 18 2021
  • Reply

Hey, I am currently setting up the measuring for our new GA4 domain parallel to the current UA (2 different page views, one to UA and one to GA4). So far so good. Enhanced measurement seems to work, I can see the events in the live debug view.

It gets frustrating when trying to send more (recommended) events like for example view_cart. I built myself a specific items variable for view_cart from the dataLayer values I got and when I am viewing the cart on our page and send an event via console that triggers the GA4 view_cart event it gets sent to the debug view including all parameters pretty nice.

But it doesn't work with a regular trigger, no matter if I set the event tag to fire when reaching the cart page in case of a page view, DOM ready or window loaded. The event gets shown in the Tag Assistant window, I can see it in the console but it's not reaching GA4. Only when I manually activate the event via console push command it works.

Any idea if I am missing the obvious?

    Benjamin
    • Nov 19 2021
    • Reply

    I know where my problem is coming from/related to: the Google Consent Mode. Recently I was launching the feature with the help of a Google support member and was familiar with the gcs parameter. I now realized when debugging for another time that the gcs was set to 100 on all my additional events, which made no sense since I allowed Analytics and saw a gcs of 101 for the other events.

    I now simply paused the consent mode tag and relaunched the preview. And suddenly the events keep coming in.

    Will investigate this at some other point since the consent mode is optional experience for us atm, but maybe someone else can be helped with this.

Nam Nguyen Ba Hoang
  • Dec 24 2021
  • Reply

Thanks about your insightful and actionable tips of GA4 - I've already setup and somewhat understand the basic of analytics custom event.

ECE ÖZLÜ
  • Jan 17 2022
  • Reply

Hi there, thanks for all the information and great tutorials!

I was wondering how can I use "click element" instead of "click class" to track clicks? Because on my site there are no "click class" variables for menu links. I can see them as "link clicks" with the "click element" info but not the "click class". Thank you!

    Julius Fedorovicius
    • Jan 17 2022
    • Reply

    You need to learn CSS selectors to use the click element

Goran
  • Apr 5 2022
  • Reply

Hi Julius, in "Create new events (in the GA4 interface)" section you used two parameters for the trigger: "event_name equals page_view" and "page_location contains thank-you".

Is the "page_location" parameter alone note enough? Is there any specific reason you used "event_name" as a mandatory parameter?

    Julius Fedorovicius
    • Apr 5 2022
    • Reply

    There can be many events that happen on a particular page. Without event_name you will match too many events.

      Goran
      • Apr 5 2022
      • Reply

      Thanks!

Rex
  • May 3 2022
  • Reply

Thanks Julius for this informative article.

Melissa
  • May 24 2022
  • Reply

I'm really excited about what I learn from this blog and video. Thanks a lot!

Axel Nilsson
  • Jun 10 2022
  • Reply

Hi

I'm fighting with a problem regarding custom events in GA4, and I can't find info about it in your excellent guide above.

I have set up a number of custom events in GTM, where som are supposed to be marked as "Conversions" in GA4's Configure/Events view. Now, the problem is the custom events created in GTM don't show up in GA4 until they are triggered at least once. And before they are available in GA4 I can't mark them as conversions.

Is there any way to manually declare events in GA4 already created in GTM before any interaction with the events have been performed?

    Julius Fedorovicius
    • Jun 16 2022
    • Reply

    Yes, go to Configure > Conversions and enter events there

Manuel Calvelo
  • Jul 12 2022
  • Reply

Julius, as always, excellent practical clear guide. I used this article to set up the GA4 events tracking for out company.

Albeiro
  • Aug 2 2022
  • Reply

In the case of measuring the thank you page, are two parameters necessary? with page location is enough?

    Julius
    • Aug 8 2022
    • Reply

    Are you talking about "Create event" feature? No, page location is not enough because many different events can fire on that particular location.

Vicky Scott
  • Aug 3 2022
  • Reply

If you already have events set up in Universal Analytics, do you need to change the code on your website for it to be tracked in G4?

    Julius
    • Aug 8 2022
    • Reply

    If you use GTAG, I highly recommend it. If you use an older GA tracking code, it is necessary.

Isi
  • Aug 10 2022
  • Reply

Hi Julius,

A big thanks for such a long explanation.

I want to track the thank you page after sending the contact request on my site. For that, I created an event in GTM interface. But before creating this tracking on GTM I used the automatic event (page_view) for creating the same conversion tracking on GA4 interface. There I used a parameter of page_title and as a value "contains: thank_you/"

The next day I have seen 50 conversions. That is the converions were not counted correctly.

Is it enough to create a tracking tag for contact request sending on GTM, or is it recommended to do it in GA4, and how can I implement it correctly in GA4.

Thanks again,

Isi

JT
  • Aug 26 2022
  • Reply

Hi Julius, first off, excellent write-up. This is super thorough and detailed.

With regards to event parameters, in your example spreadsheet it looks like parameter names are shared between multiple events such as the "method" parameter that is shared between the "login" and "sign_up" events. Do parameter names need to be unique (e.g. "login_method" and "sign_up_method") so that you can create one custom dimension for each? I was a bit confused when setting up a custom dimension so I wanted to confirm.

When setting up a custom dimension for "method" to be used in analysis/reporting, am I only setting up one dimension for "method" that will be used for both "login" and "sign_up" events then when I create a custom report add a filter for Event name exactly matches "login" or "sign_up"?

The way I understood parameters is that they can be shared across multiple events and you will still need to register a custom dimension for each parameter.

WL
  • Oct 25 2022
  • Reply

Hi Julius,

Do all these automatically tracked or enhancement events setup also apply for a server side tracking setup? Would we need to automatically create these events instead?

Thanks!

Vuser
  • Oct 30 2022
  • Reply

Hi! I have some questions about the prices in GA4 events, because unfortunately, there are some contradictory examples in the Google Analytics documentation...

This is an `add_to_cart` event example:

gtag("event", "add_to_cart", {
currency: "EUR",
value: 14,
items: [
{
item_id: "asdf1",
item_name: "asdf1",
discount: 3,
price: 7,
quantity: 2
}
]
})

I am assuming that:

1. The value of the item `price` is the unit price (price per unit, independent of the quantity) (7 € / unit).
2. The value of the item `price` is the final price after any discount is applied (7 (final price) = 10 (original) - 3 (discount)), and not the original, pre-discount one (10).
3. The value of the `value` event parameter is the sum of each item's final price (price * quantity, e.g. 7 * 2 = 14 €).

Is that OK?

Another example (`purchase` event):

gtag("event", "purchase", {
transaction_id: "0001",
value: 24,
tax: 5,
shipping: 6,
currency: "EUR",
items: [
{
item_id: "asdf1",
item_name: "asdf1",
discount: 3,
price: 7,
quantity: 2
},
{
item_id: "asdf2",
item_name: "asdf2",
discount: 4,
price: 5,
quantity: 2
}]
})

I am assuming that:

1. All the monetary amounts are calculated without including taxes.
2. The value of the `value` event parameter is the sum of each item's final price (7 * 2 + 5 * 2), but without including taxes and shipping.

Is that OK?

Thank you.

Gary
  • Nov 2 2022
  • Reply

Anyone ever identify a record id such as a guid that can be used to uniquely identify a specific event record? I need this for tracking unique event occurrences downstream in other systems after we extract this data. I'm currently using combination of 6 fields including user_pseudo_id, event_name, ga_session_id, etc which is super inefficient. I can assign my own surrogate id but be so much easier if they provided one.

Pranav
  • Dec 15 2022
  • Reply

Hii Julius,
Thank you for such amazing content!
I have a question about the custom events. So, I am trying to use recommended events in most cases even if its not so ideal from reporting side.
Example, I send generate_lead as an event for all form submissions and {type of form} information is sent under a method parameter (example, contact_form, booking_form etc).
This method works. But I am stuck with pageview related conversion.
So I have a specific page (eg: discovery_call) that I want to count as a separate pageview event (eg: discovery_call_pageview).
I set it up as a custom event through GTM.
Now in my GA4,
I can see usual pageview events and discovery_call_pageview event.
However, it is screwing my total events metric as discovery_call_pageview is also counted under default pageview event.
How do I avoid the duplication in such cases? Please advise.
Thanks!

Carmen
  • Dec 16 2022
  • Reply

Hi Julius,

Thanks for the step by step explanation. Really useful!

I was wondering if you know how to enable debug mode on Shopify?

Can't find an article explaining how to do that.

Many thanks!

Jon
  • Jan 12 2023
  • Reply

Hi Julius,

Great stuff. I have a question. A client of mine uses a 2+ Pageview as a goal. Meaning, they track the number of sessions that have viewed at least 2 pages on the site. I thought I set up the metric correctly via audiences and separately for events, but neither is triggering as a conversion or as an option as a conversion. Any recommendation of a proper setup to do that?

Sebas
  • Jan 16 2023
  • Reply

Hi Julius,

Currently, I am tracking events for our website. I installed this for purchases, logins, registers, etc., using your guide.

They all seem to trigger many more times (not just twice) than they actually happen. I have no idea how this is possible. Can you maybe help me out and see what goes wrong?

I thought the problem was not using a value, however, this would then still not be a problem for login and register and they also seem to trigger many more times than expected.

Kind regards,
Sebas

Maggie H
  • Jan 17 2023
  • Reply

This is a very clear and helpful guide! Thank you for putting this together.

I’m having trouble seeing an event I created in GTM in the Explore report. I called this event “internal_link_click and it measure all clicks on the site. I can see this event populate in real-time and also in the reports section. However if I want to view more data around this event in the explore section, it doesn’t appear at all. Any idea of what could be wrong here?

    Julius Fedorovicius
    • Jan 17 2023
    • Reply

    Hi, make sure at least 24-48 hours have passed since you sent the data. Also, select the correct date range in explorations, make sure the report does not have filters.

      Maggie
      • Jan 19 2023
      • Reply

      Yes, I’ve had this event running now for over a month. The event appears in my Report, but does not show up in Explore. When I set my dimension to event name, it seems to list all my events except this one - internal_link_clicks. Could it be because this was created in GTM versus in the GA4 platform? Are there major differences when you create events in GTM versus the GA4 interface? Thank you!

Ben
  • Jan 18 2023
  • Reply

Hey Julius,

Thanks for this guide but I'm missing something.

When click tracking in UA, I could nest all menu item clicks under the same category, 'menu'. That way, I could keep everything neat and tidy.

Is there a way to do the same with GA4 events? I can't figure it out?

Thanks

    Julius Fedorovicius
    • Jan 18 2023
    • Reply

    Just send the event called "menu" and then send a parameter with that event link_url

Eric
  • Jan 27 2023
  • Reply

Wow, this is very helpful! Huge thank you!

Do you know how I could create an event that fires if someone is on the site for more than 30 seconds?

Maggie
  • Feb 8 2023
  • Reply

Hi Julius, I'm learning so much from your content. Appreciate all these great resources. Maybe you can help with this question. I'm using GA4 Explore to look at the session source/medium breakdown from my tracked events. I also use Total Users as a value to look at the users from these sources as well. Let's say I'm tracking views to a specific page and the the total event count is 1811. If I want to look at the source/medium of this event in a chart table I can see a variety of different source/mediums and the event total is still 1811. However, If I add Total Users to this chart, then the event count decreases from 1811 to 1617. Also I only see a 4 results of session/source data. If I do the same for just Total Users in the event, I also only see these limited session source/mediums, and do not see all the breakdowns when I use the event count only. Are you able to explain this change in numbers? Also, is it not recommended to look at the user count from tracked events? Thank you!

Leave a comment Cancel reply

Your email address will not be published. Required fields are marked *

 

Hi, I'm Julius Fedorovicius and I'm here to help you learn Google Tag Manager and Google Analytics. Join thousands of other digital marketers and digital analysts in this exciting journey. Read more
Analytics Mania
  • Google Tag Manager Courses
  • Google Tag Manager Recipes
  • Google Tag Manager Resources
  • Google Tag Manager Community
  • Login to courses
Follow Analytics Mania
  • Subscribe to newsletter
Recent Posts
  • How to Track Gravity Forms With Google Tag Manager: Complete Guide
  • Introduction to Google Tag Manager Server-side Tagging
  • 3 Ways to Pull Data from Data Layer with Google Tag Manager
Analytics Mania - Google Tag Manager and Google Analytics Blog | Privacy Policy
Manage Cookie Settings