
To track AI traffic in GA4, start with the built-in AI Assistant channel that Google added to the default channel group in May 2026. Then create a custom channel group with an "AI Referral" channel that matches AI sources such as chatgpt.com, perplexity.ai, gemini.google.com, claude.ai and copilot.microsoft.com, and place it above Referral. That gives you a complete, consistent view of visits, engagement and conversions from AI tools. This guide walks through each step and includes a regex you can copy.
- GA4's native AI Assistant channel works automatically, but it doesn't catch every AI source and it isn't applied to data from before the change.
- A custom channel group with a regex on session source fills the gaps, and you control the list.
- Channel order matters: GA4 assigns a session to the first channel it matches, so your AI channel must sit above Referral.
- Some AI visits arrive without a referrer and land in Direct. No setup can fully recover those, so treat AI numbers as a minimum.
- Track conversions and landing pages, not just sessions. AI visitors often arrive further along in their decision.
Why track AI traffic separately?
Until recently, a visit from ChatGPT or Perplexity looked like any other referral in GA4, mixed in with links from blogs, directories and partner sites. That made it impossible to answer simple questions: Is AI sending us visitors? Which pages do they land on? Do they convert?
Those questions matter more each month. AI answers are reducing clicks from informational Google searches, while assistants are becoming a place where buyers shortlist vendors and products. Measuring AI referrals tells you whether your efforts to get recommended by ChatGPT and other assistants are paying off.
Step 1: Check GA4's built-in AI Assistant channel
On May 13, 2026, Google Analytics added an AI Assistant channel to GA4's Default Channel Group. Sessions from recognized AI chatbot referrers now go there instead of into Referral, with the medium ai-assistant. No configuration is required.
To see it, go to Reports → Acquisition → Traffic acquisition and look for "AI Assistant" in the Session primary channel group column.
The native channel is a good start, but early analyses have flagged limits:
- Google hasn't published the full list of sources it recognizes, and some AI tools may not be included.
- It isn't applied to data from before the change, so year-over-year comparisons are uneven.
- Visits that arrive with no referrer, for example from some desktop and mobile apps, still fall into Direct.
That's why we recommend adding your own channel group alongside it.
Step 2: Create a custom channel group
You'll need the Editor role or higher on the GA4 property.
- Go to Admin → Data display → Channel groups.
- Click Create new channel group. GA4 copies the default channels into it so you can edit them.
- Name it something clear, such as "Channels incl. AI".
- Click Add new channel and name it "AI Referral".
- Set the condition to Source → matches regex, and paste the regex from the next section.
- Save the channel, then use Reorder to move "AI Referral" above Referral (and above the native AI Assistant channel if you want your own definition to take priority).
- Save the channel group.
Custom channel groups can be used as a dimension in standard reports and explorations. GA4 allows a limited number of custom groups per property, so give this one a name your team will recognize.
Step 3: Use this regex for AI sources
Copy this into the "matches regex" field. The .* at each end lets it match subdomains and source values with extra text.
.*(chatgpt\.com|chat\.openai\.com|openai\.com|perplexity\.ai|claude\.ai|anthropic\.com|gemini\.google\.com|bard\.google\.com|copilot\.microsoft\.com|deepseek\.com|grok\.com|x\.ai|meta\.ai|you\.com|chat\.mistral\.ai|phind\.com).*
| AI tool | Source value you'll usually see |
|---|---|
| ChatGPT | chatgpt.com (older visits: chat.openai.com) |
| Perplexity | perplexity.ai |
| Google Gemini | gemini.google.com |
| Claude | claude.ai |
| Microsoft Copilot | copilot.microsoft.com |
| DeepSeek, Grok, Meta AI, Mistral | deepseek.com, grok.com, meta.ai, chat.mistral.ai |
New AI tools appear constantly. Review your Referral report every quarter for unfamiliar AI domains and add them to the pattern.
Note on Google AI Overviews and AI Mode: clicks from these come from google.com and are reported as Organic Search. GA4 can't separate them from ordinary organic clicks. Search Console includes them in its standard Web performance data.
Step 4: Build an AI traffic report
Once the channel exists, create a view your team can check each month:
- Go to Explore → Free form.
- Add dimensions: your custom channel group, Session source, Landing page + query string and Date.
- Add metrics: Sessions, Engaged sessions, Engagement rate, Key events and, for ecommerce, Purchase revenue.
- Filter to the "AI Referral" channel, with Session source as rows and Date (by month) as columns.
The landing page view is the most useful. It shows which pages AI tools are citing and sending people to, so you can improve those pages and create more like them.
Step 5: Track conversions from AI visitors
Traffic volume from AI tools is still small for most sites, often a low single-digit percentage of sessions. What matters is quality. Make sure your important actions are set up as key events (form submissions, demo bookings, calls, purchases), then compare conversion rate and revenue per session for AI Referral against Organic Search and Paid Search.
If you use a CRM, capture the first-touch source on forms so AI-sourced leads can be followed through to closed revenue. It's the clearest way to show the business value of AI visibility, and it fits a revenue-focused marketing strategy.
Step 6: Look beyond GA4
GA4 only sees visits from people who click. To understand the full picture, add two more data sources:
- Server logs or CDN analytics. These show how often AI crawlers such as
OAI-SearchBot,ChatGPT-User,PerplexityBotandClaude-SearchBotrequest your pages, which tells you what AI tools are reading even when nobody clicks. - A prompt-tracking log. Test a fixed set of buyer prompts in ChatGPT, Perplexity, Gemini and Google AI Mode each month and record whether you're mentioned and cited. Visibility usually rises before traffic does.
Common problems and fixes
| Problem | Likely cause | Fix |
|---|---|---|
| AI visits still appear in Referral | AI channel sits below Referral | Reorder channels so AI Referral comes first |
| Numbers seem too low | Referrer stripped by apps or privacy settings | Treat figures as a floor; watch trends and UTM-tagged links |
| A new AI tool is missing | Its domain isn't in your regex | Check Referral quarterly and extend the pattern |
| History doesn't match | Channel changes don't always apply to past data | Annotate the setup date and compare from then on |
Frequently asked questions
Does GA4 track ChatGPT traffic automatically?
Partly. Since May 2026, GA4's default channel group includes an AI Assistant channel that captures visits from recognized AI chatbots such as ChatGPT and Gemini. It misses some sources and visits without a referrer, so a custom channel group gives more complete coverage.
What is the regex for AI traffic in GA4?
A practical pattern is .*(chatgpt\.com|chat\.openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|deepseek\.com|grok\.com|meta\.ai).* applied to Session source with "matches regex". Review and extend it every quarter as new AI tools appear.
Can I see Google AI Overviews traffic in GA4?
No. Clicks from AI Overviews and AI Mode come from google.com and are counted as Organic Search, indistinguishable from regular organic clicks. Search Console includes them in its standard performance data.
Why is some ChatGPT traffic showing as Direct?
Some AI apps and browsers don't pass referrer information when a user clicks a link, so GA4 can't tell where the visit came from and records it as Direct. ChatGPT adds utm_source=chatgpt.com to many links, which helps, but some traffic will always be unattributed.
How much traffic do AI assistants send to websites?
For most sites it's still a small share of total sessions, often a low single-digit percentage, but it's growing and tends to convert well because visitors arrive with a specific need. Check your own AI Referral channel to see the share for your site.
Sources
- Search Engine Journal, Google Analytics adds AI Assistant as a default channel group (May 2026)
- MarTech, GA4 now tracks AI chatbot traffic automatically (2026)
- Google Analytics Help, Custom channel groups in GA4
- OpenAI, Overview of OpenAI crawlers