Setting up custom segments in GA4
Table of Contents
Google Analytics 4 (GA4) has a custom segment feature that allows you to zoom in on the behaviour of specific users to understand how they interact with your product in comparison to other groups. Segments are limited to GA4's 'Exploration' reports but can be converted into audiences and applied to any of your GA4 reports.
This document explains how to create user segments based on a couple of key attributes:
- User ID - allowing you to measure the behaviour of logged in users
- Subscriber Status - breakdown your users by their subscriber type
Creating a new user segment
Head to the Explore section of GA4 and open the report you'd like to add a segment to.
In the Segments section, click on the + and then select User Segment
Segment by User ID
From the 'Add a new condition' dropdown select 'User' > 'Signed in with user ID'
Add a filter to the segment and select 'is one of' > 'Yes'. If you want to include any user who has ever signed in, ticket the 'At any point in time' box. If you only want to include users who have been signed in within the date range selected for your exploration leave the box unticked.
Give the segment a title and click 'Save and apply' to add it to your exploration.
Segment by Subscriber Status
Create a segment for each subscriber state that is available to you. This will include some/all of the following:
- None
- ExistingSubscriber
- iTunesSinglePurchase
- AmazonSinglePurchase
- GooglePlaySinglePurchase
- iTunesSubscriber
- AmazonSubscriber
- GooglePlaySubscriber
- InactiveSubscriber
Click here for more Subscriber definitions
Steps to create a segment:
- From the 'Add new condition' dropdown select KGSubscriberStatus
- Select '+ Add filter' and change the condition dropdown to 'exactly matches (=)'
- Select a subscriber state
- Name the Segment after the state you have chosen
- Copy this process for each subscriber status available to you
- The segments can then be applied to your report.
Creating an audience from segments
If you would like to create an audience from your segments, allowing you to apply the filtered user group to any report in your GA4 property, just tick the 'Build an audience' box in the top right hand corner of your segment editor and choose the membership duration (the number of days users stay in the audience once they're added to it).
Useful Links
Pugpig Analytics Specification
Google's segment builder document
Google's introduction to audiences in Google Analytics document