How to Track AI Search Traffic in GA4
AI referrals hide in GA4's Referral and Direct channels. Use the AI Assistant channel, a source regex, and a custom channel group to surface them.
SEO · 8 min read · Step-by-step
Traffic from ChatGPT, Perplexity, Claude, and Gemini is arriving at your site — but in Google Analytics 4 it mostly hides in the Referral channel, or worse, in Direct, mixed with people who typed your URL by hand. If you want to know how to track AI search traffic in GA4, you need three things: a 30-second check to see what is already recorded, a custom channel group to make it permanent, and an honest understanding of what GA4 can never show you.
The short version: GA4 added a native AI Assistant channel in May 2026, but it catches only part of the picture. The rest of this guide recovers what it misses.
Step 1: Run the 30-second check
Before building anything, see what GA4 already has. Open Reports → Acquisition → Traffic acquisition, switch the primary dimension to Session source, then add a filter: Session source → matches regex, and paste this pattern:
chatgpt\.com|chat\.openai\.com|perplexity\.ai|gemini\.google\.com|copilot\.microsoft\.com|claude\.ai
That single regex matches the referrer domains of the big AI assistants plus ChatGPT's legacy domain. If rows appear, you already have AI referral traffic — the question is only how much of it you have been misreading as generic referral traffic. If nothing appears, either the traffic is genuinely absent or it is arriving without a referrer and landing in Direct, which Step 2's channel group cannot fix either — more on that in Step 4.
Also check the native channel while you are here. Switch the primary dimension to Session default channel group and look for an AI Assistant row. Google added it to the default channel group on May 13, 2026: when a visit arrives from a recognized assistant, GA4 tags the medium as ai-assistant and files the session there, with no setup from you.
Here is the catch. The native channel only names ChatGPT, Gemini, Claude, and a handful of others — Perplexity is not confirmed in it — and only when the visit carries a clean referrer. It does not backfill history, so your trend line starts flat at zero on the day it went live for your property, even if ChatGPT sent you visitors for years. Treat it as a floor, not a full count. And Google explicitly excludes its own AI Overviews and AI Mode from that channel: clicks from AI Overviews still arrive as organic search, so the AI Assistant line will never show them.
Step 2: Build a custom AI Search channel group
The quick filter is great for spot checks, but it disappears when you close the report. For a permanent view that sits next to Organic Search and Referral in every standard report, build a custom channel group. The default group cannot be edited, so you copy it and add a channel of your own:
- Go to Admin → Data display → Channel groups.
- Open the menu on the Default Channel Group and choose Copy.
- Name the copy something recognizable, like "Default + AI Search".
- Add a channel named AI Search. Set its condition to Source matches regex and paste the same pattern from Step 1:
chatgpt\.com|chat\.openai\.com|perplexity\.ai|gemini\.google\.com|copilot\.microsoft\.com|claude\.ai|meta\.ai|chat\.mistral\.ai
- Drag the AI Search channel above Referral in the ordering. Channel groups evaluate top to bottom, and a session that matches an earlier rule stops there — if Referral sits above your new channel, your AI sessions will keep landing in Referral.
- Save, then set the new group as the primary channel group for the property so standard reports use it.
Two details that trip people up. First, GA4 uses RE2 regex syntax and channel definitions are not case-sensitive, but raw UTM parameters are strictly case-sensitive — if you build rules on UTM values rather than sources, keep the casing exact. Second, test the pattern against live rows before trusting it: open an exploration, filter by your regex, and confirm the rows are actually AI referrals and not a coincidental match.
This custom group also recovers history the native channel left behind. Because the rule is evaluated against the session's stored source, past sessions that carried an AI referrer are reclassified when you view them through the new group — your AI traffic line finally has a past, not just a start date in May 2026.
Step 3: Read landing pages and conversions, not just sessions
A session count tells you AI traffic exists. It does not tell you whether it matters. Once the channel group is in place, answer three questions:
- Which pages earn the clicks? In the landing page report, add session source as a secondary dimension and filter to your AI sources. The pages that earn AI clicks are usually your clearest, most factual pages — comparison pages, pricing, and guides that answer one question directly. Those are the pages to protect and extend.
- Do these visitors do anything? Add key events next to sessions for the AI sources. A hundred AI sessions with zero conversions is a different story from ten sessions that all start a trial — and the difference decides whether AI visibility is a traffic project or a revenue project.
- How does AI compare with organic search? Put the AI Search channel next to Organic Search in the traffic acquisition report over the same period. AI referrals are usually small in absolute terms and growing fast; the comparison keeps the growth in proportion instead of letting a 300% increase on a base of twelve sessions set the strategy.
Keep this in perspective with your other content work: the pages that earn AI clicks are usually the same pages that already earn organic traffic. Our guide to finding content opportunities in Search Console shows how to spot those pages from query data — the AI channel group shows you what happens after an AI answer sends someone your way.
Step 4: Know what GA4 will never show you
GA4 measures clicks. AI visibility is mostly not clicks. When ChatGPT mentions your brand in an answer and the reader never clicks through, GA4 records nothing — no session, no source, no event. The same is true of a Perplexity answer that cites you, a Claude answer that recommends you, and every mention that shapes a buying decision without producing a visit. If you only watch GA4, you will conclude AI visibility is a rounding error right up until a prospect tells you they chose you because "ChatGPT recommended you."
Two gaps deserve explicit attention:
- No referrer, no attribution. When a user copies a link from an AI answer, opens your site from an app, or clicks through in a way that strips the referrer, the session lands in Direct. No channel rule can recover a referrer that never arrived. OpenAI documents that ChatGPT referral URLs automatically include
utm_source=chatgpt.com, which helps when the parameter survives — but do not build your whole measurement on it. Build filters around the source rather than assuming a medium or campaign value that is not promised for every link. - Mentions are not sessions. The only way to measure mentions, recommendations, and citations is to sample the answers themselves: ask the questions your buyers ask, on multiple engines, repeatedly, and count how often your brand appears. That is what AEOTools' sampling module does — a fixed prompt panel run across providers with every answer preserved — and our guide to measuring AI citations with a prompt panel explains the method so you can audit it. Use GA4 for what happens after the click, and sampling for everything that happens before it.
FAQ
Does GA4 track Perplexity traffic?
Perplexity visits usually arrive with the source perplexity.ai, so the regex filter and custom channel group in this guide catch them — but Google's native AI Assistant channel does not confirm Perplexity in its list, so do not rely on the native channel alone. Check Session source in your own reports to see where your Perplexity sessions actually land.
Why is my AI Assistant channel empty?
Three likely reasons: the rollout had not reached your property yet (broad availability arrived around early June 2026), your AI visits arrive without a clean referrer and land in Direct, or you genuinely have no qualifying AI referral sessions yet. Run the Step 1 regex check first — if it finds sessions the native channel missed, build the custom channel group.
Can I see which AI answers mention my brand in GA4?
No. GA4 only records visits to your site. A mention or citation that produces no click leaves no trace in GA4. To measure mentions, sample the AI answers directly with a fixed prompt panel across engines, as described in Step 4.
Do ChatGPT links carry UTM parameters?
OpenAI documents that ChatGPT referral URLs automatically include utm_source=chatgpt.com. It does not promise a fixed utm_medium or campaign name for every link, so build your filters around the source, not the medium — and expect some ChatGPT sessions to arrive without any UTM values at all.