In Google Analytics 4 (GA4), events are specific interactions or occurrences that take place on your website or app.Â
Events allow you to understand how users behave on your propertyâhow long they stay on your site, how many submit a form, and other such insights.Â
GA4 has several default and automatically recorded events, but it also allows you to track unique behaviors as custom events.
What Are Custom Events in Google Analytics 4?
Custom events are optional events that you can create in Google Analytics. They allow you to capture data about user interactions on your website or app that Google doesnât already record.Â
For example, you can create a custom event to track how many times a specific page was viewed (such as a confirmation page) or see which forms people use most often to sign up for your newsletter.
Custom Events vs. Other Event Types
Google Analytics custom events are distinct in that theyâre created by you to track data that GA doesnât otherwise cover.Â
Before creating a custom event, you should make sure that the user behavior you wish to track isnât covered by another event type.
Google has three other event types:
- Automatically collected events: Are basic events automatically recorded in GA4 that canât be turned off. They include session_start (triggered when a user engages your website or app) and user_engagement (triggered when your webpage is in focus or your app is in the foreground for one second or more).
- Enhanced measurement events: Allow you to track additional events without having to adjust your code or configuring Google Tag Manager (GTM), but they can be turned off. Examples include view_search_results (triggered when a user views a search results page on your website) and file_download (triggered when a user clicks a link to a downloadable file).Â
- Recommended events: Provide additional insight into user behavior. Unlike automatically collected or enhanced measurement events, recommended events arenât recorded automatically. Instead, you set them up based on your needs.
Further reading:Â Google Analytics 4 Events Guide: Event Tracking Explained
How to Create Custom Events in Google Analytics 4
There are two primary ways to create Google Analytics custom events: in the GA4 interface or in Google Tag Manager.Â
Creating events in the GA4 interface is simpler but only lets you create events based on existing ones. While creating events in Google Tag Manager is more involved but allows you to be more specific in your data collection.Â
We recommend choosing the method that will best help you measure what it is you want to know.
But first, check that the event you want to track isnât already collected in GA4. Review Googleâs list of automatically collected events (this list includes enhanced measurement events) and recommended events to see if Google can already collect the data youâre looking for.Â
And get familiar with event names to make sure your custom events donât use the same name as any of GA4âs automatically collected, enhanced measurement, or recommended events.
Keep the following rules in mind when naming your events:
- Event names must start with a letter
- Event names can only include letters, numbers, and underscoresâno spaces or other special characters. We recommend using âsnake caseâ (all lowercase letters and underscores for spaces).
- Event names are case sensitive. Meaning âcustom_event,â âCustom_Event,â and âCustom_eventâ would count as three different events.
- Event names shouldnât use any of the reserved event names or prefixes. If they do, Google Analytics will display an error message.
Also, keep in mind the character limits for custom event and parameter names:
- Event names have a maximum limit of 40 characters. This is particularly important to note if you want to mark your custom event as a conversion. If it has a name longer than 40 characters, the appended â_câ will be missing and the event wonât be tracked as a conversion.
- Event parameter names have a maximum limit of 40 characters
- Event parameter values have a maximum limit of 100 characters
Now, letâs go over the two methods for creating custom events:
Creating Custom Events in the Google Analytics 4 Interface
The GA4 interface offers a simple way to create custom events based on existing events. Itâs not as comprehensive as creating custom events in Google Tag Manager (GTM), but itâs a good option for those who donât have GTM installed.
Letâs say you want to track downloads of a specific assetâa welcome packet with the file name welcome-packet.pdfâon your website.Â
Enter Google Analytics 4, then navigate to the gear icon, click âEvents,â and click âCreate event.â

Next, click âCreate.â

On the next screen, name your custom event and configure its parameters.Â

For this example, weâll name the event âwelcome_packet_download.â Because this event is based on the existing file_download event, weâll set the âParameterâ to âevent_name,â the âOperatorâ to âequals,â and the âValueâ to âfile_download.âÂ
To track downloads of this specific file, weâll set the parameter âfile_nameâ to contain the âwelcome-packet.â

Next, save your new event.
Note that the custom event will only fire when an event occurs on your site or app that matches all of the conditions youâve specified.
Now that youâve successfully set up your GA4 custom event, the next crucial step is ensuring it's accurately tracked. Weâll delve into this later.Â
Creating Custom Events with Google Tag Manager
Google Tag Manager lets you create completely new events that donât need to be based on events already sent to Google Analytics.
Now, log in to GTM. And click âNew Tagâ from the âOverviewâ screen.

Youâll then see the screen below.Â

Name your tag something thatâs easy to understand. For this example, weâll track views of a welcome page. Then, click âTag Configuration.â

From the menu that appears, select âGoogle Analytics.â

Next, select âGoogle Analytics: GA4 Event.âÂ

If you havenât yet, find your measurement ID and save it as a variable that you can re-use by clicking the icon to the right of the âMeasurement IDâ field. (Otherwise you can copy and paste it in the âMeasurement IDâ field.)

Next, enter your event name, keeping in mind naming best practices. This name will show up in your reports, so make sure itâs easy to understand.

Now, itâs time to define the action that you want to track.Â
This is known as the trigger. Itâs the specific condition or set of conditions that you define to determine when a particular tag should be fired.Â
For this example, we want to track each time someone views a specific page: a welcome page with â/welcomeâ in the URL.
Scroll down and click âTriggeringâ (it appears directly under the âTag Configurationâ module) to open the menu.
Once the âChoose a triggerâ menu opens, click the â+â symbol in the upper right-hand corner. This allows you to set up a custom trigger to fire only on the pages you specify.

In the next screen, name your trigger.Â

Next, click the âTrigger Configurationâ module.Â
A list of options will appear, and youâll want to select the trigger that aligns with what youâre trying to track. In this case, weâll select âPage View.â

You now have the option to specify which pages the event will fire on. So, select the circle next to âSome Page Views.â
Now, select âPage Pathâ in the first drop-down menu and choose âcontainsâ in the next drop-down menu. And add âwelcomeâ to the text field. (This specifies that the event will fire when a user views a page with a URL path containing âwelcome.â)

Donât forget to click âSaveâ in the upper right corner.

Youâll now be taken back to the screen with the âTag Configurationâ and âTriggeringâ modules.
Once again, click âSaveâ in the upper right corner.

Youâll be taken back to the âOverviewâ screen. And you can see it now says â2 Addedâ under âWorkspace Changesâ to indicate that youâve created a new trigger and a new tag.

To push the changes live, click âSubmitâ in the upper right corner.Â

In the screen that appears, youâll need to add a name in the âVersion Nameâ field and a description in the âVersion Descriptionâ field.
Then, click âPublish.âÂ

How to Make Sure Custom Events Are Being Tracked in GA4Â
Now that youâve created your custom event, youâll want to make sure itâs firing properly using the âRealtimeâ report. Which shows activity from the last 30 minutes.
In GA4, click âReportsâ > âRealtime.â You can manually trigger your event (by viewing your welcome page, in this case). Then, see if it appears in the âRealtimeâ report.
If your event is being tracked, you should see your âwelcome_page_viewâ event show up under âEvent count by Event name.â

Using DebugView in GA4 to Check Custom EventsÂ
If youâve tested your event and arenât seeing it in the âRealtimeâ report, try using âDebugViewâ in GA4.
This feature provides visibility into how your custom events are being captured and processedâensuring accurate and effective tracking.
Youâll first have to enable debug mode for the device(s) youâll be using to test.Â
Once you do that, click the admin icon and select âDebugView.â

Here, you'll see a real-time stream of events, allowing you to immediately validate and troubleshoot your custom event implementation.Â

Image Source: Google
How to See Custom Events in GA4 Reports
Youâve created your custom event and checked to see that it works. Now, itâs time to view the data you wanted to track with this event.
The âEventsâ report shows all of the tracked events that occur on your site.
In Google Analytics, click âReportsâ > âEngagementâ > âEventsâ to view the âEventsâ report.

Click on your custom event in the table at the bottom to view more detailed data, such as how many users triggered the event and information about the parameters.

Setting Custom Events as Conversions
Letâs say you want to designate your newly created event as a conversion in Google Analytics 4. Because it provides valuable insights into your websiteâs performance or user engagement.Â
Hereâs how:
Navigate to the admin section by clicking the gear icon. Then, go to âConversionsâ > âNew conversion event.â

Then, simply add your custom event name and click âSave.â

Unlock Insights with Custom Events
Implementing custom event tracking in GA4 is your key to unlocking nuanced insights into user behavior by monitoring customized metrics that matter to your business. Whether itâs newsletter subscriptions, asset downloads, button clicks, or other crucial interactions.
By tailoring your approach, you can pinpoint specific user activities, drill down into granular data, optimize your strategies, and harness the full potential of GA4.Â
But thatâs just the beginning. You can also use Semrushâs Organic Traffic Insights to combine data from Google Analytics 4, Google Search Console (GSC), and Semrush into a single dashboard.Â
It allows you to seamlessly analyze landing page performance, keywords, and other crucial metricsâincluding conversions:

Then, you can leverage this data to inform your decision-making.Â