Track Google Analytics 4 events by following these processes to create them in the GA4 dashboard itself, and via Google Tag Manager.
- What is a Google Analytics Parameter?
- What are the differences between events in UA and GA4?
- Automatically Collected Events
- Enhanced Measurement Events
- Recommended Events
- Why Use Google Analytics 4 Recommended Events?
- Custom Events
- Naming Google Analytics 4 Custom Events
- Create with the GA4 Dashboard
- Create with Google Tag Manager
What are Google Analytics 4 Events?
Events are the foundation of Google Analytics 4 data. They are triggered by user interactions on your website and/or app. There are four types of events in Google Analytics 4: automatically collected events, enhanced measurement events, recommended events and custom events.
Each Google Analytics 4 event includes five parameters by default:
“Parameters are additional pieces of metadata that add context to event data.” In addition to the five default parameters listed above, each event can contain up to 25 additional custom parameters. This is different from Universal Analytics (GA3), where events only contained four parameters, none of which was customizable.
According to Google: “The value assigned to event parameters must be 100 characters or fewer; however, the page_location, page_referrer and page_title parameters must be 300 characters or fewer.”
In some cases, the five default parameters will be sufficient for your event. If not, 25 custom parameters is a very high number and it’s unlikely you’ll reach this limit with any given event before you include all your desired parameters.
Some automatically collected events and enhanced measurement events will include additional default parameters that do not count against your count of 25 custom parameters. Recommended events included recommended parameters, but since Google doesn’t create these events for you by default, you’ll have to add them yourself when creating recommended events.
What are the differences between events in UA and GA4?
In Universal Analytics, events are their own “hit type” and have up to four built-in parameters: Category, Action, Label, Value.
In GA4, however, every “hit” is an event and the platform doesn’t distinguish between hit types.
As mentioned in the previous section, Google Analytics 4 events come with five default parameters, plus up to 25 more custom ones per event. Outside of Category, Action, Label and Value, UA does not allow for custom parameter creation.
Google Analytics 4 Event Types
There is an order in which you should utilize Google Analytics 4 events, beginning with automatically created ones all the way up to custom. Here is a pyramid to help you visualize.
What this means is that, whenever you want to track something as an event, you should start at the bottom of the pyramid and see if it’s available. (This will make more sense after you read the descriptions below of each event type.) If not, move up to the next level of the pyramid.
In other words, you should only use recommended events if you can’t find the event you want to use in automatically collected nor enhanced measurement events. And if you can’t find what you’re looking for in any of those three bottom levels of the pyramid, then and only then should you create a custom event.
Automatically Collected Events
Automatically collected events and they’re determined by Google, and their function is self-evident by their names. Below is a list of the ACEs for web. (Click the link above to see ACEs for apps.)
Enhanced Measurement Events
Enhanced measurement events are all included in automatically-collected events, so why are they listed in a separate category? Because while all the rest of the automatically collected events will feed into Google Analytics 4 no matter what, you can “opt out” of collecting enhanced measurement events.
These are the enhanced measurement events in Google Analytics 4:
I recommend leaving EMEs turned on, but if for some reason you want to opt out of any in particular – or all of them – you can do so upon setup or at anytime once your dashboard is live.
To turn off enhanced measurement events in Google Analytics 4, go to Admin > Data Streams > select the data stream for which you want to turn off enhanced measurement events. You will then see a popup that looks more or less like this:
You can turn off all enhanced measurement events by clicking the on/off toggle I circled in the above screenshot.
Alternatively, you can click the settings cog symbol, which will open a window like the one here, where you can individually choose which EMEs to leave on and which to turn off.
Recommended events are not out-of-the-box ready such as with automatically collected events and enhanced measurement events. They are, however, “reserved” by Google for your use. What does that mean?
Let’s say you want to track every time someone signs up for a newsletter on your website. There is no automatically included nor enhanced measurement event that would logically be used for this. The next step, then, would be to review the list of Google-recommended events and see if one of them might fit the bill.
There is, in fact, a recommended event called “sign_up”. Now, just like any event that’s not included in the first two event categories, you can use “sign_up” to track anything you want on your website. But it would make the most sense, of course, to utilize it when someone signs up for something.
There are two possible complications, depending on what people can sign up for on your website. Fortunately, they both have simple solutions:
1) If you have more than one newsletter on your site. If you use the sign_up event to track multiple newsletter signups, this would be a great opportunity to add an event parameter that distinguishes between different newsletters. The parameter names could be as simple as “politics,” “sports” and “entertainment.”
That way, all your newsletter-signup data is housed within the same event, but you can also drill down to see, for example, who signed up for your politics, sports or entertainment newsletters, respectively.
2) If you have different types of unrelated signups on your website. Perhaps users can sign up for both newsletters as well as for a user account. In this case, you have two options:
A. Use the same solution in scenario 1: distinguish via event parameters. Use the sign_up event for all types of signups, but distinguish between signup types with parameters. e.g. For newsletters signups, use something like “politics_newsletter” and “sports_newsletter” as your parameters, and for account signups use “create_account”.
- Pro: You will benefit from Google reporting features and integrations (see below) since both events utilize a recommended event.
- Con: At the event level, all your data for two somewhat unrelated user actions will be mixed.
B. Your other option is to use the “sign_up” event for one of the events and use a custom event for the other. These could be “sign_up” and “new_account”, for example.
Why use a Google Analytics 4 recommended event?
Google says that by adhering to their recommended events schema – i.e. event name and parameters – you could benefit from feature integrations and updates in your reports:
You should send recommended events with their prescribed parameters to get the most details in your reports and to benefit from future features and integrations as they become available.
Custom events are the only type of events in Google Analytics 4 that you would create from scratch without any pre-built settings. They also include the five aforementioned default parameters. Any other parameters you create would be considered custom.
When would you create a custom event in Google Analytics 4? You would only create custom events in Google Analytics 4 if the action you want to track is not included in any of the three previous levels of events (automatically included, enhanced and recommended).
For example, let’s say you want to track every time someone triggers both the “scroll” and “user_engagement” events on your product page. You could create an event called “engaged_product_visit” that is triggered whenever someone triggers both the “scroll” and “user_engagement” events while their page_location (essentially the URL) matches your product page.
We’ll explore this example more in-depth below when we talk about actually creating events, but the key factor here is that no event like this already exists in automatically collected nor enhanced measurement nor recommended events, which means that as a “last resort,” you must now create a custom event.
Naming Google Analytics 4 Custom Events
To keep things organized and aesthetically pleasing, I recommend following Google’s existing scheme for event creation. That is, all lowercase and with underscores instead of spaces. In fact, Google expressly tells you not to use spaces in its documentation.
Can I use spaces instead of underscores in Google Analytics 4 event names? Yes, but your dashboard will look much cleaner if you follow the existing schema.
Can I use uppercase letters in Google Analytics 4 event names? Yes, but for the same reasons, I would only do so if it’s part of a proper noun or perhaps an acronym.
Can I use numbers in Google Analytics 4 event names? Yes, though I would only do so if necessary.
Are Google Analytics 4 event names case-sensitive? Yes. e.g. “sourdough_bread” and “Sourdough_Bread” would be tracked as two separate events.
Are there any reserved prefixes and event names in Google Analytics 4? Yes, you can see the full list by clicking the previous link.
Track Google Analytics 4 Events
(The following steps assume you have already set up Google Analytics 4.)
There’s one thing you should know before getting started with creating Google Analytics 4 events: You may not use personally identifiable information (PII).
Create with the GA4 Dashboard
In Google Analytics 4, click “Configure” at the bottom of the left pop-out menu.
On the subsequent page, click the blue “Create Event” button. That will bring you to the following screen, where you should click the blue “Create” button.
That will bring you to the following page, which is where all the magic happens.
Using our aforementioned example – an engaged user triggering the scroll event on a product page – we would list each of those conditions in the Configuration:
As you can see, we have named our event engaged_product_scrolls, and in order for it to register, both the scroll and user_engagement events must fire with a URL that contains /product. In this imagined scenario, every product would have a URL that was something like xyzbusiness.com/product23483/basketball-shoes.
If we only wanted this event to fire for this one particular product, then the page_location would have to equal /product23483/basketball-shoes. Notice that page location is identified by everything after the top level domain (TLD), which is “com” in this case.
If you didn’t want to copy the exact same parameters from the source event, you would uncheck the box you see and add modification(s).
When you’re finished, click the blue create button at the top-right portion of the screen.
Create with Google Tag Manager
If you, like me, prefer to use Google Tag Manager to install Google Analytics events, you can do so by creating a new tag.
From the Overview page, click “Add a new tag.” (This can also be done by going to the Tags menu, below Overview, and clicking the “New” button once on that page.)
Click Tag Configuration and select the Google Analytics: GA4 Configuration tag.
Since Google Tag Manager gives us more event-creation capabilities, we’re going to use a different example here. In this case, I’m going to add a recommended event – sign_up – every time someone subscribes to receive email notifications about new posts on this website.
I’m going to do this by tracking clicks on the “FOLLOW” button in the footer of my website.
By running a test with Google Tag Manager preview mode, I can confirm what already seems obvious by looking at the button: The click text is “FOLLOW”. So I’m going to create a trigger in Google Analytics to fire every time someone clicks a “FOLLOW” button on my site. Since there is only one follow button on the whole site, I don’t have to worry much about this picking up unrelated clicks.
Here’s how I set up the Trigger in Google Tag Manager:
And here’s how I set up the Tag in Google Tag Manager, naming the event exactly as Google recommends:
Once the tag and trigger are properly set up, I can publish the latest version of my Google Tag Manager container, and the event will be live on the site.
You should see data begin to show up in your dashboard in around 24 hours or less.
If you want to test it beforehand, you can use the Debugger View, under Configure, in the GA4 dashboard. You can also test it simultaneously using the Google Tag Manager preview mode if you in fact set up the event using GTM.
Do you have any questions about creating events in GA4? Did you run into any problems I didn’t cover? Let me know in the comments.