How to set up event tracking in GA4 (Google Analytics 4)

Table of Contents

  1. Events in Google Analytics 4
  2. Setting up enhanced measurement events (automatically collected)
  3. Setting up custom event tracking using Google Tag Manager
  4. Event collection and configuration limits
  5. Event-scoped custom dimensions and metrics reporting
  6. Modify and create events in the analytics interface

Events in Google Analytics 4

Any user interactions with content from a web page or a screen load can be tracked as an event.

In the earlier legacy version of Google Analytics, every event needed to be configured separately either using the global site tag (gtg.js) or using Google Tag Manager (GTM). But in the case of GA4, events are completely different and require a new set up since many of them come preconfigured now.

Yes, you heard right!! Google Analytics 4 logs many events automatically. You don’t need to add any code or tags to gather collected event data automatically.

Let’s understand the new concept of events in GA4. Events in GA4 are largely categorised into the following four groups.

  1. Automatically collected events: These are preconfigured events with basic parameters sent. Automatically collected events include page views, scroll events, outbound link clicks, site search events, video engagement like play, pause, completed and file download events.
  2. Enhanced measurement: Automatically measures interactions and content on your sites in addition to standard page view measurement and it tracks a few extra events such as first visit, session start, and all the events from the automatically collected event list.
  3. Recommended events: These events are events that you can implement based on your business requirement, but that have Google-predefined names and parameters. This means you can have these events in your reports but with predefined event names and their parameters. For example, a standard ecommerce event as ‘add_to_cart’
  4. Custom events: You can also implement the custom events on the webpage with custom names and parameters defined by you but double-check and confirm that if they are not already available in the above three types of events (automatically collected, enhanced measurement and recommended events).

For more details, you can visit Google Event Analytics Help section

To check the event’s details in the GA4 console you can click on ‘All Events’ in the left side reporting menu.

Setting up enhanced measurement events (automatically collected)

Enhance measurement events are preconfigured events in GA4 and they can be enabled or disabled from your GA4 property.

To set up enhanced measurement tracking, check out this article: How to setup enhanced measurement tracking in GA4 (Google Analytics 4)

Setting up custom event tracking using Google Tag Manager

You can set custom events and their parameters in two ways:

  1. Using Global Site Tag  (gtag.js) – requires hard coding on the website
  2. Using Google Tag Manager (Recommended)

To learn more about setting up custom events in GA4 via GTM, check out this article: How to set up Custom Events in GA4 via Google Tag Manager

Event collection limits

GA4 has certain limitations on the collection of events on a per property basis. Once your event or event parameter exceeds these collection limits, they are no longer recorded by GA4.

Please keep the below limitations in mind while setting up custom events:

Item Description Limit Can I delete items if I’m close to the limit?
Distinctly named events 500 per app (Data stream) instance No
Length of event name 40 characters N/A
Event parameters per event 25 parameters Yes
Length of event-parameter name 40 characters N/A
Length of event-parameter value 100 characters N/A

 

Setting up event-scoped custom dimensions and metrics reporting

In the earlier legacy version, we used to pass event details as event category, event action and event label. A few additions to this were optional, like event value, and other custom dimensions.

In the case of GA 4, you can set the event scoped custom dimensions and custom metrics while setting up the event parameter in Google Tag Manager. You can then configure the GA4 console with the same parameter name you gave while setting up the custom event and it will be reflected in the ‘Events’ reporting tab.

Remember we passed ‘button_name’ as an extra event parameter while setting up a custom button click event in GTM. Now let’s configure this parameter (custom dimension) in GA4. Follow the below steps to configure event scoped custom dimension.

Step 1: Click on ‘All Events’ in GA4 reporting menu.

Step 2: Click on ‘Manage Custom Definitions’.

Step 3: An overlay will appear like below. Click on ‘Create Custom Dimension’.

Step 4: Enter the parameter name under ‘Event parameter name’ and custom dimension name under ‘Custom dimension name’. This is the name you’ll see in reports, so use a descriptive name. Click on ‘Save’.

Step 5: You can debug your custom parameter in real-time as well. Just click on the button on the webpage. Navigate to GA4 console and click on the ‘All Events’ tab. You should be able to see the parameter name and its value as well:

Modify and create events in the analytics interface

Google Analytics 4 also provides the option to modify and create events in the analytics console only. Note that you can create or modify events based on the occurrence of other events and parameters.

Modify event:

You can modify existing events. For example, if you are collecting two different events (Event Name: Button Click 1 and Button Click 2) you can modify these events under one name as simple ‘Button Click’. You can also fix typos in event or parameter names, and you can modify event names and parameters as well.

To start event modification, follow the below steps.

Step 1: Go to your Analytics 4 property and click on ‘All Events’.

Step 2: Click on ‘Modify event’.

Step 3: An overlay will appear like the one below. Click on ‘Create’.

Step 4: Enter the modification name (new event name).

Step 5: Now click on ‘Add condition’.

Step 6: Click on the parameter to define your condition. It will pop up a drop-down list with available parameters that can be modified.

Step 7: Since we are doing event name modification, I will choose the event_name parameter. Now click on ‘Operator’ where you will get another drop-down menu with different conditional operators.

In our case, we will use equals. Select ‘equals’ and in the value input box enter the first event value to modify (Button Click 1).

Step 8: Now repeat the procedure for adding the second condition. Click on ‘Add Condition’, then select ‘event_name’ as parameter, select operator as ‘equals’ and event value as ‘Button Click 2’.

Now click on ‘Create’.

Congratulations!! You have successfully modified your events. You can go to the ‘All Events’ tab and check. Now instead of Button Click 1 and Button click 2 events, there is just one ‘Button Click’ event.

Create Event:

Just like modifying an existing event, you can also create a new event from the existing events.

Let’s look at an example, suppose you already have a button click event on your home page banner and another button click event on your product category page with a promotional banner. If you want to fire a third event as ‘Promotion click’ when somebody clicks the banner button on the product page, you can use the create event function in GA4 and, based on a parameter condition, you can specify when to fire.

In this example, we are already tracking the button click event on the product page. So, we can use this condition in our parameter settings to create a new event as ‘Promotion click’

The condition will be as below:

Event: Button Click

AND

Parameter: page_title = product_page

Follow the below steps to create a new event with these conditions.

Step 1: Go to your Analytics 4 property and click on ‘All Events’.

Step 2: Click on ‘Create event’.

Step 3: An overlay will appear like below. Click on ‘Create’.

Step 4: The next steps are similar to the steps we performed while modifying the events. So, we will use the following configuration settings:

  • Custom Event Name: Promotion_Click
  • Matching Condition (Click on Add Condition)
  • Parameter 1: event_name equals ‘Button Click’
  • Parameter 2: page_title equals ‘Product_page’

Step 5: Click on ‘Create’.

Congratulations!! You have successfully created a new event. You can go to the ‘All Events’ tab and check the ‘Promotion Click’ event is appearing.

So, that is how you set up event tracking in Google Analytics 4.

Related Articles on GA4 (Google Analytics 4):

  1. What is Google Analytics 4 (GA4) – The Apps + Web Property
  2. How to upgrade to Google Analytics 4 (GA4) 
  3. How to set up cross-domain tracking in GA4 (Google Analytics 4)
  4. How to setup enhanced measurement tracking in GA4 (Google Analytics 4)
  5. How to set up conversion tracking in GA4 (Google Analytics 4)
  6. How to connect GA4 (Google Analytics 4) with Google Data Studio
  7. How to connect GA4 (Google Analytics 4) with Google Ads
  8. How to connect GA4 (Google Analytics 4) with BigQuery
  9. Analysis Hub Google Analytics – How to use the Exploration Report in GA4
  10. How to set up Custom Events in GA4 via Google Tag Manager
  11. How to set up site search tracking in GA4
  12. How to set up scroll tracking in GA4
  13. Google Analytics 4 (GA4) vs Universal Analytics – What is the difference?
  14. How To Set Up Ecommerce Tracking in GA4 (Google Analytics 4)
  15. Google Signals for GA4 – How to see gender, interest and age data in Google Analytics 4
  16. How to block internal traffic in GA4 (Google Analytics 4)
  17. How to import conversions from GA4 property to your Google Ads account

Register for the FREE TRAINING...

"How to use Digital Analytics to generate floods of new Sales and Customers without spending years figuring everything out on your own."



Here’s what we’re going to cover in this training…

#1 Why digital analytics is the key to online business success.

​#2 The number 1 reason why most marketers are not able to scale their advertising and maximize sales.

#3 Why Google and Facebook ads don’t work for most businesses & how to make them work.

#4 ​Why you won’t get any competitive advantage in the marketplace just by knowing Google Analytics.

#5 The number 1 reason why conversion optimization is not working for your business.

#6 How to advertise on any marketing platform for FREE with an unlimited budget.

​#7 How to learn and master digital analytics and conversion optimization in record time.



   

My best selling books on Digital Analytics and Conversion Optimization

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and Beyond
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.

Himanshu Sharma

Digital Marketing Consultant and Founder of Optimizesmart.com

Himanshu helps business owners and marketing professionals in generating more sales and ROI by fixing their website tracking issues, helping them understand their true customers' purchase journey and helping them determine the most effective marketing channels for investment.

He has over 12 years of experience in digital analytics and digital marketing.

He was nominated for the Digital Analytics Association's Awards for Excellence. The Digital Analytics Association is a world-renowned not-for-profit association that helps organisations overcome the challenges of data acquisition and application.

He is the author of four best-selling books on analytics and conversion optimization:

error: Alert: Content is protected !!