How to track ChatGPT, Perplexity and Claude traffic in Google Analytics 4
More people now ask ChatGPT, Perplexity, Claude or Gemini a question and click one of the sources in the answer, instead of searching. That traffic is real and often converts well, but Google Analytics 4 doesn't show it as its own channel. By default it is spread across Referral, and sometimes Direct.
This guide sets up a separate AI Assistants channel in GA4, explains what it can't catch, and shows how to tell whether AI visitors convert.
Where AI traffic hides in GA4 by default
When someone clicks a link inside ChatGPT on the web, the browser usually sends chatgpt.com as the referrer. GA4's default channel group has no rule for AI tools, so the visit lands in Referral next to every blog and forum that links to you. Some visits arrive with no referrer at all and are counted as Direct (more on that below).
Step 1: Create a custom channel group
- In GA4, open Admin → Data display → Channel groups.
- Click Create new channel group. GA4 copies the default rules, so you only add one channel.
- Click Add new channel and name it
AI Assistants. - Set the condition to Source → matches regex and paste the pattern from step 2.
- Save the channel, then drag it above Referral. GA4 assigns each session to the first rule that matches, from the top. If Referral comes first, it takes the AI visits and your new channel stays empty.
- Save the group. It appears as a dimension in reports and explorations.
Step 2: The regex
This matches the main AI assistants that send clicks today:
^(.*\.)?(chatgpt\.com|chat\.openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|chat\.deepseek\.com|grok\.com|meta\.ai|chat\.mistral\.ai|you\.com|phind\.com|poe\.com)$
New assistants appear regularly, so check your Referral report every few months and add hosts you don't recognise.
Step 3: See what AI visitors do
In Reports → Acquisition → Traffic acquisition, switch the primary dimension to your new channel group. Add Landing page as a secondary dimension to see which pages AI tools send people to. These are usually the pages the AI cites, and worth keeping accurate and up to date.
To check conversions, mark your signup or purchase event as a key event and compare its rate for AI Assistants with Organic Search.
Why some AI traffic still shows up as Direct
No analytics tool can attribute a visit that arrives without a referrer. That happens when:
- a link is opened from the ChatGPT or Claude desktop or mobile app, which may open it without a referrer;
- the user copies the URL from the answer and pastes it into the address bar;
- the AI page uses a strict referrer policy.
Treat the AI channel as a minimum, not the full number. For links you control (for example in docs that AI tools quote), adding ?utm_source=chatgpt doesn't help, because the AI copies whatever URL it finds. A steady rise in Direct traffic to deep pages like /docs/... is often a sign of AI traffic.
What GA4 can't show you: AI crawlers
Before an assistant can cite you, its crawlers have to read your pages: GPTBot and OAI-SearchBot for OpenAI, ClaudeBot and Claude-SearchBot for Anthropic, PerplexityBot for Perplexity. GA4 filters bots out completely, so you can't see whether they visit or which pages they read. Your server logs or a tool that classifies bots can. You can check what your robots.txt allows with our free AI Crawler Checker.
A simpler option
If you'd rather not maintain regexes, PageLens groups AI assistants into their own channel automatically, shows each one as a referrer with its landing pages, and reports AI crawlers and agents separately, so they never inflate visitor numbers. It's cookieless, so it also counts visitors who would decline a GA4 consent banner.