How do I build a session segment for AI traffic in GA4 Explorations?

The Citead team, updated

In short. An AI traffic session segment uses a Session source condition within the same session and applies to a free-form exploration.

Definition: A session segment in Google Analytics 4 (GA4) Explorations selects sessions that meet specified conditions. For AI traffic analysis, a condition on Session source selects sessions attributed to the assistant source values included in the rule.

Key facts

How is the session segment created?

Google's Explorations guide places Explore in the left navigation. A blank exploration starts with a free-form table. The Variables panel holds the dimensions, metrics and segments available to the exploration.

The segment builder provides these controls:

  1. The plus symbol beside Segments opens segment creation.
  2. Create a new segment opens scope selection; Session segment selects sessions.
  3. Add new condition evaluates Session source against a source value or pattern.
  4. Apply uses the completed condition.

The condition group scope is Within the same session: all conditions must hold within one session. Alternative source conditions use OR within that group; separate groups use AND.

Which source matching rule works?

A regular expression, or regex, is a character pattern used to match data values. Google's regex guide documents \. for a literal dot and | for alternatives.

For a source matching example, OpenAI's response example contains citation URLs with utm_source=chatgpt.com. Google's campaign URL documentation defines utm_source as a referrer label. The following configuration selects only sessions with the recorded source value chatgpt.com:

Segment type: Session segment
Condition group scope: Within the same session
Include sessions when:
  Session source matches regex ^chatgpt\.com$

This example matches the complete source value. Additional assistant sources require additional alternatives in the expression or source conditions joined with OR. Google's regex guide specifies that partial matching requires metacharacters such as .*.

For a segment intended to include all sessions matching the source rule, an additional Session medium = referral condition restricts its coverage. Google's channel definitions specify ai-assistant as the medium for recognized assistant referrers. The same documentation places Google AI Overviews and AI Mode traffic in Organic Search.

How is the segment checked in the table?

Google's Explorations guide explains that a segment can be applied by double-clicking it or dragging it from Variables into Tab Settings. The check uses Session source as a dimension and Sessions as a metric, imported through Variables and placed in Rows and Values respectively in the free-form table. The date range is selected in Variables.

The Traffic acquisition documentation defines Session source as the publisher or inventory source and Sessions as the number of sessions that begin. For the example rule, any returned source row reads chatgpt.com. A source-only segment leaves medium unrestricted; Session medium can be added as a further breakdown.

FAQ

Why choose a session segment instead of a user segment?

Google's segment comparison shows that a user segment can return activity across sessions. Choose a session segment when you want the activities within qualifying sessions.

Can I use First user source for this condition?

Google's scope documentation says that First user source remains associated with initial acquisition as users return. Use Session source when you want the source assigned to each session.

Can I apply the segment to historical data?

The same segment builder documentation describes segments as fully retroactive within the query's date range. Google's Explorations guide lists data retention as a constraint and provides the Data Retention setting under Admin.

Sources

  1. Google Analytics Help, "Get started with Explorations", accessed 17 October 2026
  2. Google Analytics Help, "Segment builder", accessed 17 October 2026
  3. Google Analytics Help, "Scopes of traffic-source dimensions", accessed 17 October 2026
  4. Google Analytics Help, "About regular expressions (regex)", accessed 17 October 2026
  5. Google Analytics Help, "Default channel group", accessed 17 October 2026
  6. OpenAI, "Create a model response", accessed 17 October 2026
  7. Google Analytics Help, "URL builders: Collect campaign data with custom URLs", accessed 17 October 2026
  8. Google Analytics Help, "[GA4] Traffic acquisition report", accessed 17 October 2026

Check how a page reads to answer engines. Open the GEO score analyzer

Test a page and see what to fix first

The analysis usually takes less than 10 seconds and needs no account.

400,000+ pages scored in the public benchmark