Sub topic 1
How GA4 records activity: events, pages and screens
Every path in a Path exploration is built from rows that GA4 has already recorded. If you know what GA4 stores for each interaction, you can predict what a node will be called, why two nodes you expected to be the same appear separately, and why some steps never appear. This chapter covers the data model underneath the later chapters on node types and starting points.
Prerequisites
This chapter assumes you have:
- Basic familiarity with the GA4 interface and standard reports.
- Some understanding that GA4 records user activity as events with parameters.
- Awareness of the difference between users, sessions and events.
You don't need to write code. The examples are there to show what GA4 receives. If you can read a short JavaScript snippet and a SQL query, you can follow all of them.
Everything is an event
Universal Analytics had separate hit types: pageviews, events, transactions and so on. GA4 has one record type, the event. A page view is an event named page_view. A click on an outbound link is an event named click. A purchase is an event named purchase.
Each event has:
- An event name, such as
page_vieworsign_up. - A set of event parameters, which are key-value pairs that describe the event, such as
page_locationormethod. - A timestamp.
- Identifiers that tie the event to a user and a session.
- Optional user properties, which describe the user rather than the single event, such as a plan type.
A path exploration doesn't read anything beyond these records. It orders events by time within a session and groups them by one of their attributes. That attribute is the node type you choose later.
Four kinds of events
GA4 sorts events by how they get into the property. The distinction matters because it tells you which events exist without any work and which exist only if someone built them.
| Category | How it arrives | Examples |
|---|---|---|
| Automatically collected | Sent as soon as the tag or SDK is installed | `first_visit`, `session_start`, `user_engagement`, `page_view` (web), `screen_view` (app) |
| Enhanced measurement | Sent by the web tag when the option is on in the data stream settings | `scroll`, `click` (outbound), `file_download`, `view_search_results`, `video_start`, `form_start`, `form_submit` |
| Recommended | You implement them, using Google's names and parameters | `login`, `sign_up`, `select_promotion`, `add_to_cart`, `purchase` |
| Custom | You invent the name and parameters | `quiz_completed`, `pricing_toggle_clicked` |
Use a recommended event when one fits your case. GA4's built-in reports and some features understand those names and parameter sets. A custom event is correct when no recommended event matches, but nothing in GA4 gives it extra meaning.
How a page view carries its context
On the web, a page_view event is mostly a container for parameters. The most important ones for path analysis are:
page_location: the full URL, including the query string.page_title: the text of the document title when the event fired.page_referrer: the URL of the previous page.ga_session_idandga_session_number: which session the event belongs to.engagement_time_msec: time the page was in the foreground since the last event.
The reports and explorations turn these parameters into dimensions. The Page path and screen class dimension comes from the path portion of page_location. The Page title and screen name dimension comes from page_title on the web and from the screen name on apps. These derived dimensions are what you will later choose as node types.
Two consequences follow from this:
- Two URLs that differ only in the query string, such as
/pricingand/pricing?utm_source=news, are separate values ofpage_location. Whether they merge into one path node depends on the dimension you use. Page path with query string treats them as different. Page path without the query string treats them as the same. - Two different pages with the same
<title>value share a page-title node. A site that titles every page "Acme Store" produces one useless node.
Screens in apps
Mobile apps built with the Firebase SDK don't have URLs. They report a screen_view event instead. It carries these parameters:
firebase_screen: the screen name that you or the SDK set.firebase_screen_class: the class name of the screen, such as the Android activity or the iOS view controller.firebase_previous_screenandfirebase_previous_class: where the user was before.
On Android and iOS the SDK collects screen_view automatically when a new screen appears. Automatic names come from class names, so they can be unhelpful, such as MainActivity for a whole app built in one activity. In that case you log screen_view yourself and set a meaningful firebase_screen.
A property with both a web and an app stream receives both event types. The combined dimension "Page title and screen name" shows page titles for the web and screen names for the app.
Users and sessions
Events alone don't make a journey. GA4 links them with identifiers:
- On the web, a first-party cookie stores a client ID. It identifies one browser on one device. In BigQuery this appears as
user_pseudo_id. - If you send a User-ID, GA4 can recognise the same person across devices, depending on the reporting identity setting.
- A session is a group of events by one user in a window of activity. The
session_startevent begins it, andga_session_idlabels it. By default a session ends after 30 minutes of inactivity.
A path exploration orders events within a session. If a user returns an hour later, the new session starts a new path. When the exploration says a node was followed by another, it means they were adjacent events in time in that session. That is not the same as a link click between the two pages.
Sending events yourself
Install the Google tag and you get the automatic events. Anything else needs code or a tag manager. The snippet below loads the tag, then sends one recommended event and one custom event with parameters.
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){ dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
// Recommended event: Google defines the name and the method parameter
gtag('event', 'sign_up', {
method: 'Google'
});
// Custom event: you define the name and the parameters
gtag('event', 'quiz_completed', {
quiz_name: 'onboarding',
score: 8
});
</script>Each call produces an event row. sign_up will appear as a node when you pick the Event name node type. The custom parameters quiz_name and score only become usable in reports and explorations after you register them as custom dimensions or custom metrics in Admin. The event itself is collected regardless.
Limits to design around
A few property limits shape how you name events. Standard properties allow up to 500 distinct event names, event names of up to 40 characters, up to 25 parameters per event, and parameter values of up to 100 characters. A few parameters, such as page_location, allow longer values. Exact quotas change, so check Google's current documentation before you rely on them.
Names are case-sensitive. Sign_Up and sign_up are two different events and would appear as two nodes. Pick a convention, such as lowercase with underscores, and keep to it.
From recorded data to path nodes
The diagram shows the chain from a user action to a node in an exploration.
An event name can serve as a node directly. Page path, page title and screen name come from parameters. So the quality of your nodes depends on the quality of what you sent. A site with clean URLs, descriptive titles and a small set of consistently named events produces readable paths. A site with noisy URLs and generic titles produces noisy ones.
Seeing the raw events
When a node looks wrong, check the raw event. Two places help:
- DebugView in Admin shows events from a device in debug mode as they arrive, with their parameters.
- The BigQuery export, if enabled, stores every event as a row with
event_name,event_timestampand a repeatedevent_paramsfield. This query lists your most common event names for one month, so you can see which nodes could exist.
SELECT
event_name,
COUNT(*) AS events
FROM `my_project.analytics_123456789.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20260101' AND '20260131'
GROUP BY event_name
ORDER BY events DESC
LIMIT 25;Replace the project and dataset names with your own. The export keeps parameters in a repeated field, so reading one value takes an UNNEST. The BigQuery chapter at the end of this tutorial builds on that.
Common mistakes
- Assuming a page view and a screen view are the same. Web uses
page_viewwithpage_location. Apps usescreen_viewwithfirebase_screen. Filters written for one don't match the other. - Relying on page titles that don't vary. If titles repeat, the page-title nodes will merge pages that you want to keep apart.
- Mixing event name cases. One typo creates a second event that splits your counts.
- Expecting parameters to show up without registration. Custom parameters need a custom dimension before most reports can use them.
- Reading adjacency as causation. Events next to each other in a session are ordered in time. They aren't necessarily linked by user choice.
Exercise
A web store sends a page_view for /shoes?color=red and another for /shoes?color=blue. Every page on the site has the title "Acme Store". Which node type choices would show these two views as the same node, and which would show them as separate nodes? Name the parameter each choice depends on.
Show answer
Page title would merge them, and in fact merge every page on the site into one node, because it comes from page_title and all titles are "Acme Store". Page path without the query string would also merge the two, because it uses only the path portion /shoes of page_location. Page path with the query string would keep them separate, because page_location differs. The Event name node type would show both as page_view, so it can't tell them apart.
Exercise
A teammate sends Sign_Up from the web code and sign_up from the iOS app. What will you see in an exploration that uses the Event name node type, and how do you fix it going forward?
Show answer
You will see two separate nodes, Sign_Up and sign_up, because event names are case-sensitive. The counts for each platform are split. Fix it by agreeing on one name, preferably the recommended sign_up, and updating the web code. Events already collected keep their old name, so old data stays split.