Targetlytics.AI
AI attribution guide

How to track AI referral traffic

ChatGPT, Perplexity, Google AI Overviews and Gemini now send real buyers to your website — but most of that traffic lands in GA4 as Direct or Organic with no label. This guide shows you how to see it, measure it, and connect it to pipeline.

The short answer

  • AI assistants usually pass no referrer, so their traffic collapses into GA4's Direct channel — or into Organic when the click comes from a Google AI Overview.
  • You can recover most of it with a GA4 custom channel group that matches known AI referral hostnames: chatgpt.com, perplexity.ai, gemini.google.com, copilot.microsoft.com and others.
  • Hostname matching is directional, not exact — it misses app-based and zero-referrer visits. Server-side logging of the first landing request closes part of that gap.
  • Traffic counts alone don't survive a CFO conversation. Attribution matters once an AI-sourced visit is tied to a lead, an opportunity and closed revenue.

Why AI traffic disappears in analytics

When someone clicks a link inside ChatGPT, Perplexity or a Gemini answer, the browser often sends no Referer header — the assistant runs in an app, opens links through a redirect, or sets a strict referrer policy. GA4 sees a visit with no source and files it under Direct, the same bucket as bookmarks and typed URLs.

Google AI Overviews behave differently. Those clicks come from a google.com results page, so GA4 correctly labels them Organic — but gives you no way to separate an AI Overview click from a classic blue-link click. Both look identical in the default reports.

The result: a channel that may already drive 5–15% of qualified B2B visits shows up as noise. You cannot optimise, forecast or defend a channel you cannot name.

Build a custom channel group in GA4

GA4 lets you define a custom channel group that re-classifies traffic using rules you control. Create one channel called "AI Assistants" and match sessions where the session source matches a list of known AI hostnames.

Maintain the hostname list as a living document — new assistants and referral domains appear every quarter. At minimum include chatgpt.com, chat.openai.com, perplexity.ai, gemini.google.com, copilot.microsoft.com, claude.ai and you.com.

  • Custom channel groups apply going forward and reprocess within the retention window — they do not rewrite historical exports.
  • Use a regex match on source so you catch subdomains and country variants without listing each one.
  • Keep AI Overviews separate: approximate them by segmenting Organic sessions that land on pages cited in AI answers, and treat that number as an estimate.

Tag the links you control, infer the rest

Anywhere you can influence the link — your llms.txt, structured data, syndicated content, partner sites, docs — append UTM parameters so the click arrives labelled. A consistent scheme such as utm_source=chatgpt&utm_medium=ai_referral removes all ambiguity for those paths.

You cannot UTM-tag a citation an assistant composes on its own, which is why channel grouping and server logs stay necessary. Tag what you can; infer the rest. Then connect the AI-assistant channel to your CRM so an AI-sourced visit that becomes a lead carries that origin all the way to closed-won. That is the point of the exercise: not a prettier channel report, but a defensible number for how much revenue AI search produced this quarter.

Where each AI source lands by default

How the major assistants show up in GA4 before you change anything.

SourceDefault GA4 channelPasses a referrer?How to recover it
ChatGPT (web)DirectSometimes (chatgpt.com)Hostname match + UTM on owned links
ChatGPT (app)DirectNoServer logs; UTM where possible
PerplexityDirect / ReferralOften (perplexity.ai)Hostname match
Google AI OverviewsOrganic SearchYes (google.com)Segment by AI-ranked landing pages (estimate)
GeminiDirect / ReferralSometimesHostname match
Microsoft CopilotDirect / ReferralOften (copilot.microsoft.com)Hostname match

Set it up: step by step

1

Create the custom channel group

In GA4: Admin → Data display → Channel groups → Create new channel group. Name it "AI + Organic" or similar.

2

Add an "AI Assistants" channel

Add a channel above Organic Search. Condition: Session source matches regex chatgpt|openai|perplexity|gemini\.google|copilot\.microsoft|claude\.ai|you\.com.

3

Adopt a UTM convention

Document a standard — utm_source=<assistant>, utm_medium=ai_referral — and apply it to every link you control in syndicated and owned content.

4

Log landing requests server-side

Record the first request of each session (timestamp, landing path, referrer, user agent) so zero-referrer hits and verified AI crawlers are captured outside GA4.

5

Pipe the channel into your CRM

Pass the AI-assistant source as a hidden field on every form so it persists on the contact and the opportunity.

6

Report on conversion, not clicks

Build one view: AI-sourced sessions → leads → opportunities → revenue. Review it monthly against your other channels.

Turn AI traffic into a revenue number

Targetlytics identifies the companies arriving from ChatGPT and writes them into your CRM — so AI search becomes a line item, not a guess.

See AI revenue attribution

Frequently asked questions

ChatGPT usually sends no referrer — links open from an app or through a redirect that strips the source. GA4 files any session with no identifiable source under Direct. A custom channel group matching the chatgpt.com hostname recovers the web-based share; app-based clicks need server-side logging.

Not precisely. AI Overview clicks originate on a google.com page, so GA4 counts them as Organic Search with no flag distinguishing them from standard results. The closest approximation is to segment Organic sessions landing on pages you know are cited in AI Overviews, and treat it as an estimate.

Only on links you control — your own site, syndicated articles, partner pages, documentation, llms.txt. You cannot tag a citation the assistant composes itself. Use UTMs everywhere you can and rely on channel grouping and server logs for the rest.

For B2B sites it is commonly 5–15% of qualified sessions and growing month over month, but it varies widely by category. The only way to know your number is to classify the traffic and measure it over at least a quarter.

Judge it on trend and conversion rate, not today's absolute volume. AI-referred visitors often arrive later in the buying process and convert better than generic organic traffic. The channel compounds and the cost of starting to measure it now is close to zero.