When you're configuring the tracking system on your website, you might find that there are some actions that might be harder to track than others. For instance, you might have actions that are not related to a specific URL, a submission, a button click, an outbound click, or any other common trigger types. Custom events allow you to capture these unique actions that align with your business goals. This quick and easy guide will show you how to track custom events in Google Analytics 4 (GA4) via Google Tag Manager (GTM)!
How to Track Custom Events in Google Analytics 4 (GA4) via Google Tag Manager (GTM):
Navigate to your Google Tag Manager
Create a new Tag
Under Tag Configuration select "Google Analytics 4: Event"
Copy and Paste your GA4 Measurement ID ➡️ You can find in Google Analytics under Admin > Data Streams. If this is the second time you're setting up events, the system will have a record of your Measurement ID
Name your Event
📝 Note that the event name will be the name displayed in the Google Analytics 4 reports under event count.
Under Triggering, create a new Trigger
Choose Custom Event as your Trigger Type
Insert the name of the Custom Event exactly as it fires ➡️ In order to provide the exact Event Name for the Custom Event, we need to preview the Google Tag Manager, as follows:
Preview your Google Tag Manager
Navigate to the page which is connected to the Tag Assistant
Take the action you would like to track
Navigate to the Tag Assistant
Select the event name under the left-hand-side column
Navigate to Variables
Copy the event name and inform your trigger accordingly
Save and Publish your Google Tag Manager
Keep in mind that it might take up to 24 hours for the results to show in Google Analytics 4.
Frequently Asked Questions on Tracking Custom Events in Google Analytics 4 (GA4) via Google Tag Manager (GTM)
What's the difference between standard and custom events in GA4?
Standard Events are pre-built events that GA4 tracks automatically or recommends for common user interactions. Think of them like built-in tracking for universal actions such as:
Page views
Scrolls
Clicks
Purchases
Sign-ups
Custom Events These are events you create yourself to track specific interactions unique to your site. For example, you might create custom events to track:
Video plays on your custom video player
Submissions of your newsletter signup form
Clicks on specific promotional banners
What are the limitations of custom events in GA4?
Dimension and metric limits:
Maximum 50 custom dimensions per property
Maximum 50 custom metrics per property
Parameter registration:
Custom parameters must be registered before they'll appear in reports
Without registration, the data is collected but not visible
Name restrictions:
Event names have character limits
Parameter values must stay within specified lengths
Some reserved event names can't be used for custom events
Comments