#llmsmap.me

Analytics · practical guide

How to track AI traffic in GA4: ChatGPT, Perplexity, Gemini, and Claude

GA4 has a default AI Assistant channel. Learn what it counts, how to build a custom channel group with regex, and why some AI visits still look like Direct.

·9 min read
How to track AI traffic in GA4: ChatGPT, Perplexity, Gemini, and Claude
llmsmap.me editorial teamAnalytics · 9 min read

How to Track AI Traffic in GA4: ChatGPT, Perplexity, Gemini, and Claude

For years, the honest answer to "how much traffic do we get from ChatGPT?" was "we can't tell." Visits from AI assistants landed in Referral, Direct, or Unassigned, depending on what the assistant sent along with the click. Google Analytics 4 now ships a default AI Assistant channel, which fixes part of the problem and leaves the rest.

This guide explains exactly what the default channel counts, how to build your own channel group when you need more control, why a share of AI-driven visits will always look like Direct traffic, and what to measure instead of chasing a perfect number.

What GA4 says about AI Assistant traffic

Google's documentation of default channel groups lists AI Assistant as a channel. The description says it is the channel by which users arrive from sources like ChatGPT, Gemini, DeepSeek, Copilot, or Grok. It explicitly excludes Google's AI Overviews and AI Mode.

The classification rule in the documentation is short: the medium exactly matches ai-assistant. GA4 sets the medium to ai-assistant, and the campaign to (ai-assistant), when the referrer matches a list of known AI assistants. In other words, Google maintains the list, and a visit whose referrer is on it is labeled for you.

Two practical consequences:

  • Clicks from Google's AI Overviews and AI Mode are not in this channel. Google's guidance for site owners says that sites appearing in these features are included in overall search traffic in Search Console, in the Performance report under the Web search type. In GA4 those visits arrive from Google and are treated like other Google search traffic. You cannot separate them in GA4 alone.
  • The channel depends on the referrer. If the click carries no referrer, GA4 has nothing to match and the visit becomes Direct.

Check your own property: open Reports > Acquisition > Traffic acquisition, set the primary dimension to Session default channel group, and look for AI Assistant.

Why not just use the default channel?

The default channel is a good start. You might still want a custom channel group because:

  • you want to see ChatGPT, Perplexity, Claude, and Gemini as separate rows;
  • you want to include an assistant that is not on Google's list yet;
  • you need the grouping in reports and audiences for a period before the default channel existed (custom channel groups apply retroactively, according to Google);
  • you want to treat AI assistants differently from referral partners in your own reporting.

Build a custom channel group

Google's documentation includes an AI assistants example for custom channel groups. The steps:

  1. In GA4, open Admin.
  2. Under Data display, open Channel groups. You need the Editor role or above on the property.
  3. Click Create new channel group. It starts as a copy of the default group.
  4. Add a new channel, named for example "AI assistants."
  5. Add a condition on Source, choose matches regex, and enter a regex for the assistants you want.
  6. Save the channel, then reorder the list so your AI channel sits above Referral. You can also place it above Organic Search or other channels when needed.

The order matters because GA4 assigns a session to the first channel whose conditions match. If Referral is above your AI channel, every ChatGPT click gets claimed by Referral first.

To analyze the result, open Acquisition > User acquisition or Traffic acquisition and select your new channel group as the primary or secondary dimension. Google notes that custom channel groups also work as dimensions in custom reports, explorations, and audience conditions.

A regex you can adapt

Google's documented example is deliberately broad. A tighter pattern that names the assistants you care about is easier to maintain. Matching is case-sensitive in GA4, so use lowercase, or add the (?i) flag at the start if you see mixed case.

(?i).*(chatgpt|openai|perplexity|claude|anthropic|gemini|copilot|deepseek|grok|meta\.ai).*

Be careful with the very short words. .*ai.* as a pattern also matches the word "mail" in a source such as mail.example.com. Keep your list to specific names and review it every quarter, because assistants change domains and new ones appear.

If you want one channel per assistant, create separate channels and place them in order from most specific to least specific. Google's channel group limits apply: standard properties can have a limited number of custom channel groups in addition to the predefined one, so check the current numbers in the documentation before designing a long list.

Using a report instead of changing the property

If you cannot edit the property, use an Exploration:

  1. Open Explore and create a Free form exploration.
  2. Add dimensions Session source / medium and Landing page.
  3. Add metrics such as sessions, engaged sessions, and key events.
  4. Add a filter on Session source that matches your regex.

You get the same numbers without changing channel definitions. In Looker Studio you can build a calculated field with a CASE WHEN REGEXP_MATCH(...) expression over session source for the same effect.

Why some AI visits will still look like Direct

This is the part most guides skip, and it matters for how you read the numbers.

GA4 identifies a source from UTM parameters on the landing URL or, if there are none, from the referrer the browser sends. An assistant controls neither. The link in a ChatGPT or Gemini answer is generated by the assistant, not by you, so you cannot add your own UTM parameters to it. Whether a referrer arrives depends on the product and the client:

  • Web clients often send a referrer such as chatgpt.com or perplexity.ai, which GA4 can read.
  • Mobile apps and in-app browsers frequently strip the referrer, so the visit looks like Direct.
  • UTM tagging by the assistant has been used by some products, and has been inconsistent. In late 2026 several practitioners reported that ChatGPT clicks sometimes arrive without the tag they used to carry. Treat any specific parameter as something to verify in your own data, not as a guarantee.
  • Copy and paste: a person reads an answer, remembers your brand, and later types your URL or searches for your name. That visit is Direct or Organic Search, though the assistant created it.

The consequence is simple: whatever number you report for AI assistant traffic is a lower bound. A recent Russian-language analysis of Yandex Metrica data reached the same conclusion for ChatGPT and Alice clicks, finding that the referrer-based segment could not see visits with a stripped referrer at all. You can trend it, you can compare pages, but you cannot claim it is complete.

Landing pages tell you more than channel totals

AI assistants send people to specific pages: product comparisons, definitions, pricing, how-to articles. The most useful report is therefore landing pages for the AI channel:

  1. Open your custom channel group or the AI Assistant channel.
  2. Add Landing page + query string as a secondary dimension.
  3. Sort by sessions and by key events.

Look for patterns:

  • Which pages get cited repeatedly? These are candidates to refresh and expand.
  • Do those visitors engage, or leave immediately? Compare engagement rate with Organic Search.
  • Do they convert? Even a handful of visits with key events can matter more than hundreds of shallow ones.

Measure the invisible part

Because referrer-based tracking undercounts, add signals that do not depend on it.

Ask people. Add a "How did you hear about us?" field to sign-up or checkout with explicit options such as ChatGPT, Perplexity, "another AI assistant," Google, and a social network. It is crude and surprisingly useful.

Watch Direct landing pages. If an article starts receiving Direct traffic to a deep URL that nobody would type, that is a hint of assistant or app-driven visits. Compare it with the citation checks you run manually.

Check server logs for AI fetchers. Crawler hits are not human visits, but they show which pages assistants are reading. The AI crawler checker guide explains how to verify them. If you use Cloudflare, the AI Crawl Control guide covers its dashboard.

Track brand search. In Search Console, watch branded queries. A rise after you appear in assistant answers can be an indirect signal.

Test citations manually. Pick ten questions your customers ask, run them in the assistants you care about each month, and record whether you are cited. Keep the log; it is your best trend line.

Make your pages easy for assistants to cite

Measurement only helps if there is something to measure. The factors that matter are the ones that matter for search anyway: crawl access for the assistant's search bot, clear answers near the top of the page, original data, and consistent naming. Google states that there are no additional requirements to appear in AI Overviews or AI Mode, and no special markup or AI text files needed. For other assistants, the guide on getting cited by ChatGPT covers the specifics, and the llms.txt SEO analysis explains why a context file is optional rather than a ranking switch.

Setup checklist

  1. Confirm that the default AI Assistant channel appears in Traffic acquisition.
  2. Create a custom channel group with a specific-name regex if you need per-assistant rows or history.
  3. Put the AI channel above Referral in the channel order.
  4. Build an Exploration of landing pages for the AI channel.
  5. Add a self-reported "how did you hear about us" question.
  6. Review the regex and the channel's source list every quarter.
  7. Report AI traffic as a lower bound, and never compare it directly with Organic Search without that caveat.

FAQ

Does GA4 have an AI channel by default?

Yes. Google's default channel group documentation lists an AI Assistant channel for visits from sources like ChatGPT, Gemini, DeepSeek, Copilot, and Grok. It excludes Google's AI Overviews and AI Mode.

Why does my ChatGPT traffic show as Direct?

Because the click did not carry a usable referrer or tag. Mobile apps and in-app browsers often strip it. GA4 cannot attribute those visits to a source.

Can I track clicks from Google AI Overviews separately?

Not in GA4 alone. Google reports AI feature traffic as part of Search in Search Console's Performance report. In GA4, those visits arrive from Google and are not placed in the AI Assistant channel.

Can I add UTM parameters to links inside AI answers?

No, because the assistant generates the link. You can add UTM parameters to links you control, such as links in your own posts and emails, but not to citations.

Will a custom channel group change my historical data?

Google says custom channel groups can be applied to reports retroactively, so you can analyze past periods. Deleting a custom channel group is irreversible and affects reports that use it, so duplicate before you edit.

How often should I update the regex?

Quarterly is a sensible schedule. New assistants appear, and existing ones change domains.

Summary

GA4's default AI Assistant channel is a useful baseline. A custom channel group gives you per-assistant rows and history. Neither can see visits with a stripped referrer, so report AI traffic as a floor, study the landing pages that attract it, and combine analytics with manual citation checks and a simple self-reported question.

Next step

Measure how ready your website is for AI search

The audit checks llms.txt, crawler access, structure, performance, and the other signals that shape AI readiness.

How to track AI traffic in GA4: ChatGPT, Perplexity, Gemini, and Claude — llmsmap.me