Skip to content
How to Track AI Traffic in GA4 (Step-by-Step)
Technical9 min read·1,650 words

How to Track AI Traffic in GA4 (Step-by-Step)

A concrete GA4 setup to isolate referral visits from ChatGPT, Perplexity, Gemini, and Copilot — including a regex referral segment, the exact exploration report to build, and a reference table of AI referral hostnames.

Joel House
Joel HouseFounder, Outrigger
Key Takeaway

To track AI traffic in GA4, build a regex-based segment or channel that matches the referral hostnames of AI assistants — chatgpt.com, perplexity.ai, gemini.google.com, copilot.microsoft.com, and related domains — then view it in an Exploration report broken down by landing page and conversion. GA4 does not isolate AI traffic by default; it buckets most of it under Referral or Direct. The fix is a saved segment using a session source regex, which lets you measure AI referral volume, the pages it lands on, and how it converts against your other channels.

Why GA4 Doesn't Show AI Traffic by Default

If you open GA4 and look for "ChatGPT" or "AI" as a traffic source, you will not find it. GA4 has no native AI channel. AI referral visits get scattered across two buckets: some land in Referral (when the assistant passes a referrer header), and a meaningful share lands in Direct (when it does not, or when the user copies a link out of a chat).

That scattering is the whole problem. AI referral traffic converts roughly 4.4x better than traditional organic traffic, according to a 2026 study from Outrigger — which means the visits you cannot see are disproportionately your highest-intent visits. If you are not isolating them, you are undervaluing your single most efficient channel.

The pattern is familiar to Outrigger founder Joel House: "Most businesses are flying blind on AI traffic not because the data isn't there, but because GA4 doesn't label it for you. The visits are sitting in your Referral and Direct reports right now, unattributed. Fifteen minutes of setup turns an invisible channel into a measurable one — and once you can measure it, you can prove its value and defend the budget behind it."

The good news: the raw data GA4 needs is already collected. You just have to teach GA4 to group it. The rest of this guide walks through exactly that — the hostnames to match, the segment to build, and the report to read. For the strategic context on what this channel is, see what is AI referral traffic.

The AI Referral Hostnames to Track

Before building anything, you need the list of source hostnames GA4 records when an AI assistant sends a visit. These are the values that appear in the Session source dimension. The list below covers the major assistants as of 2026.

AI AssistantReferral Hostname(s)Notes
ChatGPTchatgpt.com, chat.openai.comLargest volume for most sites; older links still use openai.com
Perplexityperplexity.aiPasses referrers reliably; strong citation-driven traffic
Google Geminigemini.google.comSeparate from Google Search organic
Microsoft Copilotcopilot.microsoft.com, bing.com/chatSome Copilot traffic appears under bing
Claudeclaude.aiAnthropic's assistant
Google AI Overviewsgoogle.comHard to isolate — folds into organic Search
Meta AImeta.aiEmerging, lower volume

Two caveats matter. First, Google AI Overviews traffic is genuinely difficult to separate because it originates on google.com and blends into your organic Search channel — you generally cannot cleanly isolate it in GA4. Second, hostnames change as products rebrand and launch; treat this table as a starting point and periodically check your own Referral report for new AI domains sending traffic.

Keep this list handy — the next step turns it into a single regular expression.

Step-by-Step: Build the AI Traffic Segment

Here is the exact setup. This uses a regex that matches every hostname from the table above in one pattern.

  1. Compose the regex. Combine the hostnames into one alternation pattern: chatgpt\.com|chat\.openai\.com|perplexity\.ai|gemini\.google\.com|copilot\.microsoft\.com|claude\.ai|meta\.ai. The backslashes escape the dots so they match literally. Save this — you will paste it in two places.

2. Open a new Exploration. In GA4, go to Explore and start a Blank exploration. This is where you get the flexible reporting GA4's standard reports do not offer.

3. Create the segment. In the Segments panel, create a new session segment and name it "AI Assistants." Add a condition on the dimension Session source with the match type matches regex, and paste your regex as the value.

4. Add a fallback for Direct-classified visits (optional but recommended). Some AI traffic arrives without a referrer and lands in Direct. If you use UTM tagging on links you control, or you have set up first-party detection, add those conditions here with OR logic. Pure Direct AI traffic cannot be fully recovered, but this catches what is taggable.

5. Build the report rows and values. Drag Landing page into Rows, and add Sessions, Engaged sessions, and your key event or conversion metric (plus revenue if you track it) into Values. Apply the AI Assistants segment.

6. Save and name the Exploration "AI Referral Traffic." It now recalculates automatically as new data arrives.

That is the core setup. For a more permanent solution, you can also create a custom channel group in Admin so AI traffic appears as its own channel in standard reports — but the segment-in-Exploration approach is faster to stand up and easier to iterate.

One practical tip on the custom channel group route, since it is the more durable option: in GA4's Admin area, create a new channel group with a rule that assigns sessions to a channel named "AI Assistants" when Session source matches your regex. Order that rule above the default Referral rule so AI visits are claimed before they fall into the generic Referral bucket. The advantage over a segment is that the channel then appears everywhere in GA4's standard reports — acquisition, landing pages, conversions — not just inside the one Exploration you built. The tradeoff is that channel group changes apply to new data going forward rather than retroactively, so stand it up early and let data accumulate.

Reading the Report: What to Actually Measure

A segment that just counts sessions is a vanity metric. The value is in the breakdowns. Here is what to look at once the report is running.

Volume trend over time. Add a line chart with Sessions over Date, segmented by AI Assistants. This shows whether your AI visibility work is moving the needle. Rising AI referral sessions is the clearest downstream proof that you are being cited more often.

Landing pages. Which pages do AI assistants send people to? This is gold. The pages AI models link to are the pages they consider your most citable — study them, and build more content in that mold. If a comparison page or a statistics page is pulling most of your AI traffic, that tells you the content formats AI models cite most.

Conversion rate versus other channels. Add your organic and paid channels alongside the AI segment and compare conversion rate. This is where the 4.4x figure becomes real for your business — you will typically see AI referral visits convert well above your site average, which is the argument you make when someone asks whether AI visibility is worth the investment.

Source breakdown within AI. Split the segment by Session source to see which assistant drives the most traffic and the best conversions. Most sites find ChatGPT leads on volume and Perplexity punches above its weight on quality, but yours may differ — measure, do not assume.

Conversion rate by channel is the metric that changes the conversation. When a client sees AI referral visits converting at three or four times their organic rate, the question stops being whether to invest in AI visibility and becomes why they are not investing more — an argument you cannot make without the GA4 setup behind it.

This reporting also connects to the bigger zero-click search reality: as AI Overviews compress traditional click-through rates, the clicks that do arrive from AI are more valuable — and you want them isolated so you can defend them. To tie this measurement to a broader return model, see the ROI of AI visibility. And to check where your brand actually stands across the AI engines before you optimize, a free AI visibility audit shows which assistants cite you and which send you nothing.

Limitations and How to Work Around Them

Be honest about what this setup can and cannot do, so you interpret the numbers correctly.

Direct-bucketed traffic is partly unrecoverable. When someone reads a ChatGPT answer, copies your URL, and pastes it into a new browser tab, GA4 sees Direct with no referrer. There is no clean way to attribute that to ChatGPT. Your measured AI traffic is therefore a floor, not a ceiling — the real number is higher. Treat your segment as a conservative baseline.

AI Overviews stays folded into organic. Because Google AI Overviews serve on google.com, that traffic blends into your organic Search channel and cannot be isolated in GA4 alone. If AI Overviews are a major surface for your queries, you will need to infer their impact from Search Console query and click-through trends rather than GA4 referral data.

Hostnames drift. New assistants launch and existing ones rebrand. Review your Referral report monthly for unfamiliar AI domains and add them to your regex. A segment built once and never updated slowly under-counts.

Referral data can be sampled. In very high-traffic Explorations, GA4 may sample. If precision matters, narrow the date range or use the custom channel group approach, which reports on unsampled standard data.

None of these break the method — they just mean you read the output as "at least this much, landing on these pages, converting at this rate" rather than a perfect census. That is still a massive upgrade over the default, where AI traffic is invisible. An imperfect measurement of your best channel beats a perfect measurement of nothing: get the segment live, accept that it under-counts, and make decisions on the trend and the conversion rate, which are directionally reliable.

Frequently Asked Questions

Does GA4 track ChatGPT traffic automatically?

Not as a labeled source. GA4 records visits from ChatGPT under the Referral channel when the assistant passes a referrer (as chatgpt.com or chat.openai.com), and under Direct when it does not. There is no built-in ChatGPT or AI channel, so you have to build a segment or custom channel group that matches the AI referral hostnames to isolate and measure this traffic.

What is the regex to track AI traffic in GA4?

Use a Session source "matches regex" condition with a pattern that alternates the AI hostnames, for example: chatgpt\.com|chat\.openai\.com|perplexity\.ai|gemini\.google\.com|copilot\.microsoft\.com|claude\.ai|meta\.ai. The escaped dots match literally. Apply this as a session segment in an Exploration, then break it down by landing page and conversion. Update the pattern as new AI assistants launch.

Why does AI traffic show up as Direct in GA4?

AI traffic appears as Direct when the visit arrives without a referrer header — commonly when a user copies your URL out of a chat answer and pastes it into a browser, or when the assistant does not pass referrer data. This portion generally cannot be fully attributed back to the AI source, which means any AI-traffic segment you build is a conservative floor and the true number is higher.

Can I track Google AI Overviews traffic in GA4?

Not cleanly. AI Overviews are served on google.com, so that traffic folds into your organic Search channel and cannot be isolated as a separate AI source within GA4 alone. To gauge AI Overviews impact, look at Search Console for queries where impressions hold but click-through rate drops — a common signature of Overviews absorbing the click — rather than expecting a distinct source in GA4.

Check Your AI Visibility Score

Run a free 5-pillar audit and see where your brand stands across Citations, AI Presence, Entities, Reviews, and Press.

Run Free Audit →

Related Articles

The GEO Briefing

What the AI engines changed this week

One email. Fresh data from our 1,004-business visibility index, what moved, and the single highest-leverage thing to do about it.