Tracking AI Referral Traffic in GA4 (ChatGPT, Perplexity, Copilot)
· 6 min read · By Perciva Team
Yes, you can track AI referral traffic in GA4: when a user clicks a link inside ChatGPT, Perplexity, Copilot, or Gemini and lands on your site with a referrer intact, GA4 records the source hostname — chatgpt.com, perplexity.ai, copilot.microsoft.com, gemini.google.com. This guide gives you the exact hostnames, a working regex, step-by-step Explorations and channel-group setup, and an honest account of what GA4 cannot see.
The Hostnames That Identify AI Traffic
| Assistant | Session source in GA4 | Notes |
| ChatGPT | chatgpt.com | Outbound links also append utm_source=chatgpt.com; legacy traffic may show chat.openai.com |
| Perplexity | perplexity.ai | Reliable referrer on web clicks |
| Microsoft Copilot | copilot.microsoft.com | Some older traffic arrived via bing.com paths |
| Google Gemini | gemini.google.com | Distinct from google / organic |
| Claude | claude.ai | Web app link-outs |
The regex that matches them as a group:
chatgpt\.com|perplexity\.ai|copilot\.microsoft\.com|gemini\.google\.com|claude\.ai
One GA4-specific trap: in several GA4 surfaces (notably Explorations filters and audience conditions), "matches regex" is a full match, not a partial match. If your filter returns nothing, wrap the pattern: .*(chatgpt\.com|perplexity\.ai|copilot\.microsoft\.com|gemini\.google\.com|claude\.ai).*
Treat the hostname list as living, not final: new assistants launch, and existing ones change domains (as OpenAI's move from chat.openai.com to chatgpt.com showed). Once a quarter, skim your full referral source list for unfamiliar AI-looking hostnames and fold them into the pattern.
Option 1: The Quick Look (Traffic Acquisition Report)
- Go to Reports → Acquisition → Traffic acquisition.
- Change the primary dimension to Session source / medium.
- In the search box above the table, type chatgpt (or any single hostname) to filter rows.
Good for a spot check; the search box only handles one term at a time, so use an Exploration for the combined view.
Option 2: A Dedicated Exploration
- Go to Explore → Blank.
- Import dimensions: Session source, Landing page + query string. Import metrics: Sessions, Engaged sessions, Key events.
- Rows: Session source. Values: your metrics.
- Add a filter: Session source → matches regex → the wrapped pattern above.
- Add Landing page as a second row dimension to see which pages AI assistants send people to — typically docs, comparison pages, and pricing rather than your homepage.
Option 3: A Custom "AI Referrals" Channel
To make AI traffic a first-class line in standard reports:
- Go to Admin → Data settings → Channel groups and create (or edit a copy of) a channel group.
- Add a new channel named AI Referrals with the condition: Source → matches regex → the hostname pattern.
- Drag the rule above Referral in the ordering — channel rules apply top-down, and if Referral sits higher it claims the traffic first.
Note that GA4 began rolling out a native AI-traffic channel in 2026 that auto-classifies several major assistants — check whether your property has it, what it includes (early versions did not classify every assistant; verify Perplexity in particular), and whether its definition matches yours before relying on it. A custom channel keeps the definition under your control either way.
Give Every Session a Better Landing
Since ChatGPT appends utm_source=chatgpt.com to outbound links, you'll also see AI visits under source/medium combinations driven by UTMs rather than referrers. Keep both in your regex-based definitions (the hostname pattern above matches the utm_source value too, since it's the same string). And for links you control — your URLs cited in directories or your own content likely to be quoted — standard UTM discipline still applies.
Is the Traffic Any Good? Measure Quality, Not Just Volume
Once the segmentation exists, the interesting comparison is AI referrals against your other channels on quality metrics — engagement rate, key events per session, and pages per session. Many teams find AI-referred visitors behave like late-stage researchers: they arrive on specific deep pages (docs, pricing, comparisons) having already read a synthesized overview, so fewer sessions can carry disproportionate intent. Check this in your own data rather than assuming it: add Session key event rate to the Exploration from Option 2 and compare the AI rows against organic search. Whatever you find becomes the honest multiplier when someone asks what an AI referral is worth.
Troubleshooting: Why Does My Report Show Zero?
- Regex full-match bite. The most common cause: an unwrapped pattern in a full-match context. Add the leading and trailing .* and re-check.
- Looking at hostname instead of source. The AI domain appears in Session source (where the visitor came from), not Hostname (your own site's domain). Confirm the dimension.
- Date range predates the traffic. AI referral volume for most B2B sites only became measurable recently; a trailing-12-months view dilutes it to invisibility. Look at the last 90 days first.
- It's genuinely small. For most B2B SaaS sites, AI referrals are low single-digit percentages of sessions. That's expected — it's the visible remnant of a mostly zero-click channel, which is why volume alone understates the channel's influence.
What GA4 Cannot Show You
Be straight about the blind spots before anyone treats this report as "AI's impact":
- Missing referrers. A meaningful share of AI-assistant clicks arrives with no referrer at all — native mobile/desktop apps and some privacy settings strip it — and lands in Direct. Your AI referral number is a floor, not a total.
- Zero-click research. Most AI research sessions never produce a click: the buyer asks, reads the answer, and moves on. The influence happened; no session exists. This is zero-click research, and it's the majority of the iceberg.
- Answer content is invisible. GA4 tells you a session came from chatgpt.com. It cannot tell you what ChatGPT said — whether it recommended you, a rival, or misquoted your pricing on the way. Referral tracking measures the click; it cannot measure the recommendation.
Operationalizing the Report
Two habits turn the one-time setup into a channel you actually manage. First, annotate your changes: when you publish a major comparison page, correct a third-party listing, or ship a rebrand, note the date against the AI referral trendline (in your reporting doc if not in GA4 itself) — with a channel this small, a step change is visible and attribution to a dated action is credible. Second, schedule the view: save the Exploration, or pin the AI Referrals channel row into whatever weekly dashboard the team already reads. A segmentation nobody looks at decays into trivia; the goal is for "AI referrals, up or down, and to which pages" to become a question your team can answer in one glance. If you need more granularity later — per-assistant landing-page performance, path analysis — the free BigQuery export gives you event-level source data without any additional instrumentation.
A Sensible Measurement Stack
- GA4 AI referral tracking (this post): trend the clicks that do land, and learn which pages AI sends buyers to.
- Self-reported attribution: add "AI assistant (ChatGPT, etc.)" to your "how did you hear about us" field — it routinely catches influence the referrer never shows.
- Answer monitoring: track what the assistants actually say on buyer questions, which is the layer where recommendations are won and lost — the subject of our AI dark funnel attribution guide and, on the measurement side, how to measure GEO.
Set up the Exploration and the channel group this week — it's thirty minutes of work — then treat the resulting number as what it is: the visible edge of a mostly invisible research process.