Event Tracking In Google Analytics 4

The dawn of  Google Analytics 4 (GA4) marked the beginning of a whole new era for data analysis.

Of course, there was a growing need for a more flexible and advanced solution as user behavior and technology evolved.  

Thankfully, Google’s innovative approach revamped data collection and gave businesses a powerful tool to understand their online audience.

The upgrade was no less than a revolution. It offered unprecedented control and empowered businesses to track website behavior and user actions.

Event tracking in GA4 is a fundamental component that captures diverse interactions beyond clicks and scrolls. 
This guide will discuss its intricacies to help you wield it strategically and transform your data insights like never before. 

What Are Events In Google Analytics 4?

Events are the specific actions users take while engaging with your digital platform. They encompass all the user interactions, including video views, clicks, form submissions, and more.

But how does this make a difference? 

It allows businesses to understand how visitors interact with their applications and websites beyond the typical pageviews. 

By knowing the most watched videos, most popular buttons, and most downloaded items, you can tailor your strategies to meet your target audience’s personalized needs. 

You can build an online space where their needs are not just met but anticipated and exceeded. After all, understanding your audience is the name of the game.

It results in effective marketing strategies, improved content, and high user engagement.

How Does It Work? 

Google Analytics 4 transformed the traditional concept of ‘hits’ into a more sophisticated system. Instead of being confined to a fixed set of hit types – as seen in Universal Analytics – GA4 adopts a highly customizable model. 

It enables businesses to collect precise and personalized data beyond the constraints of predefined hit types like pageviews, screen hits, and social interactions. 

Say you launched a new product.
GA4 event lets you track every move a visitor makes on your website.

Did they view the product and share it on social media?
You’ll know. 

Did they read customer reviews before adding the product to their cart?
You’ll find out.

Did they hesitate during checkout and initiate a live chat?
GA4 events will register those interactions, too. 

Overall, it provides a more holistic view of customer behavior, which was previously missing. 

Why Bother With Event Tracking In Google Analytics 4?

Even tracking isn’t merely about tracking website activity, but decoding user behavior and elevating experiences.

When you delve into metrics beyond page views, you gain valuable insights that help shape your strategies and make data-driven decisions. 

Pages People Load on Your Website

Event tracking helps you discover popular pages and uncover user interests. The high-traffic areas, for instance, of course, contain something that draws user attention. 

Likewise, if your product pages are visited only occasionally, you can optimize them for a better user experience and boost your sales. 

Actions Performed on a Page

Understanding specific actions like form submissions and clicks lets you refine your website layout. 

For instance, by tracking your article clicks, you can identify the trending topics and strategically add related articles. 

This will, eventually, increase user engagement and the average time spent on your website. 

Fine-grained Ecommerce Interactions

Event tracking in GA4 allows you to set up ecommerce events.

They enable you to identify your best-selling products through product and transaction details. 

After all, businesses go above and beyond to know that – events in GA4 only simplify it for you. 

Likewise, you can also see the impact of your product placement and promotions on overall sales. 

For instance, if you run a clothing store and notice high sales (after setting up ecommerce events) for, say, a specific dress, you can feature it in a prominent place on your site and optimize sales. Or perhaps you can dynamically create bundles or promote these products to maximize revenue. 

Details You Collect About a User

Personalization allows businesses  to create targeted marketing campaigns. Thankfully, GA4 custom eventsfacilitate that and beyond. It allows you to collect data important to your business.

Say you run an online bookstore. You can set up custom events to track user preferences and recommend books accordingly.

Or if you find out that your customers frequently purchase crime and mystery books, you can send them personalized email promotions for upcoming crime and mystery books. This will naturally increase the likelihood of purchase and grow your revenue.  

Elements Visible In the Browser 

Analyzing the timing of content and pop-ups is critical for a non-disruptive user experience. For example, an educational platform can display a sign-up prompt right after a user finishes watching a video or taking a lesson. 

This boosts their registration rates without interrupting the learning process. With event tracking, you can optimize pop-up placement to achieve your goals and without overwhelming the user – a win-win. 

What Kind Of Events Are Available In Google Analytics 4?

Google Analytics 4 offers the following kinds of events:

Automatically Collected Events

As the name implies, these events are automatically tracked in GA4. They provide a general overview of user interaction with your app or site. 

For instance, you can track the visited pages, time spent on each page, and specific actions. Some automatically tracked events include. 

  • First_visit. This event is generated when a user visits your website for the first time. 
  • Page_view. This captures the specific page the user views on your app or website. 
  • Session_start event determines when the user initiates a session.Generally, this event is activated when there’s a pause in user interaction for 30 minutes.
  • User_engagement  reports when a user spends around 10 seconds on your website or app.

These events are a vital element of Google Analytics, and you can find them in GA4 properties. 

Recommended Events

Sure, automatically tracked events offer a general insight into user interactions, but what if you want to track something more specific? Here’s when the Recommended Events come in. 

Google recommends numerous events for specific business types. These events are categorized by different industries, and you can use the one that fits your preferences. 

  • Events for all properties
  • Online sales
  • Games 

For instance, if you want to generate more leads for your website, you can select generate_leadfrom ‘For all Properties’ and use it to your advantage. What’s more, owning an ecommerce website is not a prerequisite for this event to be valuable. 

Any website focused on generating leads can use this event to track the number of individuals providing their contact details. 

Some popular recommendations include the following. 

  • select_promotion.When someone clicks a special offer
  • view_promotion.Impressions on your special offer
  • purchase. Someone completed a purchase
  • view_item. A product was viewed
  • add_to_cart. A product was added to the cart
  • add _to_wishlist. An item was added to wishlist
  • ad_impression. An ad was viewed 

Check out this page  to check the list of all events. 

Enhanced Measurement Events

These events allow you to automatically gather additional data without having to add any code. 

While the Automatically Tracked Events are gathered by default, you can enable and disable Enhanced Measurement Events. 

This lets you select particular events you’d prefer to see in your reports. Follow these steps to enable them:

  • Choose Admin  in Google Analytics (Ensure you’re logged into the right account and property
  • Select Data Streams > Webin the Property Column 
  • Choose your data stream’s name 
  • Toggle the switch to the ‘On’ position to activate all the options below Enhanced Measurement

For example, you can track the following actions:

  • Scroll. The scroll  event is activated when someone scrolls 90% of your website page.
  • Video engagement. This event occurs occurs when a visitor views a video on your app or a site .This
    action is This action is typically tracked by the video_start event. The video_progress event is generated when a user plays 10%-75% of the video’s duration, and video_complete is triggered once the video ends.
  • Download. The file_download event is collected when someone downloads a file from your site or app.

You can track more events for an in-depth overview of user behavior on your website. 

Custom Events

Custom events allow you to collect information that’s not automatically collected by any built-in Google event. But, before setting up a custom event, be sure to check the list of available and recommended events to confirm that there’s no suitable option available.

Although you’re free to choose a name for your event, adhering to Google’s naming convention is better for consistency and clarity in your analytics tracking.

Creating and Configuring Custom Events In GA4

Now that we know the different types of events let’s learn how to create and configure a custom event using Google Tag Manager (GTM) and Google Analytics 4. Remember, you should only turn to custom events if you can’t find a built-in event that fits your purpose.

For this article, we will create a custom event for when a user hovers over an image on our website. Let’s get started!

1) The first step is to set up  a new trigger in Google Tag  Manager that fires whenever the event occurs.
To do this, select “Triggers” from your Google Tag Manager dashboard. Then, click “New”.

 2) Click to expand the “Trigger Configuration” section and then choose “Element Visibility” as the trigger type.

3) Give a name to your trigger as per your use case. We will name it “Trigger – Analytics image.”

4) Now, we have to specify the ID attribute (HTML) of the element that we want to track. This will help GTM identify and track the relevant element. To extract this, we will open our website in a new tab, click “Inspect Element,” and copy the ID associated with our image. 

5) Next, we have to choose when to fire the trigger. It can either be fired once per page (regardless of how many times the user sees it), once per element (in case we track multiple elements with this trigger), or every time an element appears on screen (which will fire an event every time the user sees it). Make the selection as per your use case. We will go with once per page.

6) We will now set the “Minimum percent visible” field to 100 percent to make sure the event is only triggered when the user sees the entire image. We will also set the “minimum on-screen duration” to 100 milliseconds.

7) The next step is to set up a tag for our trigger. Go to “Tags” on the GTM dashboard and select “New”. Set the tag type to “Google Analytics: GA4 Event.”

8) Give a name to your tag.

9) Enter your measurement ID (you can get this from the GA4 dashboard) and give a name to your event. Make sure you follow these naming conventions.

10) We can also set up different parameters for our event. Parameters allow you to collect additional information about an event. For example, when tracking multiple UI elements, you can include a parameter that captures the ID of the element the user viewed during an event.
Google Tag Manager offers several built-in variables that you can use to capture values for events. You can enable them by selecting “Variables -> Configure” from your GTM dashboard.

For our above use case (capturing the element ID), we can use the built-in “Click ID” variable. Once the variable has been enabled, we can configure it as follows:

11) Finally, we have to choose the trigger for our event. Since we have already created it in the above steps, we just need to associate it with the tag.

12) Once you are done, click “Save”.

13) Head over to the GA4 dashboard, select “Configure -> DebugView”. Here, you should be able to see all the events as they occur in real time.

14) To test that our configuration is working, visit your website, and view the tracked element (an image in our case). Once you do that, you should be able to see the newly created event in the DebugView.

15) The next step is to register our event parameter (viewed_element_id) as a custom dimension on GA4. To do so, perform these actions:

a) Select “Admin” on your GA4 dashboard.
b) For the relevant property, select “Custom definitions”.

c) Click “Create custom dimension”.
d) Enter the name of the parameter (viewed_element_id) in the “Event parameter” box, give a name to the dimension, and hit “Save”.

e) Within 24 hours, once GA4 finishes the sync process, you should be able to use the above event parameter in your GA4 reports.

16) After you have tested that the event is working as expected, go to GTM and hit “Submit” to make your changes go live.

That’s it! You have now successfully set up a custom event on Google Analytics 4!


There’s no reason for businesses to miss out on event tracking in GA4 if they seek to gain deeper insights into user behavior. 

It allows them to refine their strategies, enhance user experience, and personalize engagement – in other words, everything necessary for business success.

Table of Contents