AI Traffic in GA4: How to Detect and Measure ChatGPT, Gemini, and Perplexity
GA4 does not distinguish AI traffic by default. Here is how to create a custom channel to track ChatGPT, Gemini, Perplexity, and Claude.
GA4 Is Blind to AI Traffic by Default
AI assistants are generating a growing volume of traffic to websites. ChatGPT, Gemini, Perplexity, Claude, Mistral: each of these tools can redirect users to your pages. The problem is that GA4 makes no distinction between this traffic and regular traffic.
When a user clicks a link in a ChatGPT response, GA4 sees a referrer like chat.openai.com and classifies it as Referral. When Perplexity cites your page, the traffic may even land in Organic Search if the referrer is misinterpreted. And in some cases, AI agents execute requests with no referrer at all, producing Direct traffic.
The result: your AI traffic is invisible, diluted across channels that do not reflect its true nature.
Creating a Custom “AI Traffic” Channel in GA4
The solution is to create a custom channel group that intercepts AI traffic before it falls into default channels. Rule order is crucial: your AI Traffic channel must be positioned above Referral and Organic Search in the hierarchy.
Here is the detection regex to use on the source dimension: chatgpt|openai|copilot|gemini|perplexity|claude|anthropic|mistral|phind|you.com. For the European market, include mistral, which generates non-negligible traffic from Mistral Le Chat applications.
In GA4, go to Admin, then Data display, then Channel groups, and create a new group. Add a rule based on session source with the condition “matches regex” and paste your regex. Name the channel “AI Traffic” and place it at the top of the list.
Weak Signals of AI Traffic
Even with a custom channel, some AI traffic will remain invisible. AI agents executing background requests (for retrieval-augmented generation, for example) often send no referrer. This traffic lands in Direct and cannot be automatically reclassified.
Several weak signals allow you to suspect it: 0-second engagement time, 100% bounce rate, medium in (not set), and above all the absence of a persistent client_id. AI agents are stateless by nature. Each request is independent, with no cookie or session identifier. Session-level analysis is therefore mandatory to distinguish this behavior from human traffic.
For more on tracking AI chatbot traffic, see our article on Matomo and AI chatbot tracking.
Measuring the Real Quality of AI Traffic
Detecting AI traffic is one thing. Evaluating its value is another. Classic metrics (page views, session duration) are often misleading for this type of traffic. A user redirected by Perplexity arrives with very precise intent: they have already read a summary of your content and are looking for either confirmation or a specific detail.
The only true quality indicator for AI traffic is its impact on conversions. Cross your AI Traffic channel with your conversion events to measure the actual conversion rate. Compare it with Organic Search and classic Referral traffic.
If your AI conversion rate is significantly lower, analyze the landing pages. Are AI users landing on relevant pages or on intermediate pages that do not answer their initial query?
Setting Up Sustainable Tracking
AI traffic sources evolve rapidly. New tools appear each month, and existing ones regularly change their referrer domains. Your detection regex should be reviewed quarterly.
For more robust tracking, a well-structured GA4 and GTM configuration lets you add supplementary detection rules without modifying site code. Server-side tracking provides an additional layer of control by allowing you to inspect HTTP headers and User-Agent strings, which often contain signatures specific to AI agents (such as GPTBot or PerplexityBot in the User-Agent).
Visibility into AI traffic is no longer optional. It is a competitive advantage for understanding how your content is consumed and redistributed by language models.