An image of GPS tracking tools, with overlaid text saying 'how to set up event tracking in GA4'
6 minutes

How to Set Up Event Tracking in Google Analytics 4

We were all excited for the day Google Analytics 4 (GA4) took over from Universal Analytics, with it offering enhanced tracking capabilities and a more flexible data model. However, I know many of us are now filled with dread every time we have to use it and are crying out for UA back. 

But, we must move on and make do, as GA is a vital part of our day-to-day life as SEOs. With that being said, I am pulling together some handy guides to using the new and ‘improved’ GA4, beginning with event tracking.

Event tracking in GA4 is more streamlined, allowing you to gain deeper insights into user interactions. This guide will walk you through the steps to set up event tracking in GA4.


What is Event Tracking in GA4?

Event tracking allows you to measure specific user interactions on your website or app, such as clicks, form submissions, video plays, and more. Unlike Universal Analytics, GA4 doesn’t differentiate between different types of hits (pageviews, events, transactions). Instead, everything is an event, making it more flexible and powerful.


Setting Up Google Analytics 4

Step 1: Create a GA4 Property

  1. Sign in to Google Analytics: Use your Google account to sign in at Google Analytics.
  2. Admin Panel: Navigate to the Admin panel by clicking the gear icon in the bottom-left corner.
  3. Create Property: Under the Property column, click on “Create Property.”
  4. Configure Property: Enter the property name, select your reporting time zone and currency, and click “Next.”
  5. Setup Data Streams: Select your platform (Web, Android, or iOS). For a website, enter your site URL and name the stream.
  6. Get Measurement ID: Copy the Measurement ID (it starts with “G-“). You’ll need this for your website’s tracking code.

A screengrab of Google Analytics admin section, showing you how to create a new property.

Step 2: Install GA4 Tracking Code

1. Insert Tracking Code: Add the GA4 tracking code to your website. This is typically done by pasting the Global Site Tag (gtag.js) into the <head> section of your HTML.

<script async src=””></script>


  window.dataLayer = window.dataLayer || [];

  function gtag(){dataLayer.push(arguments);}

  gtag(‘js’, new Date());

  gtag(‘config’, ‘G-XXXXXXXXXX’);


2. Verify Installation: Use the Real-Time report in GA4 to confirm that data is being received.


Setting Up Custom Event Tracking

Step 1: Identify Events to Track

Decide which user interactions are valuable for your analysis. Common events include button clicks, form submissions, video plays, and file downloads.

Step 2: Configure Events Using Google Tag Manager (GTM)

  1. Sign in to GTM: Go to Google Tag Manager.
  2. Create a New Tag: Click on “Tags” in the left sidebar, then “New.”
  3. Tag Configuration: Click on “Tag Configuration” and select “Google Analytics: GA4 Event.”
  4. Tag Details: Enter your GA4 Measurement ID and name your event (e.g., button_click).

Step 3: Set Up Triggers

  1. Choose Trigger Type: Under Triggering, click on “Choose a trigger” and select the appropriate trigger (e.g., “Click – All Elements”).
  2. Define Trigger Conditions: Configure the trigger to fire on specific conditions. For example, if tracking a button click, you might set the trigger to fire on clicks on elements with a specific class or ID.

Step 4: Publish Your Tag

  1. Save and Submit: Save your tag and trigger, then click “Submit” to publish the changes.
  2. Debugging: Use GTM’s Preview mode to test your setup and ensure events are firing correctly.

Verifying Events in GA4

  1. Real-Time Reports: In GA4, go to the Real-Time report to see your events as they happen.
  2. Events Report: Navigate to the Events report under the “Engagement” section to view a summary of all tracked events.
  3. DebugView: Use the DebugView in GA4 to see detailed information about your events, including parameters and user properties.

A screengrab of Google Analytics real time section, with a list of events and how many occurrences there are

Advanced Tips for Event Tracking

Tip 1: Use Event Parameters

Add additional context to your events by using parameters. For example, a button_click event can include parameters like button_text or button_id to provide more detailed insights.

Tip 2: Define Custom Dimensions and Metrics

Set up custom dimensions and metrics in GA4 to capture specific data points relevant to your business. This can be done in the GA4 interface under the “Custom Definitions” section.

Tip 3: Regularly Review and Refine Events

Periodically review your event setup to ensure it aligns with your business goals. Add new events as necessary and remove any that are no longer useful.

Assigning Events as Conversions

In Universal Analytics, events and conversions were kept separate, but now everything starts with an event. You must now assign specific events as conversions

Step 1: Identify which events you want to track as conversions

Firstly you need to decide which events you want to track as conversions. For e-commerce sites this might be the standard ‘purchase’ that is created automatically when you set up an e-commerce GA property. For businesses that don’t directly sell products or services on their website, there may be more ways to track conversions, this could be contact forms, downloading brochures or form submissions. For these businesses, these are now called ‘key events’ rather than conversions.

Step 2: Assign your conversions or key events

  1. Go to events in admin: Follow the gear icon in your Google property, click data display and then events.
  2. Mark events as conversions or key events: The far right column will allow you to click a toggle that decides whether an event is a conversion or key event. Select all that are applicable. It is recommended that you don’t choose too many.

A screengrab of Google Analytics admin section with a list of events, and a toggle button allowing you to make them key events or conversions

Setting up event tracking in Google Analytics 4 is a powerful way to understand user interactions and optimise your website or app. By following these steps and tips, you’ll be able to configure, verify, and refine your event tracking to gain valuable insights. Remember to regularly check your reports and adjust your tracking strategy to stay aligned with your business objectives. Happy tracking!

To find out how to navigate GA, or use it for SEO and Digital PR, head to our blogs! And, if you’re looking for support with your SEO strategy, get in touch with us today.