Google Analytics 4 Event-Based Data Model Explained


In this tutorial, we will take a look at the event-driven data model of GA4 and its event types.

About Events #

Events are the cornerstone of Google Analytics 4
 

The best way to understand Google Analytics 4 (GA4) events is to compare them with Universal Analytics (GA3) events.

⚠️ Note: Keep in mind that GA4 is not an upgrade but a new version of GA3.

Here’s how Google explains the difference between events in GA4 and Universal Analytics.

In Universal Analytics, events are user interactions measured independently from a web page or screen load. Downloads, link clicks, form submissions, and video plays are often measured as events. Events in Universal Analytics have a Category, Action, Label and sometimes a Value, and are displayed with these fields in your Analytics reports.
In Google Analytics 4 properties, events are user interactions with a website or app that can be measured concurrently or independently from a webpage/screen load. Examples of events include page views, button clicks, user actions, and system events.

In detail:

  • Events are user interactions #

    Both GA3 and GA4 define events as user interactions.

    You can use events to track any actions that are happening by users on your website or app, like downloading a resource, clicking a link, submitting a form, and playing a video.

    Those actions are then processed and aggregated by GA and made available to us in reports.

  • Web and app events together #

    Google Analytics 4 (GA4) is an app+web property that supports the measurement of traffic and engagement across websites and apps.

    GA4-web-and-app

    You can use Analytics exclusively for web data, exclusively for app data, or for both app and web data together.

    GA4 web+app

    In the past, we used:

    • Google Analytics property to measure website engagement.
    • Google Analytics for Firebase or Google Analytics APP view (created via separate GA property) to measure app engagement.

    ⚠️ Note:if you have an app, the Firebase SDK is the way to go.

    GA4 is designed for collecting both website and app data so you can view, track, and manage this all from one platform to better understand the customer journey.

    Your users will no longer be fragmented in different platforms and devices, but will be combined into one dataset, giving you a better view of the bigger picture. – Tom De Mulder
  • Every interaction is an event #

    GA4 does not distinguish between the types of interactions.

    • In Universal Analytics there were a few different hit types: pageview, event, social, e-commerce, and user timing.
    • In Google Analytics 4 there is only one hit type: Event.

    In Universal Analytics (GA3), an Event represents a type of hit; in GA4 all hits are Events.

    Hit Types in Universal Analytics Captured in Google Analytics 4 as:
    Page View Event
    Event Event
    Social Event
    Transaction/e-commerce Event
    User timing Event
    Exception Event
    App/screen view Event
    shift from a hit-based data model to an Event based model.

    The GA4 property uses the Event Based measurement model which is way more user-centric and allows you to custom your own event and track any user activity including page views as an event.

    … But what does this mean?

    It means marketers must rethink their data collection and how they use to analyse the data.

    In the past, when we tried to analyse website traffic, we always focused on sessions and pageviews. What happens in one session? How many page views in one session? What is the average time per session? How many page views for a particular page?

    With GA 4, we focus more on user behaviour across different platforms and devices. How engaged the user with different screens/devices? How many events occurred for each user?

  • Event parameters #

    GA4 introduces a new event structure.

    • In Universal Analytics the event hits had their own category, action, and label, and were different from other hit types.
    • In Google Analytics 4 events are complemented with a list of parameters that replace the old category, action, and label.
    Parameters provide additional information about the ways users interact with your website. – Google Doc

    This extra information is meant to:

    • Further specify the action the user took.
    • Add further context to the event.

    For example, let’s say we have an event ‘article_view’ that refers to views of a specific article. Article information such as article id, author, title etc. can be passed as “parameters” to the event.

    Up to 25 custom parameters can be sent with each event, giving you a lot more flexibility when tracking user interactions and much more control over your data collection.

    Google Analytics 4 event naming vs Universal Analytics

    A bit about naming conventions:
    You may have noticed that I wrote “article_view” above, rather than “article view”. I did this because all event and parameter names in GA4 are lower-case and use underscores instead of spaces. This is known as snake case in the coding world.
    Dimensions and metrics use sentence case in GA4, which means the first letter of the first word is upper-case, but subsequent words are not.

    auto event parameters

Types of events #

In GA4, the events setup consists of a combination of automatically tracked events and custom events.

Most of these events are automatically collected for us, like when a user visits a web page or when they click a link. But some events require additional context in order to be recorded, which requires us to do a little bit of configuration or add some code to our website in order for them to be recorded. – Matt Larders

In detail:

The GA4 events can be splitted into 2 categories:

  1. Built-in event tracking
    1. Automatically collected events (required)
    2. Enhanced Measurement events (optional)
  2. NOT built-in event tracking
    1. Recommended events (predefined event name)
    2. Custom events (custom event name)
ga4 event types

In the following article we will see, in detail, each of the event types separately.

Automatically Collected Events #

Automatically collected events are events that are collected by default when you set up Google Analytics on your website or app. – Google Doc

The automatically collected events can’t be switched off or disabled. They are the critical components needed for Google Analytics, so you will find them in all Google Analytics 4 properties.

Following are the four website events that are automatically collected and recorded within Google Analytics 4.

Events Event Name Automatically triggered
First Visit first_visit This event is used to report if someone is a new visitor to your website. It’s collected when someone visits your website for the first time, and there’s no existing Google Analytics cookie in their browser.
Page View page_view This event is used to report on the different pages people view on your website. It’s collected when someone loads a page.
Session Start session_start This event is used to report when someone lands on your website and starts a new session. It’s collected when someone visits your website and any previous session has timed out.
User Engagementt user_engagement This event is used to calculate how long people spend viewing your website and to calculate the engagement metrics in Google Analytics. It’s collected when someone navigates to another page, or they close their browser.

When it comes to mobile app tracking there are more automatically tracked events.

You can find a complete list here (it contains both app and web events).

Enhanced Measurement Events #

Enhanced measurement events are events that are collected when you set up Google Analytics on your website or app and enhanced measurement is enabled. – Google Doc

Enhanced Measurement events are an extra set of automatic events.

But while the automatically collected events are mandatory, the enhanced measurement events are optional.

This means you are allowed to turn an enhanced measurement event ‘on’ (enable) or ‘off’ (disable).

This feature is enabled by default and will automatically track the following events:

Enhanced Measurement Event Name Automatically triggered (if enabled)
Scrolls scroll Scroll > 90%
Outbound clicks click Click a link to leave your site
Site search view_search_results Perform a search
Form interactions form_start, form_submit Form started and submitted
Video engagement video_start, video_progress, video_complete YouTube video interactions
Files downloads file_download File download (link click)

Enhanced Measurement also provides advanced settings for “page_views” and “view_search_results” events:

page_views

google analytics 4 page views events setting

The advanced settings for the page_view event allows the event to be triggered not just on a new page load (required), but also when the browser history state changes (optional). This is very useful for measure virtual pageviews – cases when page change happens dynamically without page reload.

⚠️ Note: This option is enabled by default, however, as an alternative, we can manually track the page_view event from a data layer. In this case make sure to unselect this option in order to avoid double counting pageviews on history state changes.

view_search_results
google analytics 4 site search setting events

Apart from the default search query parameters [q, s, keyword, search, query], you can also edit or add (up to 10) the query parameters Google Analytics uses to identify the keywords people are using to search within your website. And you also have the option of adding additional query parameters to collect further insights.

⚠️ Note: If a user lands on search results page (i.e. you use one in an ad, or ranks on the SERPs), then this event will also be logged. So be mindful when analysing this data that this is not misconstrued as the number of site searches actually made, but just a count of the number of times that the search results page was viewed.

Recommended events are events that you implement, but that have predefined names and parameters. These events unlock existing and future reporting capabilities. – Google Doc

The only specific characteristic that makes these events as “recommended” is that Google has assigned predefined event names and parameters to them.

They do not automatically get triggered unless you manually implement them, using Google Tag Manager or javascript in the website code.

For example, if you want to track events for online sales such as purchase or add to cart you will notice that they are not tracked automatically and this is logical because websites are coded in different ways they store data in different structures therefore it is nearly impossible for Google Analytics to automatically track such information.

However, if a visitor adds an item to a shopping cart, Google is recommending that we name that event add_to_cart. When they make a purchase, Google recommends we call that event purchase.

In doing so, Google will recognise these events name as one of their recommended events and these events start to get collected into their own GA4 dedicated reports:

  • Sending the events for online sales populates the GA4 monetisation reports.
  • Sending the events for games populates GA4 the games reports.

Here the list of Recommended Events from Google.

Custom events #

Custom events are events that you define. Make sure you only create custom events when no other events work for your use case. Custom events don’t show up in most standard reports so you need to set up custom reports or explorations for meaningful analysis. – Google Doc

Like recommended events, custom events require custom code changes.

Unlike recommended events, Google hasn’t provided any direction for how to name the events.

ga4 flowchart event type

  • [GA4] About events by Google: Link
  • [GA4] Automatically collected events by Google: Link
  • [GA4] Enhanced event measurement by Google: Link
  • [GA4] Recommended events by Google: Link
  • [GA4] Custom events by Google: Link

Leave a Reply

Your email address will not be published.

Thanks for commenting