How do I create and compare user segments in GA4?
Applies to: Google Analytics 4 (GA4)
Last updated: May 2025
Problem
You want to compare specific groups of users—like mobile vs. desktop users, purchasers vs. non-purchasers, or traffic from different sources—to analyze behavior, performance, or conversion rates.
Solution
GA4 allows you to create segments within the Explorations workspace. Segments can be user-based, session-based, or event-based, and are highly customizable.
Step-by-Step Guide
Step 1: Open the Explorations Workspace
- Go to https://analytics.google.com
- Select your GA4 property
- Click Explore in the left menu
- Choose a Free Form, Funnel, or Path exploration (or start from a blank report)
Step 2: Create a New Segment
- In the Variables panel (left column), click + next to Segments
- Choose:
- User segment: Group based on user characteristics (e.g., country, device, returning)
- Session segment: Based on single-session conditions (e.g., session source, page view)
- Event segment: Based on specific events (e.g., add_to_cart, scroll)
Step 3: Define Segment Conditions
Use the segment builder to set conditions:
Examples:
- Mobile Users
- User segment >
device categoryequalsmobile
- User segment >
- High-Intent Users
- User segment >
event_nameequalsadd_to_cart - AND
event_countgreater than 2
- User segment >
- Organic Traffic Only
- Session segment >
session mediumequalsorganic
- Session segment >
Add multiple conditions, sequence steps, or parameter filters for advanced targeting.
Step 4: Apply Segments to Your Exploration
- After saving, drag the segment(s) into the SEGMENT COMPARISON area in your report layout
- GA4 will now display data for each segment side-by-side
Step 5: Customize and Analyze
- Add dimensions and metrics (e.g.,
event name,engagement rate,conversion rate) - Compare behaviors between segments:
- Bounce rate
- Scroll depth
- Time on site
- Conversion activity
Use visualizations like bar charts, tables, or line graphs to present the comparison.
Segment Tips
- You can compare up to 4 segments at once
- Save and reuse segments across multiple explorations
- Use conditions (e.g., contains, starts with) for flexible filtering
- For temporary ad testing or A/B segments, include campaign IDs or UTM parameters
Notes
- Segments in GA4 are exploration-specific and not available in standard reports
- GA4 segments do not retroactively apply to standard audiences
- For deeper queries, combine segment logic with BigQuery exports




