Published by Terminus, the marketing taxonomy governance platform.

The "AI Traffic" Channel in GA4: How to Define It Yourself in 2026

PC

Puru Choudhary

Last updated

Published by Terminus, the marketing taxonomy governance platform.

If you opened GA4 this week, scanned Acquisition reports, and tried to answer “how much traffic are we getting from ChatGPT, Claude, Perplexity, Copilot, and Gemini,” you almost certainly came up empty. AI-driven sessions sit silently inside Referral, Organic Social, or Direct, depending on the tool and the device. This guide walks you through building a custom AI Traffic channel grouping in GA4 with a referrer-hostname regex that catches the real AI tools, then verifying it works. For the broader strategic picture (why AI traffic shows up the way it does, what it looks like at a population level, and what to do about the dark-traffic half), pair this with our companion piece on tracking AI referral traffic.

TL;DR

  • GA4’s default channel grouping does not separate AI assistants from regular Referral or Organic Social, so AI traffic is invisible unless you carve out a custom channel.
  • The fix is a custom channel group in Admin > Data display > Channel groups, ordered above Referral, with a regex that matches the actual referrer hostnames AI tools send.
  • The regex is hostname-only because GA4’s Session source / referrer hostname field stores hostnames, not paths. Path-based entries like bing.com/chat will never match in that field.
  • Do not include openai.com, anthropic.com, or google.com at the root in the regex. They false-positive on API docs, marketing pages, and organic search respectively.
  • Verify with DebugView and a real click from each tool. If your sample of one click does not produce a session whose source matches, your regex is wrong or the tool stripped the referrer.

Why GA4’s default channel grouping misses AI traffic

GA4 sorts every session into one of about a dozen channels using a rules engine that reads session source, session medium, and a handful of campaign signals. The rules are static. Google updates them periodically. On 13 May 2026, Google added a native “AI Assistant” channel to the GA4 Default Channel Group. It auto-classifies AI-assistant referrals (ChatGPT, Gemini, Claude, and others) by reading the referrer header, assigns the medium ai-assistant and the campaign (ai-assistant), and needs no configuration. The rollout is gradual over several weeks and is not retroactive, and sessions that arrive with no referrer still fall to Direct. Useful as it is, the classifier does not cover every vendor that matters in practice, which is why you still want a custom channel group you control.

The result, if you are relying on the default channel grouping today, is that a click from a ChatGPT citation lands in Referral with a source of chatgpt.com, a click from Perplexity lands in Referral with perplexity.ai, a click from Claude lands in Referral with claude.ai, and a click from Copilot can land in Referral or Organic Social depending on path and device. Sessions from native iOS and Android apps of the same tools usually arrive with no referrer at all and end up in Direct.

That hurts in three ways. AI-driven traffic does not look like other Referral traffic: the user has been shown your content as a citation inside a synthesized answer, often after the assistant has summarised it, so the intent shape is closer to Organic Search than to a backlink from a blog. Bucketing it with Referral hides that. The share is also growing fast: even on a small B2B SaaS property, AI Assistant sessions have moved from rounding-error territory to the low single digits as a percentage of traffic over the last year. And the executives asking “what does AI mean for our funnel” are going to keep asking. Pointing to a named channel beats waving at the Direct bucket.

The fix is a custom channel group. GA4 lets you define your own grouping that overrides the default for reporting. You build a rule that matches AI hostnames, place it above Referral so AI sessions get carved out first, and then every report that respects channel groupings (Acquisition, Reports > Engagement > Conversions, Explorations) sees an AI Assistant channel. The rest of this article is the mechanics: which hostnames to match, the regex, where to paste it, how to verify, and the BigQuery equivalent.

What hostname each AI tool actually sends

Before you can write a regex, you need to know what string GA4 actually receives in the session source (or referrer hostname if you are reading it directly). This is the part that gets practitioners stuck. The hostname is not always the marketing domain you would guess, and several tools have legacy hostnames that still appear in real logs.

The table below lists the referrer hostnames you should expect on desktop web clicks from each major AI tool. Mobile app behaviour is noted separately. These match the hostnames used in the companion article on tracking AI referral traffic, so the two pieces stay consistent.

AI toolSurfaceReferrer hostname(s)Notes
ChatGPTDesktop webchatgpt.com, occasionally chat.openai.comOpenAI runs both. The chat.openai.com form is legacy but still appears.
ChatGPTiOS and Android appsUsually no referrerLands as Direct.
ClaudeDesktop webclaude.aiAnthropic’s product domain. Citations are not clicked from anthropic.com.
ClaudeMobile appsUsually no referrerLands as Direct.
PerplexityDesktop webperplexity.ai, sometimes www.perplexity.aiBoth forms appear in real logs.
PerplexityMobile appsUsually no referrerLands as Direct.
GeminiDesktop webgemini.google.com, legacy bard.google.comBehaviour varies between consumer Gemini, Workspace embed, and mobile.
Google AI ModeSearch results pagegoogle.com (organic search hostname)This is Organic Search, not a separate AI surface. Do not bucket it as AI.
CopilotDesktop webcopilot.microsoft.com, legacy bing.com/chatMigrated from Bing Chat. bing.com/chat is path-based and will not match a hostname-only field.
DeepSeekDesktop webdeepseek.comWorth including for international audiences.
GrokDesktop webgrok.com, also x.aixAI’s chat product.
Meta AIDesktop webmeta.aiMeta’s standalone AI surface.
You.comDesktop webyou.comSmaller share, still cited.
PoeDesktop webpoe.comQuora’s multi-model interface.

Two things stand out. AI vendors are not consistent about hostnames, so a regex that matches one variant per vendor will undercount. And several of the “obvious” hostnames you might be tempted to include (openai.com, anthropic.com, google.com) are not actually where AI citation clicks come from. They will pollute your channel with API docs, marketing pages, and organic search respectively.

The regex (copy-paste ready), with each entry explained

Here is the regex to paste into GA4’s custom channel group rule. It is anchored, alternation-based, hostname-only, and intentionally conservative.

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

Why each entry is in there:

  • chatgpt.com and chat.openai.com: the current and legacy ChatGPT consumer hostnames. OpenAI runs both, and the legacy form still appears in real logs.
  • claude.ai: Anthropic’s Claude consumer surface. Citations clicked from the Claude UI carry this referrer.
  • perplexity.ai and www.perplexity.ai: Perplexity serves traffic from both the apex and the www subdomain.
  • gemini.google.com and bard.google.com: the current Gemini hostname and the legacy Bard hostname, which still appears occasionally.
  • copilot.microsoft.com: Microsoft Copilot’s current home after migrating off Bing Chat.
  • deepseek.com, grok.com, x.ai, meta.ai, you.com, poe.com: smaller but real AI chat surfaces. Include them if your audience uses them; drop entries that produce zero sessions in 90 days if you want to keep the rule lean.

The opening ^ and closing $ anchor the regex to the entire hostname value. Without them, a string like chatgpt.com.attacker.example would match. Anchoring keeps it strict.

Notice what is NOT in this regex:

  • openai.com at the root. That domain also hosts API docs, the developer dashboard, and marketing pages. A click from a developer reading the API reference is not an AI assistant referral. The relevant AI clicks come from chatgpt.com or chat.openai.com, both listed.
  • anthropic.com at the root. Anthropic’s corporate site hosts research papers, the blog, and careers pages. Users do not click AI citations from there. They click them from claude.ai.
  • google.com. Tempting because Gemini is a Google product. Wrong because google.com is the hostname for organic search. Matching it would bucket every Google Search session into AI Traffic and destroy your Organic Search numbers. AI Overviews inside Search should stay attributed to Organic Search. Use gemini.google.com and bard.google.com only.
  • bing.com at the root. That is plain Bing Search. The dedicated Copilot surface lives at copilot.microsoft.com.
  • Any path-based entry like bing.com/chat. GA4’s Session source / referrer hostname field stores hostname only. Entries containing a slash cannot match. Path-based classification has to happen against page_referrer via an Exploration or BigQuery.

The UI path: Admin > Data display > Channel groups > Create new channel group

Custom channel groups live in GA4’s Admin area. Here is the path as it stands in 2026.

  1. Open GA4 and click the gear icon at the bottom-left to enter Admin.
  2. Under the property column, click Data display, then Channel groups.
  3. Click Create new channel group in the top right.
  4. Name the group (e.g. AI-aware channel group) and add a description. GA4 clones the Default Channel Group as the starting point.
  5. Click Add new channel at the top of the channels list.
  6. Name the new channel AI Assistant (or AI Traffic if you prefer; pick one and use it consistently).
  7. Under Conditions, add a rule. Dimension: Session source. Match type: matches regex. Paste the regex from the previous section.
  8. Move the new channel to the top of the list, or at least above Referral. Channel groups evaluate top to bottom, first match wins. If AI Assistant sits below Referral, every AI session gets claimed by Referral first and your channel is empty.
  9. Click Save.

The new channel group is now available in any GA4 report that supports a channel-group selector. In Acquisition reports, click the pencil icon at the top right to switch from “Default channel group” to your new group. In Explorations, choose it from the dimension picker.

One operational note. Channel groups affect GA4 reporting but do not retroactively rewrite the underlying event data, and they do not change what gets exported to BigQuery. The BigQuery export captures session_source and page_referrer directly, and your warehouse-side classification logic needs to mirror your GA4-side definition or the two systems will disagree forever.

Verification in DebugView and Real-time reports

Defining the channel is the easy part. Verifying it works is what catches the bugs. The fastest validation is a real click from a real AI tool.

  1. Start a DebugView session. The simplest way is to install the GA Debugger Chrome extension on your test browser, or pass ?debug_mode=true to your site URL if your GA4 implementation respects it. Confirm DebugView shows your test device.
  2. In a separate tab, open ChatGPT (or any other tool from the list) and ask a question that should produce a citation pointing at your site. If your content does not yet get cited organically, prime the model by referencing a specific URL.
  3. Click the citation. Land on your site.
  4. Switch to GA4’s DebugView (Admin > DebugView, or Admin > Data display > DebugView depending on your property’s rollout) and watch the event stream. Find the session_start event and inspect its source and medium. You should see source: chatgpt.com, medium: referral.
  5. Open the Real-time report. Switch the channel-group selector to your new custom group. Confirm a session attributed to AI Assistant appears.

Here is the kind of bug this catches. Run the loop with ChatGPT, Claude, and Perplexity. ChatGPT and Claude produce clean session_start events with the expected source values within seconds. Perplexity, though, can produce a session with source www.perplexity.ai, not perplexity.ai. If your first regex did not include the www subdomain, that session lands in plain Referral instead of your AI channel. The fix is to add www.perplexity.ai to the alternation and re-test. That is exactly the kind of issue you cannot catch without a real click.

If the click does not show up at all, work the checklist: did the AI tool send a referrer at all (inspect the network panel for the Referer header); did the click open in an in-app browser that does not pass referrers; is your GA4 base tag firing; does your regex match the exact hostname the tool actually sent (hostnames are stored lowercase in GA4); did you place the rule above Referral in the channel group.

After a day, pull Acquisition > Traffic acquisition, switched to your custom channel group, for the last 24 hours. AI Assistant should be non-zero. Zero means the regex is too tight or the tag is broken. Unexpectedly large (more than a few percent of total traffic on most B2B properties) means too loose: you have probably included a hostname that also serves non-AI traffic.

BigQuery-side equivalent for warehouse users

If you have shipped GA4’s BigQuery export, you want a warehouse-side definition of AI Traffic that matches the GA4 one. Dashboards built off BigQuery (Looker, Hex, Sigma, Tableau) cannot read GA4’s UI-defined channel groups, so they have to redo the classification. If the BigQuery rule and the GA4 rule disagree, your numbers never reconcile.

Here is the equivalent as a SQL CASE expression you can drop into a dbt model, a scheduled query, or a Looker LookML view.

SELECT
  event_date,
  user_pseudo_id,
  (
    SELECT value.string_value
    FROM UNNEST(event_params)
    WHERE key = 'page_referrer'
  ) AS page_referrer,
  (
    SELECT value.string_value
    FROM UNNEST(event_params)
    WHERE key = 'source'
  ) AS source,
  CASE
    WHEN REGEXP_CONTAINS(
      LOWER((SELECT value.string_value FROM UNNEST(event_params) WHERE key = 'source')),
      r'^(chatgpt\.com|chat\.openai\.com|claude\.ai|perplexity\.ai|www\.perplexity\.ai|gemini\.google\.com|bard\.google\.com|copilot\.microsoft\.com|deepseek\.com|grok\.com|x\.ai|meta\.ai|you\.com|poe\.com)$'
    ) THEN 'AI Assistant'
    -- existing channel logic continues below
    ELSE 'Other'
  END AS channel
FROM `project.dataset.events_*`
WHERE event_name = 'session_start'

A few warehouse-specific notes. The GA4 source event parameter sometimes carries the hostname directly and sometimes carries a UTM value, depending on how the session was attributed. To catch AI traffic that arrived without a UTM (the common case), also inspect page_referrer and extract its hostname with BigQuery’s NET.HOST function:

NET.HOST((SELECT value.string_value FROM UNNEST(event_params) WHERE key = 'page_referrer')) AS referrer_hostname

A defensive query checks both source and the extracted referrer hostname, tagging the session as AI Assistant if either matches. Place the AI Assistant clause at the top of your channel CASE so it fires before any generic Referral catch-all, mirroring the GA4 ordering. And store the regex string in one place (a metric_defs.yml file in your dbt repo, for example) so the warehouse model and the GA4 configuration documentation reference the same source of truth.

Common mistakes (and how to avoid them)

Five mistakes show up over and over again when teams build this channel for the first time.

Matching openai.com at the root. That domain serves API docs, the developer dashboard, marketing pages, and the corporate site. A click from a developer reading the API reference is not an AI assistant referral. Use chatgpt.com and chat.openai.com only.

Matching google.com for Gemini. Tempting and catastrophic. google.com is the hostname for Google organic search. Including it would bucket every organic Google session as AI Traffic and collapse your Organic Search numbers. Use gemini.google.com and bard.google.com only. AI Overviews inside Search should stay attributed to Organic Search.

Matching anthropic.com at the root. Anthropic’s corporate site hosts research papers, the blog, and careers. Users do not click Claude citations from there. They click them from claude.ai.

Path-based entries in a hostname-only field. GA4’s Session source and referrer hostname dimensions store hostname only. An entry like bing.com/chat or gemini.google.com/app will never match. Path-based classification has to happen against page_referrer (which stores full URLs) via an Exploration or BigQuery, not in the channel-group rule.

Forgetting to order the rule above Referral. Channel groups evaluate top to bottom, first match wins. If AI Assistant sits below Referral, every AI session gets claimed by Referral first and your custom channel is empty.

Assuming the native GA4 AI Assistant channel covers everything. Google added the native channel on 13 May 2026 with the medium ai-assistant, but the vendor list is not transparent and not exhaustive. Build the custom channel anyway. It is stable, it includes vendors the native classifier does not (DeepSeek, Grok, Meta AI, Poe, You.com), and it survives quiet vendor-side changes. Treat your custom channel as the source of truth and the native channel as a cross-check.

Frequently asked questions

What is the AI traffic regex for GA4?

A practical 2026 pattern, matched against the session source / referrer hostname dimension in GA4’s channel group rule:

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

It is hostname-only, anchored, and intentionally excludes openai.com, anthropic.com, and google.com at the root because those false-positive on API docs, marketing pages, and organic search respectively.

Does ChatGPT send a referrer?

Sometimes. ChatGPT on desktop web (chatgpt.com) sends a Referer header when a user clicks a citation in browse or search mode. The native iOS and Android apps usually do not send one, and traffic from those clicks lands in GA4 as Direct. Expect to capture a fraction (not all) of true ChatGPT-driven visits via referrer hostname alone. The rest sits in Direct and can only be recovered through other signals (UTM self-tagging on URLs you control, CDN log analysis, or branded-search uplift).

How do I see Claude traffic in GA4?

Add claude.ai to your custom AI Assistant channel group regex. Once the rule is in place and ordered above Referral, sessions originating from Claude citations on the desktop web will be bucketed under AI Assistant in Acquisition reports, Real-time, and any Exploration that uses your custom channel group. Note that Claude mobile app traffic generally lands as Direct because the apps do not pass a referrer.

Where in GA4 do I create a custom channel group?

Admin > Data display > Channel groups > Create new channel group. The Admin gear icon is at the bottom-left of GA4. From the channel group editor, add a new channel called “AI Assistant,” set a Session source matches regex condition with the AI hostname pattern, and move the channel above Referral so it evaluates first.

Why should I not put openai.com in the regex?

Because openai.com hosts API documentation, the developer dashboard, marketing pages, careers, and the corporate site. A click from a developer reading the API reference is not an AI assistant referral. Putting the root domain in your regex would tag those sessions as AI Traffic and inflate the channel with developer doc visits. Use chatgpt.com and chat.openai.com specifically.

Can I match bing.com/chat for Copilot in the channel group?

No. GA4’s Session source and referrer hostname dimensions store hostname only. A regex entry containing a path (a slash and anything after it) can never match in that field. If you specifically need to distinguish legacy Copilot traffic that arrived via the Bing Chat redirect, do that classification in BigQuery against the raw page_referrer URL, or in an Exploration that uses the page_referrer dimension instead of Session source. For the channel group rule itself, rely on copilot.microsoft.com.

Does GA4 already have an AI Assistant channel?

Yes. On 13 May 2026, Google added a native “AI Assistant” channel to the GA4 Default Channel Group. It auto-classifies AI-assistant referrals (ChatGPT, Gemini, Claude, and others) from the referrer header, assigns the medium ai-assistant and the campaign (ai-assistant), and needs no configuration. The rollout is gradual over several weeks and is not retroactive, and no-referrer sessions still fall to Direct. The list of recognised hostnames is not fully documented. Treat the native channel as a useful cross-check, not a substitute for your own custom channel group. The custom group covers more vendors, gives you control over the rule, and survives quiet vendor-side changes.

How accurate will my AI Traffic channel be?

It captures the subset of AI-driven sessions that arrive with a referrer hostname your regex matches. That subset is real and useful, but it is a floor, not a ceiling. AI sessions from mobile apps, in-app browsers, private browsing contexts, or tools that strip referrers land in Direct. To estimate the dark-traffic share, pair the custom channel with branded-search uplift analysis, server-side CDN log inspection, and UTM self-tagging on URLs you publish into AI-targeted surfaces like llms.txt. The companion piece on tracking AI referral traffic covers the full measurement strategy.

How often should I update the regex?

Quarterly. Add new vendors as they become non-trivial in your traffic, and drop entries that have produced zero sessions in 90 days. Re-verify each entry with a real click at least once a year to confirm the vendor still uses that hostname.

Should the channel be called “AI Assistant” or “AI Traffic”?

Either works. Be consistent. “AI Assistant” matches GA4’s native naming. “AI Traffic” is shorter for dashboards. Pick one and use it across the channel group, the BigQuery model, dashboards, and exec decks. Drift between names is a common reconciliation headache.


A clean AI Traffic channel turns an invisible slice of your funnel into a measurable one. The regex above will get you 80% of the way to a defensible number for ChatGPT, Claude, Perplexity, Copilot, Gemini, and the smaller AI surfaces, with a defensible exclusion of the root domains that would otherwise pollute the channel. Pair it with the broader strategy in our AI referral traffic guide, build a quarterly verification loop into your analytics calendar, and treat the custom channel (not the opaque native one) as your source of truth. If you govern your campaign-level UTM taxonomy alongside the channel grouping (a problem Terminus was built for), you also get the second half of the picture: AI sessions that arrived through links you self-tagged, surfaced as a clean utm_source rather than guesswork.

Last updated: 9 July 2026.

Terminus helps you and your team be consistent in UTM tracking

Try Terminus risk-free for 21 days. Cancel anytime with 1 click.