Sub topic 6
Creating an AI Assistants channel group
Assume you know the GA4 interface, referrers, and UTM parameters. You also need Editor access to create a channel group. This chapter uses session-level attribution, so the examples measure visits that began from an AI assistant.
Why create a custom channel group?
GA4's default channel group does not normally include an “AI Assistants” channel. A visit from ChatGPT might therefore appear as Referral. A visit without a referrer might appear as Direct or Unassigned.
A custom channel group adds your own classification without changing GA4's standard channel group. Create a channel named AI Assistants, then add rules that match known assistant domains.
The order of rules matters. GA4 evaluates rules from top to bottom and uses the first matching rule. Place the AI rule above a broad Referral rule. Otherwise, the visit may be classified as Referral before GA4 reaches your AI rule.
Build the channel group
In your GA4 property, open the administration area and find Data display > Channel groups. Create a new custom channel group and give it a clear name, such as AI Assistants.
Add a channel called AI Assistants. For the first rule, use a source dimension and a regular expression. A regular expression, or regex, is a pattern that matches several possible text values.
Use a pattern like this when the source contains the assistant's hostname:
.*(chatgpt\.com|chat\.openai\.com|gemini\.google\.com|perplexity\.ai|copilot\.microsoft\.com|claude\.ai).*Configure the rule so that Source matches regex. Include both the current and legacy hostnames that you observe in your property. Do not add every domain that merely contains the word “AI”. A narrow list reduces false matches.
Then place the channel before broad channels such as Referral. Your rule sequence might look like this:
| Order | Channel | Example condition |
|---|---|---|
| 1 | AI Assistants | Source matches the assistant-domain regex |
| 2 | Paid Search | Medium equals `cpc` |
| 3 | Referral | Medium equals `referral` |
| 4 | Direct | Source and medium are `(direct)` and `(none)` |
The exact default rules in your property may differ. Review the generated order before saving.
Choose the right source signal
Use source when the assistant sends a detectable referrer. Use medium or campaign values when your links contain UTM parameters. For example, a link with utm_source=chatgpt may be classified using the source dimension, depending on how GA4 processes the campaign parameters.
Do not mix session and first-user dimensions in one analysis. Session source describes the source that started the current session. First user source describes how GA4 first acquired the user. For reporting on visits from an assistant, use the session-scoped custom channel group.
A custom channel group changes how reports classify matching data. It does not recover visits for which the browser sent no referrer and no identifying UTM values.
> callout note > Keep a record of the domains and UTM values used in your rules. Assistant domains and link behavior can change, so review the list when new sources appear as Referral or Direct.
Apply the group in a report
Open a report or exploration that supports channel-group dimensions. Select the session custom channel group as the dimension, then add:
- Sessions
- Engaged sessions
- Engagement rate
- Key events or conversions
- Landing page
Compare AI Assistants with Referral and Organic Search. A small number of sessions can still matter if the engagement rate or conversion rate is high. Avoid judging the channel from sessions alone.
Exercise
Why must the AI Assistants rule appear above a general Referral rule?
Show answer
GA4 evaluates channel rules in order and assigns the first matching channel. If Referral matches first, the visit will not reach the AI Assistants rule.