Google Analytics 4, which is event-based analytics, was first introduced. A pageview, a purchase, etc. There are so many things you can learn about them, which eventually led to this blog post as well as a video tutorial.
Today I’ll show you how to track events using Google Analytics 4 or Google Tag Manager.
Yes, I could add a few more paragraphs to this introduction to hook and intrigue you. But I’m being honest. This article is huge. This article contains valuable tips and information that is almost 8000 words long. Every artificially added paragraph would be just plain disrespectful.
Keep in mind, however, that this guide is primarily focused on the setup. A chapter will be added that will give you a brief overview of the reports. This will allow you to see event data, including custom events.
Upgrade to Google Analytics 4
Before we move on, I also created a blog article as well as a Youtube video regarding upgrading to Google Analytics 4. This blog post is best viewed in 2020 or 2021.
This tutorial and video will explain:
- Do you need to upgrade?
- You can use only Google Analytics 4 (and delete the older version)
- How do you upgrade to GA4?
If you’re reading this tutorial in 2022, or later, you shouldn’t worry about upgrading from GA4 (because GA4 will most likely be your main Web Tracking platform).
Comparison of Universal Analytics (GA3) to Changes
Note If you aren’t interested in Univreersal Analytics skip this chapter.
Universal Analytics (a.k.a. The data model in Google Analytics 4 has a lot more flexibility than Universal Analytics (the older Google Analytics version). This means there are fewer required fields/parameters and restrictions than in the UA.
There are 4 parameters you can send to Universal Analytics with each event (except custom dimensions). This is the most important difference in events.
- Event Category (required).
- Event Action
- Event Label (optional).
- Event Value (optional).
When you open the Universal Analytics Event Reports, you will first see the Event Category. You can click the Event Category to drill down (to view action and then label).
Google Analytics 4 allows for more flexibility in naming conventions. It all depends on who is setting up the tracking system.
GA4 has a parameter called EVENT Name. Everything else is dependent on what you have in mind. You can only send one parameter. You can also send four additional parameters to better describe the event. Let’s take, for example, the request demo form that was submitted by someone to your website. The following could be sent:
- Name of the event: request_demo
- product_name: amazing product
- company_size 99-250
- company_industry Internet and telecom
- annual_revenue 50-100M
You can send custom parameters together with events by including the last four items from the above list. There are limits on the number of custom parameters you can send together with an event. These limitations will be discussed in the blog post.
You can create any event you like, but there are some guidelines you should keep in mind. Let’s first look at four categories of GA events.
This blog post and a spreadsheet template will help you name/structure your events. Let’s first learn about the different types/categories that Google Analytics 4 offers and how to create/modify them. Before we can start to think about the structure, it is important that you have a solid understanding of GA4 events.
Four categories of events are available in Google Analytics 4.
GA4 events can be divided into four categories:
- Events automatically collected
- Events with enhanced measurement
- Events to consider
- Custom events
This is how to plan the structure of your events (names, parameters).
- You can check if the event you wish to track is one of the automatically collected events.
- Check if your event is listed among the enhanced measurement events (e.g. scroll and file_download
- Check the Recommended Events and their Naming Conventions
- Create a custom event with the event you are interested in
In the next chapters of this blog, I’ll explain where and how to find your event’s category. Once you are more familiar with events and how they work, I will give you some tips and a sample spreadsheet to help you plan the structure of your events as well as a naming convention.
Event Types Collected By Default
This guide will be primarily web-based and focus on web tracking. GA4 automatically tracks certain events. You can view the complete list here. You will find both web and app events on that list. The list of web events is actually a little longer than I expected. There are also Enhanced Measurment events.
Let’s ignore them for now and only focus on events that are automatically captured. This list of website event looks like this:
- First_visit. This refers to the user’s first visit to a website or launch of an app.
- session_start. When a user engages with the app or website, and begins a new session
- user_engagement. This event fires 10 seconds after the visitor leaves a page. It might also fire periodically while the app’s in the foreground. You can learn more here.
The page_view was not mentioned here as I added it to Enhanced Measurment. You can also see the app events here.
You have the option to use enhanced measurement when you create a web data stream using Google Analytics 4. This is a tool that allows marketers to get as many events as possible in their reports without having to work with developers or configure in Google Tag Manager.
You can open the Data Streams window by going to Admin > Select web data stream. There you’ll see the Enhanced Measurment section.
This feature will automatically track these events by default.
- Page view (event name page_view).
- Scroll Event name: Scroll
- Outbound link click (event title: Click with parameter outbound : true
- Site Search (event Name: View_Search_Results).
- Video Engagement (events video_start and video_progress, video_complete ).
- File Download (event Name: file_download).
You can also disable/enable individual events by clicking on the gear icon within the Enhanced Measurment section and clicking on the toggle buttons.
Some events can also be customized. Let’s take an overview of each event and the settings they are in.
page_view. This event is sent by GA4 to indicate a new page loading or a page URL changes without reloading (a.k.a. History change events
scroll. GA4 receives this event once per page if a visitor scrolls lower than the 90% threshold.
. This event is for the outbound URL click. A clicked link redirects a visitor on another domain. This event is also accompanied by an additional parameter outbound (with the value “true”) This parameter indicates that an outbound link clicked. This event is also sent with a number of parameters: link_classes and link_domain.
You can use Tagging Options to manage multiple domains for your business. The outbound link click event will not be triggered by any domains listed there.
View_search_results. If the URL contains a query parameter such as query, keyword, search, query or q, this event will be sent by Google Analytics 4. You can add more (up to 10) if you wish.
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). You can also include additional parameters to the URL search results page.
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. This parameter will then be tracked automatically by GA4.
video_start , video_progress , and video_complete . Enhanced Measurement can track interactions with embedded Youtube videos on your website. Then, it sends “video_ …” Events to GA4. However, embedded Youtube video players must have the enablejsapi=1 parameter. This is not always possible on all websites. You will also need to tweak Youtube video tracking for other reasons.
These nuances mean that automatic video tracking won’t work in all cases. I would personally recommend using GTM.
file_download. This event is sent by GA4 to indicate that a link has been clicked. It may contain one of these file extensions: , HTMLxls, HTMLxlsx or.docx. This means that the link opens/downloads files. It is currently not possible to add extensions to the GA4 interface.
After selecting the events that you want to track, click Save at the top right corner. Next, make sure that Enhanced Measurment is enabled (the toggle in blue).
Your Google Analytics 4 will automatically start tracking these events from that point. Refer to this chapter for more information on how to verify that your data is being received correctly.
Additional Events to Consider
As I mentioned in my blog post, you should first look at the automatically tracked events. If those events are being tracked, then take a look to the enhanced measurement events. If none of these events are applicable to your case, have a look at the recommended events . Google has several pages dedicated to different vectors.
You can check each list to see if there are any events that match your needs. If you need to track the time a user logs into their computer, you can find the login event in the “All properties” list.
Google Analytics 4’s data model is flexible. You can use a different name for login (e.g. log_in). However, Google recommends that your implement the recommended events whenever it makes sense to them. This will help Google Analytics to better understand your data so they can apply it in their Machine Learning capabilities. But, I don’t yet know the capabilities of these capabilities (at least not until 2020).
Google recommends certain parameters for most of these recommended events. The login parameter can be referred to as the method parameter. It might be worthwhile to track how users log in to your website using email or facebook login.
Let’s go back to the login example. Let’s suppose that visitors are able to log in to my website. I need to know the exact moment that visitors log in and what login method they used.
I asked a developer for the activation of the following DataLayer.push code to the user’s account when they log in.
The loginMethod value should be replaced by the user’s actual login method. It is the job of the developer to create custom code to replace it.
If a developer successfully implements this code, and I login in GTM preview mode I should see the following Data Layer events (see the screenshot below). This event is a GTM or Data Layer event. It has not yet been sent to GA4 or any other platform. It is a collection data points, which means that it can be sent further to GA4 or FB pixel (or any other analytics/marketing platforms that we use).
Go to Google Tag Manager > Triggers>> Custom Event. Enter the following settings and then press Save.
Next, go to Variables> User-definable variables > New> Data Layer Variable. Enter the following settings.
Because that’s exactly what a developer pushes to the Data Layer, I entered the loginMethod. Enter the name of your parameter if it is not listed. Important: Variable names must be entered in capital letters.
Once you have created a trigger and a variable, it is time to create an event tag for Google Analytics 4. We will then be able send the event data directly to GA4.
Go to Tags > NEW > Google Analytics: GA4 event in Google Tag Manager.
You should already be tracking pageviews and have a GA4 configuration tags. Read this guide, which also contains a video. To learn more about the migration process. The GA4 configuration tag usually contains your GA4 Measurement ID, and any additional configurations (if applicable).
When creating a new GA4 tag event, you will need:
- Define the GA property ID (also called a Measurement ID).
- Then, event name + parameters
In order to avoid manual work and setting up all the fields/customizations (such as GA Measurement ID) in every tag, you should select your main configuration tag in the event tag.
The concept of the Configuration Tag can be used to manage Universal Analytics in Google Tag Manager. It is very similar to the GA Setting Variable. That tag can contain a lot of settings/configurations. You can use the same tag in other GA4 tags to inherit the changes.
You can also add additional settings to your event tag. The event tag gets a higher priority if a specific parameter/field is defined in both the configuration tag and the event tag.
Let’s now create an event. Enter the name of your event. This is the event name. Google recommends that we use the name “login” because we are tracking the login event.
Let’s add a second parameter, the login mode. Expand the Event Parameters section and click Add Row. Next, enter the method in the Parameter Name box and then insert the Data Layer Variable you just created in the Value field. Click the button to insert the variable.
Why did I choose to enter the Method in the Parameter namefield Because I saw it in the Recommended Events.
What about custom parameters? What if you want to also pass the pricing plan of the user? Yes, that’s possible. But I will explain custom parameters/dimensions in the next chapter. It’s possible to send customized parameters with recommended events.
Now it’s time for testing. Now, enable the preview mode in Google Tag Manager. Log in to your website to verify that your GA4 Event Tag fired for this event. Click on the login Event in the Preview Mode’s left and check if it fired.
It’s a good sign that the tag is firing. You will now need to visit Google Analytics 4 to check the DebugView. This chapter will provide more information about .
You can also implement sales (also known as. You will need to follow Google’s requirements and use recommended events for Ecommerce tracking. Find out more.
4. Custom events
We have finally reached the last category in Google Analytics 4. You can create custom events if you wish to send an event that isn’t listed in the automatically detected events, enhanced measurement or recommended events.
Custom events are almost identical to the recommended events in terms of how they can be set up. Only difference is that custom events will require you to create your event names.
If you want to track clicks to a call-to-action button, for example, the name of an event can be any one of these:
- cta, etc.
You can also do anything else.
Update: The “500 unique event name” rule does not apply for web events. More
Let’s take a look at custom event tracking. We want to measure clicks on menu link on a website.
Note: Menu link click tracking trigger conditions vary on most websites due to different click classes, IDs and so forth. This example should be used as an example.
A demo website has several menu links I would like to track.
First, I must create a trigger that differentiates a click from a click on a menu link. Allow Google Tag Manager Preview mode to allow you to click any menu link on a website. After you click the first link, the Event Click event should appear in the Preview mode’s left-sidebar.
It’s not hard to see if you don’t.
- A page should have at least one Just Links GTM trigger enabled
- Or, enable “File Download” or “Outbound Links” tracking in your Enhanced Measurment Settings
Let’s suppose that you don’t use Enhanced Measurment in GA4. Go to Google Tag Manager >Triggers >New > Just Links. Save the trigger by adjusting the trigger to “All link clicks”.
This trigger will allow us to enable link-tracking functionality within Google Tag Manager by creating it.
Next, go to Variables> Configure in the “Built in Variables” section and enable all Click-related variables.
You can refresh the preview mode by clicking on the Preview button again.
Next, go to your website. Click any of the menu links. Click at least two of the menu links. You should see Link click events in preview mode. Go to the Variables tab and click the Link Clickevent.
Next, click on the second link Click event. I’m currently searching for a variable to help me distinguish a link click from a menu. My GA4 event tag should not be fired on every link click. It should be fired only on a link click.
After closer inspection, I noticed that both links have the same click Classes value, link-nav__link_main. By the way, navigation is “navigation” within this context. That’s great! This will be used in my Just Links trigger.
You can go back to your GTM container’s trigger list and click the trigger previously created for All Link Clicks. We will edit it and add the condition: click classes contains link-main
Save the trigger. It’s now time to create a Google Analytics4 event tag. Go to tags > New > Google Analytics: Ga4 Event. Enter the event name and select your GA 4 Configuration tag. The value of the event is entirely up to you. You can choose from any of these options.
- menu click
These are just a few examples. We can name the custom event however we like (as long we adhere to the limits of name length ).
In my case, I used Menu_click Event Name. However, this isn’t very helpful. It would be useful to know the most clicked menu items. We could also include the URL and the name of each menu item.
You could send additional event parameters to accomplish this. You could also use existing parameters in the documentation for the Enhanced Measurement, such as link_url and text. But let’s make two custom parameters. I want to show you how they can be configured.
Two parameters will be passed to me, menu_item_url , , and . You can also do this. This is the power of the data model’s flexibility.
To send custom parameters, expand the event Parameters section of the Google Analytics 4 tag, then click add row.
Enter the name for the first parameter. In my example, menu_item_url. I will insert a variable in the Value box that returns a clicked URL. GTM has such a variable already, it’s called . Click on the Insert variablebutton, then choose the Click URL option.
Let’s add menu_item_name. GTM also offers a built-in variable called Click text. You can also insert it. Visitors to your website may translate it, so the ClickText value can also change. You will therefore see a wider range of values in your GA4 reports.
You can send additional parameters if you wish. With a single event, you can send 25 custom parameters.
Assign the Just Links trigger previously created to this tag. Save the tag. Go back to the GTM Preview mode, and click on a few of your menu items. Return to the Preview mode, and click on those Link Clickevents. Verify that the GA4 event tags have fired for Menu Link Clicks.
You will now need to visit Google Analytics 4 to check the DebuggerView. This chapter will explain more about . Hit PUBLISH at the top right corner in the GTM interface after you have tested everything.
IMPORTANT These parameters must be registered as custom dimensions in Google Analytics. Continue reading the next section of this blog post.
#4.2 IMPORTANT: Register custom definitions
This applies to all event parameters that you send Google Analytics 4. You must create custom parameters in Google Analytics to be able to view/use them in Funnel exploration, Free Form and standard reports.
Go to Configure >Custom Definitions in Google Analytics 4. We must register both custom parameters we have sent with the menu link click.
Enter the following information by clicking on the Create Custom Sizes button:
- The parameter’s name. You can type whatever you like. This is how your reports will display the dimension. It can be named “menu_item_url”, “Menu item URL”, or any other name.
- Scope. Scope.
- Event parameter. Here you must enter the name exactly as it was in the GTM tag. You must type menu_item_url in this field if your parameter name is . If the autocomplete field doesn’t show your parameter, don’t be discouraged. Simply enter it and save the dimension
Register a second parameter (in this case menu_item_name), and then save it. Sometimes, I use “custom parameter” or “custom dimension” interchangeably. Custom metrics and custom dimension are generally grouped together as custom parameters.
Now we wait. The custom parameters will begin appearing in your Google Analytics 4 reports within the next 24 hours.
Sometimes you may need/want to edit events from the Google Analytics 4 interface. You can now do this. These features are described in detail in the next two chapters.
You can create new events in the GA4 interface
In GA4 the process of creating goals conversions is slightly different than in Universal Analytics. Simply click the toggle next to an configuration > Eventlist event.
There is one problem. All events that you mark as conversion after toggle the event will be considered. What if you only want certain events to be converted?
Example: You have a thank you page that users can visit when they sign up for a newsletter. Let’s say that the URL is https://www.mywebsite.com/thank-you/. Any pageview that I mark page_view as a converted pageview will be marked. How do I seperate only pageviews that occurred on the /thank-you/ pages?
You have two options: either you can send a separate event with a different name from Google Tag Manager/Gtag.js or you can use Create an Event in the GA4 interface.
This feature allows you create new events based on incoming events. Click Create Event on the Configure> Events page. Then click Create
Next, enter the name for the custom event. You can also name it however you like. It is important that the name conveys its meaning clearly. Thankyou_page_visit may be a good choice.
Let’s now move to the Matching Condition section. This section will ask GA4 about the type of event we are looking for. Once that event is spotted, our thankyou_page_visit page should also be created.
In my case, you must comply with the following conditions:
- event_name equals Page_view
- page_location contains Thank-you/
You can copy all parameters from the event to the new one by checking the box Copy parameters.
Modify can be used to correct a parameter’s name. If an event has the parameter pricingPlan, but you want it pricing_plan , you have the option to create a new field and reuse its value while removing the wrong parameter (by leaving New Valuempty).
Look closely at [[pricingPlan]] as shown in the screenshot. Double-square brackets indicate that GA4 will reuse in this event the value of the parameter pricingPlan.
After saving the changes, you can view them in the Realtime reports and the DebuggerView of GA4. This chapter will provide more information about .
You should also mark the event you created in GA4 as a conversion in Configure > Eventpage.
You can immediately create a new conversion if you don’t want to wait up to 24 hours. You can click the Configuresection in the left sidebar. Next, go to Conversions.
Next, click Create a new conversion event. Enter the name of your event. Click Save.
This will allow you to mark the thankyou_page_visit as a conversion without having to wait 24 hours for it to appear on the Configure >> Events page.
Modify Events (in GA4 interface).
You can use the Edit Events feature of the Google Analytics 4 interface if you don’t wish to create new events (like the chapter before).
Two page_view Events are visible in my Configure> Eventsreport.
Although I don’t know where the page_view?undefined came, I don’t want it to be in my reports. Although the number of events is small, I would like to correct it.
You can do this by clicking Modify Event in the Configure > Events Report.
Next, click create.
- Enter the name of the fix (this is internal use).
- Next, enter the matching condition. In my case that is event equals Page_view?undefined
- Then, make the necessary modifications (in my example, event_name and page_view).
GA4 will modify the name of an event that has the name to .
As you can see, this interface and flow is very similar to the Createfeature I described in the previous chapter.
After saving the changes, you can view them in the Realtime reports and the DebuggerView of GA4. This chapter will provide more information about .
Keep in mind, however, that you can only make 50 modifications to a property. This feature is not applicable to historical data. This modification is only applicable to new events.
Google Analytics 4 allows you to test your events
Now it’s time for you to test your events. The DebugView section is the main feature for debugging GA 4 data. It can be found by clicking Configure> DebugView at the left of the GA4 interface. Click it.
This is where you should do your debugging. This should not be mixed with Debug mode and GTM Preview. They are two completely different beasts.
There are several ways to enable debug mode in GA4 (each one will work)
- Allow the GA debugger Chrome Extension
- Include a debug_mode parameter with your event
- You have enabled Google Tag Manager Preview mode on the page you are debugging
In the case of the first option: Install the extension and click the icon to open it (so you can see ON ribbon). You will see your events in the DebugView from this point on.
Another option is to include a debug_mode parameter for every event you want to view in the DebugView.
You can do this in Google Tag Manager by opening the GA4 Configuration tag, and then adding the following parameter.
The debug_modeparameter must be set to true for the event to be displayed in DebuView. If you’re using a hardcoded Gtag.js, these are the instructions for how to include the Debug_mode parameter.
However, since we work with Google Tag Manager, enabling the GTM preview mode automatically sets the debug_mode true. Thus, the data will begin appearing in the GA4 DebView.
You can click on any individual event to see the DebugView. A list of parameters will then be displayed.
To see the GA4 value, click on that parameter. This is some fine debugging!
There have been delays in the event appearing on a website to DebugView. Sometimes I have to wait several minutes before the events appear. This is a little unfortunate, and the Google Analytics 4 team will make it better in the future.
Make sure you select the right Debug device at the top left corner.
Multiple visitors may have enabled the debug view (e.g. If multiple visitors have enabled the debug view (e.g. This is especially true for my blog. Many of my readers have enabled Google Analytics Debugger Extension, and I must guess which one (out of 15) is mine
However, things will look something like this once you see data inDebugView.
Click on the event to see all the parameters sent with it. To see the value of the parameter, click on it.
After you have checked that all data is correct and is being displayed correctly, submit your GA4 modifications to the GTM container.
Click the SUBMIT button at the top right and complete the rest of the steps the interface asks.
Afterwards, you will begin to see the new data in your real-time reports.
Go to Realtime in the left-hand sidebar of Google Analytics 4. Here you can see all the data that is coming into your reports. The new report, unlike the Universal Analytics version before it, allows you to view the data at a more detailed level.
First, you’ll see a map with a few cards showing traffic sources, most recent events, and the number users within the last 30 mins. (Universal Analytics real-time reports show the number users within the last 5 minutes).
You can also view the snapshots of individual users. Click the View user snap button at the top right.
You will then see a stream listing all the events for that user. To see more detail, click on them (just as in the DebView). Click the button to view another user/visitor.
To exit the snapshot press the Exit snapbutton at the top right corner.
Where can I find data about events in Google Analytics 4 reports
This blog post is primarily about setting up event tracking in Google Analytics 4. I won’t go into detail about how to find insights, answer questions, or raise questions. However, I can show several places that you can find event data from the email you just sent to Google Analytics.
Remember that Google Analytics 4’s built-in reporting capabilities are limited at the time of this blog post (late 2020). We hope that this will change soon. Let’s look at the reports we have right now. These are just a few of the reports we have:
- Configure > Event (this will only show the events with counts. There is nothing fancy.
- Reports > Engagement
- Explore (a.k.a. Exploration Reports
This is just the beginning. GA4 is an event-based analytical platform. Every report is affected (in some way or another) by the events you send. These are only a few of the many examples.
Report “Reports-Engagement – Events”
This shows you a summary of all events sent to your property, as well as a few charts. You will see a list below them and, if you click on one of them, you can get a more detailed look at the event’s data.
Explore (also known as: Ex Analysis Hub, Exploration reports
Here you can drill down into your data. You can use Explorations to access reports like Free Form, Funnel Exploration and Path Exploration.
Here’s an example Free Report. You will have to wait up to 24 hours before the data appears in your reports. Don’t be discouraged if the data doesn’t appear immediately.
Let’s suppose that I want to know how different device types interact with my menu bar. Did you know that I created the menu_click event.
Let’s now go to Explore and click the Block Free Form.
In the Variables Column, I must include the Menu_Item_URL custom dimension. This is because I want to know how many clicks each menu URL received. The menu_item_url dimension can be found by clicking the Plus icon. It will be added to the report’s list of dimensions if you select it.
If the menu_item_url or any other custom parameter is not visible, must be registered in Configure > Event > Manage Custom Definitions. Wait for the data to appear in the reports for 24 hours. Wait for the reports to work again if they don’t.
Let’s then edit the tab settings. You can remove the dimensions from the ROWS, and add the custom definition you wish to include. That’s menu_item_url in my case.
I used the Device category dimension in the COLUMNS section. Select the metric you want to see in the VALUES section. I used Event Count.
You will then need to filter to only those events that contain the menu_item_url dimension. This is a menu_click in my case. You should therefore enter the following filter at the bottom Tab Settings section: Event Name matches Menu_click.
This will display the device types that are clicking on menu items, their popularity and how often they were clicked.
If you have to, change the date range. This can be done in the top-left corner on the Exploration interface.
Event data can be used in reports like funnel reports. But let’s not forget it.
How to plan your event’s naming convention and structure
This chapter will only give you an overview of what to do. I hope to write an article dedicated to that topic in the future (once I have spent more time with Google Analytics4).
When it comes to actual planning, I believe that a spreadsheet can be your best friend.
- Note down all events you wish to track, and then:
- You should check if they fall within the following categories: automatically collected; enhanced measurement; or recommended.
- If so, then check the convention for event names and parameters (dimensions). You can also create your own values if the convention does not exist. Keep in mind, has some limitations regarding the length.
- Be aware that you may have to limit the number of events you can host. You can currently have no more than 500 unique events per property. You may want to consider combining events with the same name and adding an additional property if you reach that limit. Currently, there are 50 text properties, 50 numeric properties, and 500 unique events per property. You will find more information about registered properties later in this article.
This is a sample of the spreadsheet that you can prepare and then choose the correct naming convention. This can be used as inspiration or an example to help you create your own spreadsheet. Let’s look at the spreadsheet briefly.
There are two sheets.
- This is the first for the event list and what parameters you would like to track with them.
- The second is a list with explanations of the parameters.
The first sheet:
- You can describe a brief event in plain English by writing it down in column B
- Enter the name of the event you want to use in Google Analytics 4 in column A. This name should be chosen based on the previous process: review the automatically tracked events and enhanced measurement. Add a name to your event if none of them match yours. This principle is a good way to name an event. event_name (all lowercase, connected with an underscore). Event names like “Submitted the Form” will also work, but the all-lower-case-with-underscore looks cleaner (I believe that the term snake-case applies here).
- Column B refers to type (is it automatically collected, Enhanced measurement, recommended or custom? .
- Column D contains parameters you wish/plan to track with specific events. I didn’t include the default parameters that are automatically tracked for every event: language. Page_location. Page_referrer. Page_title. Screen_resolution.
You could also include a column called “Platform” if you’re dealing with mobile apps. Here you could enter “web”, “Android/IOS” and “web”.
The second sheet:
- Column A refers to the parameter name
- Column A refers to a platform. You can remove this column if you are only working with the website.
- Column B indicates the type (is this Built-in or Recommended? Custom? It is automatically tracked or used by Enhanced Measurement. Recommendations are for events that have been recommended. You can create your own event parameters.
- Column C is used for description (in plain English).
IMPORTANT This is a sample spreadsheet. It doesn’t mean that you have to follow it exactly. You can choose to take only a few parts and make it your own.
After you have created the plan, you can use Google Analytics to track events. Do not rush. You might end up paying the price in the end.
Google Analytics 4 Event Limits
Keep in mind, however, that there are limits and some are no longer valid (at least not for now). When it comes to limitations, I recommend that you refer here. It will probably be more current than my blog post in the future.
Here are some things to keep in mind:
- Events can be hit in any order, but there is no limit on total number of hits. Universal Analytics (free account) allowed hit limit per property to be 10,000,000. Google Analytics currently has no limit on hit per property. You never know what could happen in the future
- Each property can have as many as 500 unique event names. Enhanced Measurement events do not count. If you have login as well as Login events, they will count as two distinct event names. Some people have claimed that the 500 limit does not apply to recommended events. This is despite having heard it from Google support. Charles Farina, who confirmed the same thing, also confirmed that recommended events count towards the 500 limit.
- A property can be registered with up to 50 unique dimensions and 50 custom metrics. registered is the keyword. This means you need to go to Configure> Events > Manage custom definitions to have them set up. You are fine if you send additional custom parameters, but they have not been registered.
- Up to 25 parameters can be sent with an event
- Event names and parameters must not exceed certain lengths. Each (the parameter name and the event name) must not exceed 40 characters.
This page provides more information about the limits.
These resources will help you track events using Google Analytics 4.
These are some great resources you might find helpful:
- Easily collected events (by Google).
- Enhanced measurement
- Custom Dimensions
- Custom Metrics
- Configuration limits (by Google).
- 5 best practices to create your events and parameters using GA4 (by Ken Williams).
Track Events with Google Analytics 4 & Google Tag Manager: Final Words
It was a long guide! It was quite a lengthy guide. It was longer than I expected, but it wasn’t THAT LONG. The blog post is quite long because event tracking in Google Analytics 4 can be a complex topic. The Youtube tutorial, which is almost an hour long, supports this statement.
Let’s sum it all. Here’s how to track events using Google Analytics 4.
- You can see the events that are automatically tracked and what Enhanced Measuring has to offer.
- If you don’t see an event that you want to track, please check the Recommended Events and use their naming recommendations and parameters.
- You can create your own event if none of the events are suitable.
These are the main takeaways from this blog post. If you’ve only skimmed the article please take the time to read the entire article. Also, view the video . There are many pitfalls.
- In Google Analytics 4, everything is now an event Pageviews are also included in Google Analytics 4.
- No more Event Type, Event Action, or Event Label fields. You can manually create them as custom parameters if you wish, but this does not make sense.
- Google Analytics 4 properties can contain unlimited number of events (e.g. You can send 1 billion events to GA. The number of unique event names per visitor/user cannot exceed 500. The 500 limit does not include Enhanced Measurement events.
- With both custom and recommend events, you can send your own parameters (dimensions or metrics).
- A single event can contain up to 25 parameters.
- You must register a custom definition to be able to view a parameter in the GA4 Report. You can only register 50 custom dimensions per property and 50 custom metrics.
- Based on incoming events, you can create new events within the GA4 interface.
- Incoming events can be modified/fixed in the GA4 interface (e.g. If there are typos
- When migrating Universal Analytics events from GA4, you should not rely on Label fields, Event Action, Category and Tag fields. You need to rethink your naming conventions and parameters.
- Other limitations apply (regarding length of names/parameters etc.).
- To test the incoming events at a fine level, use Google Analytics 4 DebuggView
Have more questions about Google Analytics 4 and how to track events? Comment below to share your questions!