guides10 min read

How to track AI referral traffic in GA4 from ChatGPT, Perplexity and Gemini

Track AI referral traffic in GA4 in 2026: exact host patterns, a custom channel group, regex segments for ChatGPT, Perplexity and Gemini, plus what GA4 cannot see.

A
Alexis MarescaCofounder, Getspotted · GEO & AI visibility expert

The quick answer

To track AI referral traffic in GA4, build a custom channel group that matches the AI engine referral hostnames (chatgpt.com, perplexity.ai, gemini.google.com) against the session source dimension, then add an "AI assistants" segment using a regex on Session source / medium. GA4 does not classify AI assistants as a channel by default in 2026, so the referrals land in Referral, Organic Search, or Direct until you configure the rules below. This guide gives the exact host patterns, the channel-group setup, two copy-paste regex segments, and an honest caveats section on what GA4 still cannot attribute.

Note on data: AI engines change referrer behavior often. The hostnames and behaviors below are accurate as of 2026; confirm current referrers in your own GA4 Session source report before relying on a rule.

Why AI referral traffic hides in GA4 by default

GA4 has no native "AI" or "Generative AI" channel as of 2026, so visits from ChatGPT, Perplexity and Gemini are scattered across three existing channels instead of one. GA4 reads the HTTP referrer of an inbound click, maps the hostname to a default channel, and most AI hostnames are not in Google's default rules, so each AI engine gets misfiled differently.

The three places AI traffic hides:

  • Referral: GA4 sees a referrer like chatgpt.com or perplexity.ai but has no matching channel rule, so the session is bucketed as Referral with the raw hostname as the source.
  • Organic Search: Gemini lives on gemini.google.com and Google AI Mode answers render inside google.com, so some Gemini and AI Mode clicks inherit Google's organic rules.
  • Direct / (none): ChatGPT desktop and mobile apps, and any answer that strips the referrer, send sessions with no referrer at all, so GA4 records them as Direct.

The consequence: without configuration, no single GA4 report answers "how much traffic did AI assistants send me?" For the underlying concept of AI engines surfacing your pages, see AI search and AI visibility.

The exact AI engine host patterns to match in GA4

AI referral traffic in GA4 is identified by matching the referring hostname against a known list of AI engine domains. As of 2026, the table below lists the hostnames each major AI assistant uses when it passes a referrer, and the default GA4 channel each one usually falls into before you add custom rules.

AI engineReferral hostname(s)Default GA4 channel (unconfigured)Referrer reliability
ChatGPT`chatgpt.com`, `chat.openai.com`Referral (web), Direct (apps)Web passes referrer; native apps often do not
Perplexity`perplexity.ai`, `www.perplexity.ai`ReferralHigh, passes referrer reliably
Gemini`gemini.google.com`Organic Search or ReferralMedium, sometimes folded into Google
Google AI Mode / AI Overviews`google.com` (AI surface)Organic SearchLow, indistinguishable from classic organic
Microsoft Copilot`copilot.microsoft.com`, `bing.com`Referral or Organic SearchMedium
Claude`claude.ai`ReferralMedium, citations link out less often

Two patterns matter most. First, ChatGPT migrated its primary host to chatgpt.com, so a rule matching only the older chat.openai.com undercounts. Second, Google AI Mode and AI Overviews answer inside google.com, so GA4 cannot separate an AI Mode click from a classic organic click on the referrer alone. That gap is covered in the caveats section.

Build a custom channel group for AI assistants in GA4

A custom channel group in GA4 reclassifies AI referral traffic into a single "AI assistants" channel by matching session source against the AI engine hostnames. As of 2026, GA4 lets you create one custom channel group under Admin, and it applies to most standard reports going forward (it does not retroactively rewrite historical channel data).

Steps to create the channel group:

  1. Open Admin then Data display then Channel groups, and click Create new channel group. Name it "AI assistants included".
  2. Click Add new channel, name the channel AI assistants, and drag it above the Referral and Organic Search channels so it matches first.
  3. Set the condition to Session source matches regex and paste the pattern below.
  4. Save the channel group. New sessions are classified into AI assistants within 24 to 48 hours.

The regex to match the AI engine sources:

chatgpt\.com|chat\.openai\.com|perplexity\.ai|gemini\.google\.com|copilot\.microsoft\.com|claude\.ai|edgeservices\.bing\.com

Order matters: GA4 evaluates channels top to bottom and assigns the first match, so the AI assistants channel must sit above Referral and Organic Search, or those channels claim the session first. Because a custom channel group is not retroactive, create it early; sessions before creation stay in their original channel.

Two regex segments to isolate ChatGPT, Perplexity and Gemini

A GA4 segment isolates AI referral traffic for ad-hoc analysis in Explore reports without altering channel groups. As of 2026, segments apply retroactively to historical data (unlike channel groups), so a segment is the fastest way to measure AI traffic you already received. Build two segments in Explore then Create new exploration then Segments.

Segment 1, all AI assistants. Condition: Session source / medium matches regex:

chatgpt|openai|perplexity|gemini\.google|copilot|claude|bing

Segment 2, per-engine breakdown. Use the same exploration, drop Session source / medium as a row dimension, and apply this filter to show only AI sources:

^(chatgpt\.com|chat\.openai\.com|perplexity\.ai|gemini\.google\.com|copilot\.microsoft\.com|claude\.ai)$

Then add Sessions, Engaged sessions, and Key events as values to compare which AI engine sends the most engaged traffic. A practical finding many teams see: Perplexity and ChatGPT web send the cleanest, attributable referrals, while Gemini and Google AI Mode under-report because of the Google hostname overlap described above.

What GA4 cannot see about AI traffic (the honest caveats)

GA4 systematically undercounts AI referral traffic because three losses happen before GA4 ever runs. As of 2026, the gap between "AI sent this visit" and "GA4 attributed this visit to AI" is large, so treat GA4 AI numbers as a floor, not a true total.

The four blind spots:

  • App and stripped referrers: ChatGPT and Perplexity native apps, and answers that strip the referrer for privacy, arrive as Direct. GA4 cannot recover the lost referrer, so a real ChatGPT click becomes Direct traffic.
  • Google AI Mode and AI Overviews: both answer inside google.com, so GA4 cannot separate an AI Mode click from a classic organic Google click on the referrer. AI Mode traffic is folded into Organic Search.
  • Zero-click answers: when ChatGPT, Perplexity or Gemini cite your page but the user never clicks, GA4 records nothing, because GA4 only sees sessions that reach your site. A citation with no click is invisible to GA4.
  • Bot and crawler hits: AI crawler fetches (GPTBot, ClaudeBot, PerplexityBot) are not human sessions, so configure crawler access separately; see how to configure robots.txt for AI crawlers.

The structural limit: GA4 measures downstream clicks, not upstream citations. To know whether ChatGPT, Perplexity, Claude and Gemini cite your pages at all (the zero-click and AI Mode traffic GA4 will never show), you need on-engine citation data, which is a different surface entirely; see how to measure AI share of voice.

Pair GA4 referral data with on-engine citation tracking

GA4 answers "who clicked through from an AI engine"; an AI citation API answers "which AI engines cite my pages and for which queries", and the two together close the attribution gap. As of 2026, GA4 alone cannot tell you why an AI engine sent (or withheld) traffic, because GA4 never sees the answer the user read before clicking.

How the two layers complement each other:

QuestionGA4 referral trackingOn-engine citation tracking
How many users clicked from ChatGPT?Yes (web referrers)No
Does Perplexity cite my page for a query?NoYes
Which sources does AI cite per country?NoYes
Did an AI answer drive zero-click brand lift?No (no session)Partial (citation present)
Who is the contact behind a cited source?NoYes

Getspotted is the citation layer: one /search call returns the sources Google, ChatGPT, AI Overview, Perplexity, Claude and Gemini cite for a query, per country, plus the contacts behind each source. Used alongside GA4, GA4 reports the clicks you won and Getspotted reports the citations behind them. Browse which sources AI cites for live examples, or compare tools in best AI visibility tools.

If you want to push on-engine citation data into your own dashboard next to GA4 metrics, start with the API docs.

A 6-step setup checklist

Follow these six steps in order to track AI referral traffic in GA4 end to end. Completing all six gives you a named AI channel, retroactive segments, and a documented list of what GA4 still cannot attribute.

  1. Confirm current AI referrers in Reports then Acquisition then Traffic acquisition, grouped by Session source, to see which hostnames already appear.
  2. Create the AI assistants custom channel group with the channel-group regex above, placed above Referral and Organic Search.
  3. Build the two Explore segments for retroactive analysis of historical AI traffic.
  4. Mark your conversions as Key events so per-engine engaged sessions and key events are comparable.
  5. Document the caveats (app referrers, Google AI Mode overlap, zero-click) so stakeholders read GA4 AI numbers as a floor.
  6. Add on-engine citation tracking to cover the zero-click and AI Mode traffic GA4 cannot see.

For the broader strategy of getting cited in the first place, see what GEO is and the role of AI Overviews.

FAQ

How do I see ChatGPT referral traffic in GA4?

Open Reports then Acquisition then Traffic acquisition, set the dimension to Session source, and look for chatgpt.com and chat.openai.com. As of 2026, ChatGPT web passes a referrer so it appears under Referral, but ChatGPT native apps strip the referrer and arrive as Direct, so the GA4 figure undercounts true ChatGPT traffic.

Why is my ChatGPT traffic showing as direct in GA4?

ChatGPT traffic shows as Direct in GA4 when the click comes from the ChatGPT iOS or Android app, or from an answer that strips the HTTP referrer. GA4 classifies any session with no referrer as Direct / (none), so app-driven ChatGPT visits cannot be attributed to ChatGPT on referrer alone.

What is the regex to track AI traffic in GA4?

Use chatgpt\.com|chat\.openai\.com|perplexity\.ai|gemini\.google\.com|copilot\.microsoft\.com|claude\.ai|edgeservices\.bing\.com against Session source in a custom channel group, or chatgpt|openai|perplexity|gemini\.google|copilot|claude|bing against Session source / medium in an Explore segment. Place the channel above Referral and Organic Search so it matches first.

Can GA4 track Google AI Mode and AI Overviews traffic?

No, GA4 cannot separate Google AI Mode or AI Overviews clicks from classic organic Google clicks. As of 2026, both AI surfaces answer inside google.com, so GA4 reads the same referrer for an AI Mode click and a blue-link organic click, and folds both into Organic Search.

Does GA4 count AI citations that get no click?

No, GA4 only records sessions that reach your site, so a zero-click AI citation (where ChatGPT, Perplexity or Gemini cite your page but the user never clicks) is invisible to GA4. To measure citations independent of clicks, use on-engine citation tracking; see how to measure AI share of voice.

How is Perplexity referral traffic tracked in GA4?

Perplexity passes a referrer reliably from perplexity.ai, so Perplexity referral traffic appears in GA4 under Referral with perplexity.ai as the source. Add perplexity.ai to the AI assistants custom channel group to reclassify it, and use the Explore segment to measure engaged sessions from Perplexity retroactively.

Should I use a channel group or a segment for AI traffic?

Use both for different jobs. A custom channel group classifies new AI traffic into a named channel across standard reports but is not retroactive. An Explore segment applies retroactively to historical data but only inside Explore. Create the channel group for ongoing reporting and the segments for analyzing AI traffic you already received.

GEOAI visibilityGA4analyticsAI referral traffic
A

Written by

Alexis Maresca

Cofounder, Getspotted · GEO & AI visibility expert

Alexis Maresca is a cofounder of Getspotted and a specialist in Generative Engine Optimization (GEO). He helps brands and agencies understand which sources AI engines like ChatGPT, Perplexity, Claude and Google AI Overviews cite, and how to get featured in AI-generated answers.

See what AI recommends to your buyers

Scan 6 AI engines in one click. Find the sources they cite. Get your brand featured.

Try Getspotted free