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

  1. Go to https://analytics.google.com
  2. Select your GA4 property
  3. Click Explore in the left menu
  4. Choose a Free Form, Funnel, or Path exploration (or start from a blank report)

Step 2: Create a New Segment

  1. In the Variables panel (left column), click + next to Segments
  2. 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 category equals mobile
  • High-Intent Users
    • User segment > event_name equals add_to_cart
    • AND event_count greater than 2
  • Organic Traffic Only
    • Session segment > session medium equals organic

Add multiple conditions, sequence steps, or parameter filters for advanced targeting.


Step 4: Apply Segments to Your Exploration

  1. After saving, drag the segment(s) into the SEGMENT COMPARISON area in your report layout
  2. 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

You may also like...