Sub topic 3
Comparing user groups with segments
This chapter assumes you can build a Path exploration, understand GA4 events and parameters, and tell users, sessions and events apart.
Comparing user groups with segments
Apply a segment to a Path exploration to see how different groups move through your site. Build one segment for buyers and one for non-buyers, then compare the first three steps of each path. The branches where the paths split show where the groups diverge.
Interpreting paths without over-reading them
A path shows sequence, not cause. A user who viewed a pricing page before buying did not necessarily buy because of that page. Check the user count on each branch before you draw a conclusion, and treat small branches as noise.
Practical questions path analysis can answer
- Which page do users see just before they start a sign-up?
- Where do users leave after a search that returns no results?
- Do returning visitors follow a different route from first-time visitors?
Sharing and exporting your exploration
Use the share option to send a link to colleagues who have GA4 access. To pass numbers to someone without access, download the table as a CSV file. Record the segment and date range alongside the file so readers can reproduce the figures.
Limitations, thresholds and data caveats
GA4 hides rows for small groups when data thresholds apply. Path diagrams also show a limited number of nodes at each step. Paths reflect only the events you track, so an untracked click never appears.
Going further: building path counts in BigQuery
When the Explore view cannot show what you need, count transitions yourself from the BigQuery export. This query counts how often one event directly follows another within a session.
WITH ordered AS (
SELECT
user_pseudo_id,
(SELECT value.int_value FROM UNNEST(event_params) WHERE key = 'ga_session_id') AS session_id,
event_name,
event_timestamp
FROM `my_project.analytics_123456789.events_*`
WHERE _TABLE_SUFFIX BETWEEN '20260101' AND '20260131'
),
paired AS (
SELECT
event_name AS from_event,
LEAD(event_name) OVER (
PARTITION BY user_pseudo_id, session_id
ORDER BY event_timestamp
) AS to_event
FROM ordered
)
SELECT from_event, to_event, COUNT(*) AS transitions
FROM paired
WHERE to_event IS NOT NULL
GROUP BY from_event, to_event
ORDER BY transitions DESC
LIMIT 20;Replace the project and dataset names with your own before you run the query.
Exercise
You want to know whether buyers reach checkout through a different page than non-buyers. What steps do you take in GA4?
Show answer
Build a Path exploration, apply a buyers segment, then apply a non-buyers segment, and compare the branches that lead to the checkout node.