Learn

How to track ChatGPT and AI referral traffic in GA4

Give visits from ChatGPT, Perplexity, Claude, Gemini and Copilot their own channel in Google Analytics in ten minutes, and know which part of that traffic GA4 will never show you.

A sessions-by-source table with ChatGPT, Perplexity, Gemini and Claude among the sources, beside a rising total and its share
Measurement

The short answer. Create a custom channel group in GA4 with a channel called “AI assistants” that matches the session source against the hostnames of the assistants, and put it above Referral. Custom channel groups apply to past data, so you see the history straight away. Expect an undercount: some AI clicks arrive with no referrer and land in Direct, and AI Overviews clicks are indistinguishable from other Google traffic.

Step by step

  1. Open channel groups. In GA4, go to Admin → Data display → Channel groups. You need Editor access or above on the property.
  2. Copy the default group. Click Create new channel group. GA4 starts it as a copy of the default group, so every existing channel stays. Name it something like “Channels with AI”.
  3. Add the AI channel. Click Add new channel, name it “AI assistants”, add a condition on Source, choose matches regex, and paste the regex below. Save the channel. GA4 won’t let you rename a channel later, so pick the name now.
  4. Move it above Referral. GA4 puts a visit in the first channel whose rules it matches. Click Reorder, drag “AI assistants” above “Referral”, apply, and save the group.
  5. Read it. Open Reports → Acquisition → Traffic acquisition and switch the primary dimension from the default channel group to yours.

The regex

This is the same pattern Mentioned uses to count AI visits when you connect GA4. It matches the hostname with or without www. or another subdomain:

^(.+\.)?(chatgpt\.com|chat\.openai\.com|perplexity\.ai|gemini\.google\.com|bard\.google\.com|claude\.ai|copilot\.microsoft\.com|you\.com|phind\.com|meta\.ai|chat\.deepseek\.com|grok\.com|poe\.com)$

It covers the referrer hostname and the utm_source=chatgpt.com tag ChatGPT adds to many of its links, since GA4 reads both as the session source. Add hosts as new assistants appear.

Quicker: an exploration

If you only need a number today, go to Explore → Free form, add Session source as a dimension and Sessions and Key events as metrics, and filter Session source with the same regex. It doesn’t change your reports, and it doesn’t use one of your custom channel groups, of which Google allows two on a standard property.

What GA4 can’t show you

So AI referral traffic is a lagging, partial signal. It tells you some recommendations turn into visits. It can’t tell you how often you’re recommended, for which questions, or who’s named instead.

Put the two side by side

The useful view is both at once: what the assistants say about you, and whether those answers turn into visits. Mentioned does that. It asks ChatGPT, Claude and Gemini your buyers’ questions the same way every week, and when you connect Search Console and GA4, read-only, its Search & traffic screen shows your top queries and your AI-referred sessions next to your AI visibility. The data is fetched from Google when you open the page and isn’t stored.

For what to do when the numbers are low, start with how to get mentioned by ChatGPT and Claude.

Questions

Why does ChatGPT traffic show up as Direct in GA4?

A visit only carries a source if the browser sends a referrer or the link carries a UTM tag. A link copied out of an answer into a new tab, or opened from some apps, can arrive with neither, so GA4 files it as Direct. Seer Interactive’s testing in June 2025 found ChatGPT adds utm_source=chatgpt.com to many cited sources, but not every one.

Can I see AI Overviews traffic in GA4?

Not separately. A click from an AI Overview arrives as google / organic like any other Google result. Google says AI Overviews and AI Mode are counted in Search Console’s Performance report under the Web search type, mixed in with other Search traffic.

How many custom channel groups can I make?

Google’s help page says two on a standard GA4 property and five on GA4 360, each with up to 50 channels, in addition to the default group.

Is AI referral traffic a good measure of AI visibility?

It’s a lagging, partial one. Many answers that recommend you never produce a click, and some clicks hide as Direct. Track what the assistants say directly, and use GA4 to see whether recommendations turn into visits.

Run a free check   How the GA4 connection works →