Set Up Custom Events Directly in GA4

Discover how to integrate custom events directly in Google Analytics 4, empowering you to collect precise data on every visitor action

While GA4 doesn't automatically track all events, setting up custom events allows you to capture valuable insights tailored to your specific website or mobile app.

Automatically collected events, enhanced measurement events, and recommended events may already track the data you need. Hence before diving into custom event setup, it's essential to check these alternatives. Please have a look at them if you are not familiar with these three types of events in Google Analytics .

You can directly set up some custom events in GA4, or alternatively, you will have to set them up using GTM. In this article, we'll focus on setting up custom events directly within GA4 interface.

Custom Event Example
Custom Event Example

To create a custom event based on existing event in Google Analytics, you'll require four key elements:

  • custom event name, a trigger, custom dimensions, and additional parameters.

How to Create a Custom Event Directly in GA4?

Once you've successfully created a custom event in GA4, the good news is that you can easily replicate its structure to create another one.

Now, imagine a scenario where you want to track visits to your "Thank you" page, indicated by the presence of "thank-you" in the page's URL.

With the "Create Event" feature in GA4, you can easily set up a custom event based on an existing event (in this case page_view ) to track every visit to pages containing the "thank-you" in the URL.

By default, Google Analytics automatically tracks essential events like page_view . In order to set up our custom "thank you" event, your existing page_view event will be the basis.

Follow the simple steps below to create this specific custom event:

If an event you want to track isn't included in enhanced measurement events, go through the recommended events and consider using their naming structure and parameters. If none of the recommended events meet your requirements, create a custom event in Google Analytics 4.

Rules and Limitations of Custom Events

  • Your event name should not exceed 40 characters. Crossing this limit will prevent you from marking it as a conversion .
  • Avoid using event names already reserved for automatic, enhanced, or recommended events. For instance, you cannot send the  session_start  or  first_visit  events by custom. You can find all the reserved names here
  • Your event names must contain only letters, digits, and underscores and must begin with a letter. Do not use spaces. It is advisable to utilize only small characters.
  • The event can have up to 25 event parameters.

For further information, you may read Google's articles on event limitations here .

Why Do You Need Different Events in GA4?

Understanding the importance of different events in GA4 becomes apparent when considering the diverse requirements of each website and business.

For instance, while tracking page visits is very common, monitoring specific features like a website's chat box usage is only relevant for websites that have this functionality.

IMPORTANT NOTE

Your custom parameters cannot be seen in other GA4 reports, even though you will see them in Real-time reports and DebugView. Until you add these parameters to Google Analytics as custom dimensions. To learn how you can register your event as a custom definition, visit our document about custom dimensions in Google Analytics 4 .

Then please wait. The custom parameters will begin to show up in your Google Analytics 4 reports within the next 24 hours.

Table Of Contents