Data is most useful when you learn something actionable from it. If you are trying to diagnose a drop in traffic to your site, you would drill into segments like traffic to the blog, shop, help center, etc., to see if all areas had a drop in traffic or just one.
Drilling into data to discover insights is something we spend a lot of time doing in GA. In Universal Analytics we used segments to help with deeper analysis. Segments still exist in GA4 but their functionality is limited versus Universal Analytics.
In this article, we will have a closer look at GA4 segments, their types, how they work, and how to create them.
First, the basics.
What are segments in GA4?
In Google Analytics 4 (GA4), segments are subsets of your data that allow you to focus on specific groups of users, sessions, or events. With segments, you can analyze data at a deeper level and gain insights beyond the overall picture presented by the aggregate data. Examples include creating segments for users from a particular location, those who made a purchase, or those who spent a certain amount of time on your site.
There are three types of segments: user, session, and event segments. We will talk about each of them later in this article.
Segments in UA vs. GA4
Segments exist in both Universal Analytics (UA) and GA. The purpose of segments in both platforms is fundamentally the same:
- To isolate specific datasets: For example, analyzing data for a specific user group (e.g., new users, mobile users, or users from a particular campaign), session (e.g., sessions with a purchase), or event (e.g., “sign up” event).
- To compare data sets: For example, comparing the total revenue earned from users in Ireland versus the revenue earned from users in England
Differences between segments in GA4 vs. UA
However, there are some differences between the way segments work across both platforms. Compared to UA, segments are much more limited in GA4.
- Availability: Segments are readily available across all reports in UA, while in GA4, they are available only in Explore reports.
- Reusability: Saved segments in UA could be reused in the reports, whereas in GA4, they can only be used in the specific Explore report they are created in.
- Creation Process: In each report, UA offered a dedicated “Add Segment” section for creating and managing segments. In GA4, segments are created within the specific Explore report using prebuilt options or custom conditions.
Creating Segments in GA4
Segments are created in the ‘Explore’ reports in GA4. You can find ‘Explore’ in the left panel of your GA4 dashboard.
Select any exploration report type to get started (I’m using Free form). Segments are in the Variables section. Select a timeframe and click on + to start creating one.
You can create a custom segment or choose from the prebuilt segments, which you can find under Use a reference.
First, let’s explore prebuilt segments.
Creating Prebuilt Segments in GA4
There are three tabs in prebuilt segments: General, Templates, and Predictive.
In the General tab, some commonly used segments are given, such as purchasers, active users, etc. For example, if you are interested only in purchasers, click on Purchasers. The segment builder for purchasers will appear, with some fields pre-filled.
Similarly, if you want to know about your active users, click on Recently active users. Add a parameter to see how many users your segment matches in the Summary panel on the right.
Next is the Templates tab.
Here, you can segment your users based on demographics, technology, and acquisition channels. It also contains prebuilt segments relevant to the vertical you selected when you created your GA4 property.
Finally, in the Predictive tab, you can see prebuilt segments of users who are likely to convert—or churn. Most of these segments are aimed at sites that sell something. Even if you are an e-commerce site, they have prerequisites—a minimum number of 1,000 users must have triggered the condition in the previous 28 days. Since my website doesn’t allow users to purchase anything, I am not eligible to use this feature.
Read more about the eligibility criteria for predictive metrics.
Creating Custom Segments in GA4
Custom segments are found above pre-built segments.
First, select the segment scope. Scope is the level of data you want to filter in a segment. In GA4, you can create custom segments for three types of scope: user, session, and event.
- User segment: Includes all events associated with users who meet specific criteria (e.g., users who purchased in the last 30 days).
- Session segment: Includes all events associated with sessions that match the set criteria (e.g., sessions with a specific source/medium).
- Event segment: Includes only specific events that meet your criteria (e.g., “add_to_cart” events).
Let’s create a User segment. After clicking on the scope, the segment builder window will appear.
- Name your segment. Give it a name that is easy to identify. I’m using “US users.”
- Define your segment criteria. Include users (or sessions or events in case of session and event segments, respectively) when certain criteria are met.
- Add new condition: Click on “Add new condition” to specify the criteria for your segment. First, select the Event or Dimension you will use to define your segment, I’m using the Country dimension. ** ** Next click “+ Add filter” to narrow down your event — I entered the United States here.
Depending upon your dimension, you can select a comparison operator (e.g., equals, greater than) and enter the desired value.
- AND/OR: You can add multiple conditions using AND/OR logic to create more complex segments. For example, for “Users from the US who have purchased,” you will add country AND purchase from the list of events and dimensions.
- Conditon’s scope: The user icon beside the delete button is called a condition’s scope, and it determines how broadly or narrowly the conditions are applied.
For user segments, you can select:
- Across all sessions: conditions must be met during the lifetime of the user. For example, if you have added two conditions (begin_checkout, purchase), then both events can have happened at any time, irrespective of whether the conditions were met in the same session or not.
- Within the same session: all conditions must be met within the same session. Only those users that had the begin_checkout and purchase event in the same session would be in the segment.
- Within the same event: all conditions must be met within the same event. Because you are limited to one event with this scope you can’t combine multiple events, only events and parameters. For example, you could specify to isolate users that have the begin_checkout event and are from France.
For session segments, there are two scopes: ‘Within the same event’ and ‘Within the same session’. For event segments, there is one scope: ‘Within the same event’.
- Adding a sequence: You can add a sequence to your segments here. We will talk more about this later.
- Adding exclusions: You can further refine your segment by excluding irrelevant data. This can be helpful when you want to focus on a specific subset within a broader segment. For example, you might create a segment for “All users who purchased” and then exclude “users who purchased a specific product on sale” or “all users who purchased” and then exclude “purchasers from a specific location” to analyze regular purchase behavior.
- Summary: The summary panel shows you how many users match your segment.
- Build an audience: Based on the segment you created, you can build an audience that you can use later in GA4 or your Google Ads campaigns.
- Save and apply. The segment is now ready to be used.
Once the segment is saved, it will move to the Segments section in the report, found under Variables.
I made 2 segments, one for users from the UK and another for users from the US. Drag segments to the Segment Comparison tab and the result can be seen in the table on the right.
Adding a Sequence
If you want to analyze your user’s journey, you can create a sequence in segments. Sequences show the path that a user takes in the course of an action. For example, you can define a sequence of events (e.g., view product page, add to cart, purchase) and identify users who completed this specific sequence of events within a session.
An alternative to Segments in GA4: Comparisons
While segments in GA4 allow you to isolate and compare data, they are limited. You can only access them in the Explore reports and can’t reuse them.
This is where GA4 Comparisons step in as an alternative approach for analyzing and comparing different subsets of your website or app’s data directly within reports.
Functionality
GA4 Comparisons allow you to compare data for different segments within the same report. This means you can view side-by-side comparisons of key metrics (e.g., sessions, conversions, revenue) for different user groups, sessions, or events.
Benefits
Like segments, comparisons allow you to drill into a subset of data or compare two subsets.
Unlike segments, comparisons can be added to standard reports. They can’t be saved but you can reuse them across multiple reports until you exit the segment.
How Do GA4 Comparisons Work?
- Access: Within most standard GA4 reports, you’ll find the “Edit comparison” option at the top of the report. When you click on the icon below, the comparisons window will open, allowing you to add up to 4 comparisons.
- Selection: Choose the data set you want to compare. I am comparing users from the US versus Canada and the UK visiting one of my websites in the last 28 days.
- Analysis: The report will display your chosen data set alongside the original data.
Segments in GA4: A Recap
Segments help users isolate, compare, and analyze data at a deeper level. Found in the Explore reports, segments offer website (or app) owners to:
- Isolate specific data sets: Focus on user groups, sessions, or events that meet defined criteria.
- Compare data sets: Visually compare key metrics for different parameters or events.
However, there are a few limitations of segments. You can create them only in the Explore report, and you cannot reuse them. Additionally, you can create only up to 10 segments per exploration. Plus, not more than four segments can be applied to an individual exploration technique at one time.
A better alternative in these cases would be using comparisons, which offer a lot of the same functionality but are available in the standard reports.