How to Track ChatGPT and AI Traffic in GA4 (Setup + Regex)
Google Analytics Help documents a default channel group that includes an AI Assistant channel (medium exactly “ai-assistant”) and lets you build custom channel groups from rules on fields such as source and medium. The traffic-source dimensions page we opened does not describe how source or medium are set when no tagging is present, so it does not document referrer-based attribution.
Verified against the sources on 2026-10-23. Labels: Proven means the primary source we opened states it. Practice means widely used practice or secondary reporting that the primary source does not confirm. Experimental means a proposal or draft.
What does the default channel group say about AI traffic?
- Proven The page lists an AI Assistant channel for visitors from sources like ChatGPT, Gemini, Deepseek, Copilot or Grok (excluding Google’s AI Overviews and AI Mode), excluding Google’s AI Overviews and AI Mode, with the rule that medium exactly matches “ai-assistant”.
- Proven The page says Organic Search includes Google’s AI Overviews and AI Mode.
- Proven The page defines Referral as non-ad links on other sites or apps, with medium “referral”, “app” or “link”.
- Proven The page says the default channel group cannot be edited, definitions are not case sensitive and may change over time, and traffic matching no rule is Unassigned.
How are source and medium collected?
- Proven The traffic-source dimensions page describes source as where traffic comes from and medium as how users arrive.
- Proven It describes manual tagging with UTM parameters (for example utm_source and utm_medium) and auto-tagging through ad-platform integrations.
- Proven It says missing UTM parameters produce “(not set)” values.
How do custom channel groups work?
- Proven The Help page says each channel has a name and conditions such as exact match or regex, and traffic goes to the first channel it matches, so order matters.
- Proven It says standard properties get 2 custom groups and 360 properties get 5, with up to 50 channels per group.
- Proven It lists supported fields including source, medium, source platform and campaign name, and says groups can apply to existing reports retroactively.
- Proven It says custom channel groups are not available in the BigQuery Export Schema or the Key events paths report.
How do you set up an AI assistants channel in GA4?
GA4’s default channel group already has an AI Assistant channel, but it depends on Google’s own list of assistants, which Google does not publish. A custom channel group lets you choose the sources yourself.
- Practice In GA4, open Admin, then Data display, then Channel groups.
- Practice Copy the default channel group to create a new one, so the existing channels stay in place.
- Practice Add a channel named AI assistants and move it above Referral. Proven Google says traffic goes to the first channel it matches, so order matters.
- Practice Set the condition to Source matches regex and paste the pattern below.
- Practice Save, then open the Traffic acquisition report and switch the primary dimension to your new channel group. Proven Google says custom groups can apply to existing reports retroactively.
.*(chatgpt\.com|chat\.openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|deepseek\.com|meta\.ai|grok\.com).*
Practice This domain list is ours, not Google’s. Compare it with the Source values in your own reports and add any assistant you see.
Why do some AI visits still show as direct?
Practice Apps and some assistants open links without sending a referrer, so GA4 has no source to match and records the visit as direct or (not set). None of the Google pages we opened lists which assistants send a referrer.
Related: Search Console basics for site owners and how OpenAI’s crawlers work.
What this page does not cover
- Which AI assistants send a referrer. The default channel group page says the medium is set to ai-assistant when the referrer matches a list of AI assistants, but none of the pages we opened publish that list, so rule-based channels depend on what actually arrives as source and medium.
- Attribution models and lookback windows; the traffic-source page does not cover them.