Step by step
- Open Admin → Data display → Channel groups and create a new channel group (copy the default one).
- Add a channel called AI assistants with the condition Source matches regex, and paste this pattern:
chatgpt\.com|openai|perplexity|claude\.ai|gemini\.google|copilot\.microsoft|you\.com|deepseek - Move the channel above Referral, so it is checked first, and save.
- Use it in Traffic acquisition by switching the primary dimension to your new channel group. It also applies to past data.
What GA4 still misses
- AI apps that open links without a referrer show as Direct.
- In the EU, visitors who decline cookies are missing or modelled.
- AI crawlers that read your pages don’t run JavaScript, so GA4 never sees them.
An easier way
Okidoki groups AI assistants as a source by itself, counts visitors who decline cookies too, and has a report of AI crawlers. See how to see traffic from AI assistants.