In the evolving world of digital analytics, precision is everything. Google Analytics 4 (GA4) has redefined how marketers and analysts collect and interpret user data. While GA4 offers a robust set of predefined events through its Automatic, Enhanced, and Recommended categories, the real power lies in custom events. These allow you to tailor your tracking to the unique behaviors and goals of your website or app.
Whether you’re monitoring clicks on a specific CTA, tracking engagement with interactive elements, or measuring micro-conversions, custom events give you the flexibility to capture what truly matters. In this guide, we’ll explore what custom events are, how to set them up, and why they’re essential for data-driven decision-making in 2025.
What is a custom event in Google Analytics 4?
Custom events in GA4 are user-defined interactions that you manually configure to track specific behaviors not covered by the default event categories. Unlike Automatic or Enhanced events, which are tracked out of the box, custom events require intentional setup and are ideal for capturing unique user actions that align with your business goals.
For example, if you want to track when users click a specific button, download a whitepaper, or interact with a custom widget, you’ll need to create a custom event. These events are especially useful for businesses with unique conversion paths or interactive content that doesn’t fall under standard GA4 tracking.
By leveraging custom events, you gain deeper insights into how users engage with your digital properties, allowing for more granular reporting, better segmentation, and more accurate conversion tracking.
How event tracking works in Google Analytics 4
The fourth revision of Google Analytics is event-based. This is in contrast from the previous version – Universal Analytics – that was session-based and treated web and mobile worlds as separate domains.
In Google Analytics 4, everything is an event: page view, page scroll, click on a link, downloading an app, etc. Because of this philosophy, correctly set event tracking is the foundation of working analytics.
So the first step for any marketer would be to consider which events they would like to track. A good practice is to create a spreadsheet with all the events listed there.
When creating names of the events, it’s best to follow Google’s guidelines on naming your events and understand event collection limits. In short: event names should not be longer than 40 characters, names are case-sensitive, and you should not use reserved names.
Once you know what you want to track, check if your events are already included in one of Google’s event categories.
Benefits of tracking custom events
Custom events in Google Analytics 4 can be tied to very concrete parts of your website or app, for example: clicks on menu items or reaching specific milestones in a mobile game. This way you can enrich your reports with very detailed data and/or treat such events as conversions to accurately measure your effectiveness.
Event categories in Google Analytics 4
There are 4 categories of events in Google Analytics 4.
Automatic events that are enabled by default and contain the most basic events that everyone should track.
Enhanced events that are also tracked automatically by default and provide an additional level of detail to your reports.
Recommended events are events which are included on a list that Google prepared for various industries. They need to be set up manually.
Events from these categories use default dimensions (text attributes of data).
The fourth category of events is a custom event. They should be used only when an event that you want to track isn’t included in any of the three previously mentioned categories.
Types of Custom Events
Custom events can be categorized based on the type of user interaction they capture. Each type serves a different analytical purpose:
Interaction Events
These track direct user actions such as:
- Button clicks
- Form submissions
- Navigation menu interactions
They help you understand how users engage with your interface and which elements drive engagement.
Engagement Events
These measure how users interact with content over time:
- Video plays or completions
- Time spent on page
- Scroll depth beyond default thresholds
These are useful for evaluating content effectiveness and user interest.
E-commerce Events
For online stores, these events track:
- Add to cart
- Begin checkout
- Purchase completions
- Product views
They are critical for understanding shopping behavior and optimizing sales funnels.
Social Sharing Events
These capture social interactions like:
- Shares to social media platforms
- Likes or reactions
- Clicks on social icons
They help assess the virality and social reach of your content.
By utilizing these various custom event types, businesses can refine their analytics to better align with their specific objectives and understand how users interact with their digital platforms.
Custom Events Limitations
While custom events offer flexibility, they come with several limitations that marketers should be aware of:
Character and Naming Constraints
Event names must be under 40 characters, are case-sensitive, and cannot use reserved names. Poor naming conventions can lead to inconsistent data and reporting issues.
Parameter Limits
Each event can include up to 25 parameters. Exceeding this limit can result in data loss or incomplete tracking.
Cardinality Issues
Using too many unique values (e.g., dynamic URLs or user IDs) can lead to high cardinality, which may cause GA4 to group data into “(other)” in reports—making analysis difficult.
Debugging Complexity
Custom events often require manual testing and debugging, especially when implemented via code or tag managers. This can slow down deployment and increase the risk of errors.
Data Sampling and Delays
GA4 may apply sampling to reports with large datasets, and real-time data for custom events may be delayed—impacting time-sensitive decisions.
Set up custom event tracking in Google Analytics 4
You can create a custom event in Google Analytics 4 in the following ways:
- Creating a custom event in Google tag manually (web)
- Creating an event in Google tag Manager (web)
- Creating an event in Firebase (mobile)
- Creating a custom event based on an existing event in Google Analytics 4 directly
We will go over each of the methods briefly. Please note that all methods have their caveats and additional parameters that you can use – this guide won’t cover all cases and options. It rather aims to give you a general idea about how custom events are tracked in Google Analytics 4.
Custom event in Google tag
The first method allows you to create an event manually by adding a command in JavaScript as a part of the Google tag snippet or in a separate JavaScript file that you then import into your HTML.
Google tag is a script that connects your web page with a Google Tag Manager. It uses gtag.js API to send events to Google Analytics. To create a new event, use the gtag() function.
The syntax is as follows:
Where:
- <event_name> is the name of your custom event that will be visible in Google Analytics
- <event_parameters> are optional parameters that provide additional information about an event.
Note that the command has to be launched AFTER the Google tag snippet is loaded and Google Analytics won’t accept any event that was launched before the tag.
Custom events in Google Tag Manager
Google Tag Manager is a great tool for managing scripts from various platforms in one convenient place. Instead of editing all your pages manually whenever you want to add / update / remove a script, you can do this easily in GTM.
Google Tag Manager also connects nicely to Google Analytics 4 and requires no coding skills to update a script or create a new event.
To create an event in GTM, you need two things:
- Tag – It defines the type of event and passes additional parameters
- Trigger – It defines when an event should be launched.
Let’s first familiarize ourselves with various options you have to set up events according to your needs.
Preview mode
At this point it is worth introducing the preview mode in Google Tag Manager. It enables you not only to observe changes you made to tags without spoiling your statistics in Google Analytics, but also help you set up new tags.
In custom events especially, triggers are often tied to concrete objects on a web page, such as menu items or forms, and very often you have to find the ID of this object to make sure that this trigger fires only when it is supposed to. You can use the preview mode to find those IDs or links and observe, if a trigger has been launched.
Each tag or event can be set up with a variable. Variables pass replaceable information and can be used in triggers and events: in the former, to tie it to a specific element on the page, and in the latter, to pass information to Google Analytics 4.
Variables may contain information such as links, video IDs, form IDs, object class IDs, etc. Use them to make events more relevant.
Variables are launched using logical conditions. This way you can set triggers to launch when a specific link is clicked or a specific video is played.
You have built-in variables appropriate for various property types. If those are not enough for you, you can specify user-defined variables in Google Tag Manager.
Predefined triggers and events
There are predefined triggers that you can use instead of manually configuring a custom one. Custom triggers are usually used with modified form submissions, so in most other cases you should use the predefined ones. You can still adjust many settings or ad variables of predefined triggers and review how they work in the preview mode.
As for predefined tags – choose a Google Analytics: GA4 event from the list of predefined tags to make sure that this event will be passed to Google Analytics 4.
Setting up a custom event in GTM
It’s best to create a general trigger that you can then configure to narrow down launch conditions. So for example, if you want to track clicks on a specific link, create the ‘Just links’ trigger and then start to configure it. Select ‘Some events’ and define appropriate variables. To make sure that this trigger launches only when a given link is clicked, select the ‘Click URL’ custom variable and provide the link name.
Go to the preview mode and verify whether the trigger behaves as expected.
Once your trigger is set up, create a Google Analytics 4: GA4 event type. Provide a name for the event that will be visible in a report in Analytics. Find a necessary Measurement ID. In Google Analytics 4, it is referred to as Tracking ID. You can find it in Admin settings in GA4 when viewing relevant data streams.
Set up optional parameters that you want to pass to Google Analytics (for example, link name) and assign the trigger that you have just created.
Custom event in Firebase
Firebase is a part of Google Analytics dedicated for logging events in mobile apps. Depending on the platform, the implementation of custom event tracking in Firebase will differ. However, it is generally very similar to creating a custom event in Google tag.
You just have to add appropriate commands to the Analytics SDK. Use the logEvent() method to set up custom event tracking and implement additional parameters.
It is worth noting that Firebase logs several types of events by default.
Custom Event in Google Analytics 4 based on existing event
If you want to track an event that is not included in the Automatic, Enhanced or Recommended categories, you can create a new one in Google Analytics 4 directly based on an existing event. Such a new event will be connected to the original event but will also include additional parameters.
Head off to Admin settings, go to ‘Events’ and then hit ‘Create’. To tie a new custom event with an already existing one, add the ‘Event type’ parameter, select ‘Equals’ condition and provide the original event name.
You can add additional parameters, such as page location that contains a specific link name, to make sure that this event is only registered when it is supposed to. Save such an event and you are all set!
You may be wondering, why bother with Google Tag Manager if creating a custom event in Google Analytics using an existing event is so easy… The answer is that Google Tag Manager allows for a more complex setup. For example, if you want to launch an event on page scroll, in GA4 you can only do this for the 90% page scroll depth, while with GTM you can customize it however you like.
Custom Event in JavaScript
You can also implement custom event tracking in Google Analytics 4 using JavaScript. It allows website owners to gather specific data about user interactions and behaviors that are not automatically tracked by GA4. By using JavaScript, custom events can be programmed to capture valuable information, such as button clicks, form submissions, or video views, providing a more comprehensive understanding of user engagement.
React GA4 Custom Events
To track custom events even more efficiently, marketers can use the integration of GA4 custom events in web applications built with the React JavaScript library. React allows developers to create dynamic and interactive user interfaces, and by implementing GA4 custom events within React applications, they can track user interactions effectively, gaining insights into how users engage with the application and its components. This integration is valuable for React developers seeking to optimize user experiences and make data-driven decisions to enhance their web applications.
Custom Events Testing
Before deploying custom events live, it’s crucial to test them thoroughly to ensure they fire correctly and collect the intended data.
How to Test Custom Events in GA4
- Use Google Tag Manager’s Preview Mode: This allows you to simulate user interactions and verify that your tags and triggers are firing as expected.
- Check the DebugView in GA4: Navigate to Admin > DebugView in your GA4 property. This real-time tool shows incoming events from your browser or app.
- Use Chrome Developer Tools: Inspect the network requests to confirm that the
gtag()
orlogEvent()
calls are being sent correctly.
Testing ensures that your custom events are not only firing but also passing the correct parameters—saving you from data gaps or misinterpretation later on.
Custom Events Make Your Reporting Richer in Data
Capturing more detailed data allows for a clearer understanding of what is going on your pages. You can go to the ‘Events’ report in GA4 or create new reports using the ‘Exploration’ module and custom event name as a dimension to view the results of your setup. Each custom event provides you with an additional layer of understanding of users’ behavior and their motivations.
The benefits vary from one case to another, smaller businesses should do fine with just automatic and enhanced events. On the other hand, even a small bookstore could use additional data on who visits their recommendations page. It’s a balance of the amount of work put in to set everything up and then analyze the benefits of it.
It is important to know that the set up process is relatively easy and the decision to capture additional events should be strictly a business one.
Capturing events with Voluum
Voluum is an event-based performance ad tracker that uses two methods of recording events: a direct script-based one that is similar to how Google Analytics 4 operates, and a redirect one that is great when you cannot edit your pages. That is often the case with offers sourced from 3rd parties such as affiliate networks.
Voluum can record the following event types:
- Impression (page view)
- Visit (click on an ad)
- Click (click on a CTA button on a landing page)
- Conversion (with up to 20 manually set custom conversions)
While it is significantly less than Google Analytics, Voluum has several advantages over Google Analytics 4.
Firstly, as we have said before, it can record conversions from offer pages that you don’t have edit privileges for.
Secondly, it allows you to view live data, while Google Analytics 4 has a delay of around 1 hour. This is a huge deal for performance marketers that work on a large scale and react quickly to how the market changes and audience fluctuates.
Thirdly, it allows you to re-route traffic instead of only analyzing it. With rule-based paths that segmentize the audience and Traffic Distribution AI for automatic A/B testing you can quickly discover what works and squeeze more profits out of your performance marketing campaigns.
Fourthly, Voluum is a GDPR-compliant privacy-oriented ad tracker that doesn’t scan your data to train its algorithms or a media buying team. Take the ownership of your data with Voluum and track EU citizens legally.
Voluum is not a direct competitor to Google Analytics 4, it is a platform tailored for a narrower, more performance focused group of marketers that want to optimize their campaign funnel on the fly, not only analyze it. If you are to learn a new platform that Google Analytics 4 is, you might as well give Voluum a try. It is much easier to master. With many API-level integrations with popular ad exchanges, social networks and search engines that allow setting automation rules, Voluum can become a true marketer’s dashboard.