How to Track AI Referral Traffic in GA4 (ChatGPT, Perplexity & More)
Imagine someone asking ChatGPT for suggestions on a WordPress theme, selecting from the options provided, and following your affiliate link to sign up. You’ve just gained a visitor, but can your analytics accurately identify where they originated from?
By default, Google Analytics 4 (GA4) categorises many of these visits as Referral traffic, or even worse, as Direct traffic, which gets mixed in with users who manually entered your URL. In May 2026, Google introduced an AI Assistants channel to help clarify this, but it only covers a portion of the entire traffic spectrum.
This article will guide you through three methods to set up your analytics, from a quick 30-second verification to a permanent custom channel setup, along with an honest assessment of what GA4 may not capture. By the end, you’ll have a more accurate minimum estimate of the traffic coming from ChatGPT, Perplexity, Claude, Copilot, and Gemini.
Let’s get started!
Why AI referral traffic is obscured in GA4
Every visitor to your website carries two identifiers: a source (the exact origin, such as google or chatgpt.com) and a medium (the category of visit, like organic or referral). GA4 utilises these identifiers to channel sessions into various categories that you observe in your acquisition reports.
Visits from AI assistants typically come through as referral traffic, leading to years of being lost among random mentions in the Referral category. However, Google introduced a specific AI Assistants channel on May 13, 2026: if the referrer matches Google’s internal list of AI assistants, GA4 changes the medium to ai-assistant and categorises it appropriately. However, Google does not release the complete list of these sources. Their documentation provides examples including ChatGPT, Gemini, Copilot, DeepSeek, and Grok, while visits from Perplexity and Claude may still end up as regular Referral traffic (check the Session source/medium in your reports to verify your data).
Two additional considerations are crucial. First, clicks from Google’s AI Overviews and AI Mode are classified as Organic Search, not AI Assistants. Second, if someone clicks a link within a mobile application or pastes a URL into a browser, the referrer often disappears, resulting in those sessions appearing as (direct) / (ne), indistinguishable from users who have memorised your website’s address.
Here’s a quick reference chart:
| AI Surface | What GA4 Records | Default Channel |
|---|---|---|
| ChatGPT (web) | chatgpt.com | AI Assistants |
| Perplexity | perplexity.ai | Referral (typically) |
| Claude | claude.ai | Referral (typically) |
| Copilot | copilot.microsoft.com | AI Assistants |
| Gemini (web) | gemini.google.com | AI Assistants |
| Google AI Overviews / AI Mode | Organic Search | |
| Any AI Mobile App | No referrer | Direct |
Moreover, it’s important to note that the new channel does not retroactively apply. Sessions marked before this rollout retain their original labels, so even if ChatGPT has been contributing visitors for years, your AI Assistants section will show no data until May 2026. The solutions below will help you investigate your entire history.
Step 1: Execute a 30-Second AI Traffic Assessment
Before setting up anything, check what you currently track. Navigate to Reports → Acquisition → Traffic acquisition, change the primary dimension to Session source, then select Add filter and configure Session source → matches regex. Input the following regex:
chatgpt\.com|chat\.openai\.com|perplexity\.ai|gemini\.google\.com|copilot\.microsoft\.com|claude\.aiThis single regex pattern matches the referrer domains of the major AI assistants as well as ChatGPT’s previous domain. It works over any date range, as GA4 has always logged the referrer; only the channel label changes. For broader coverage, you can expand the pattern with |grok\.com|deepseek\.com|you\.com|poe\.com to include smaller assistants.
One important note: keep the regex precise. Generic shortcuts like .ai can inadvertently match irrelevant domains. GA4’s custom channel definitions are case-insensitive; however, raw UTM parameters are case-sensitive.
If the filtered report reveals actual sessions, you’ve confirmed activity. If it shows nothing, don’t panic; a significant amount of AI traffic may arrive without a referrer (more on this below).
Step 2: Create a Custom AI Search Channel Group
The quick filter is helpful for immediate checks, but it disappears when you close the report. For a consistent view to complement Organic Search and Referral in all standard reports, establish a custom channel group. You can’t alter the default group, so you will copy it and add an extra channel:
- Go to Admin → Data display → Channel groups.
- Select the menu for the Default Channel Group and click Copy to create new. You might name it something like “AI Search view”.
- Click Add new channel and designate the name AI Search.
- Input two conditions connected by OR: Session source matches regex (insert the same pattern from Step 1), and Session medium exactly matches
ai-assistant. The second condition captures everything from Google’s own list, including any future additions. - Save your work, then click Reorder and position AI Search above Referral. Apply and save again.
That last step is often overlooked and can disrupt the entire setup. GA4 assigns each session to the first applicable rule, and new channels start near the bottom of the list. Therefore, a visit from perplexity.ai would match Referral first, and your newly created channel would show zero activity, even though the rule is technically correct.
PRO TIP: Custom channel groups do not alter your base data and apply to past sessions, allowing you to experiment without consequences. A standard GA4 property permits up to two custom channel groups, each with 50 channels.
Once saved, your group will appear as a dimension in the Traffic acquisition report. Select it from the primary dimension dropdown and AI referrals will be displayed in their own row, allowing you to track their trend over time, making comparisons against other traffic sources easier. For a comprehensive understanding, Google’s custom channel groups documentation is a valuable resource.
Step 3: Discover the Pages Cited by AI Assistants
While volume is great, knowing which of your content pieces attract citations is actionable intelligence. Go to Explore, initiate a free-form exploration, and set it up as follows:
- Rows: Landing page + query string
- Values: Sessions (consider adding Engagement rate and Session key event rate if you monitor conversions)
- Filter: Session source matches regex, use the same pattern from Step 1
The result will be a ranked list of the pages that ChatGPT, Perplexity, and similar platforms are directing users to. These pages often include comparison articles, buying guides, and pages filled with detailed information. This feedback offers crucial insight on what topics to explore next. You can also insert Session source/medium as a second dimension to identify which assistant refers traffic to which page.
The Honest Truth: GA4 Underreports AI Traffic
Now for the sobering reality. No matter what figure your AI channel presents, the actual traffic number is likely higher, for three fundamental reasons:
- No referrer is recorded. Mobile applications, in-app browsers, and copy-paste navigation can omit the referrer, leading these sessions to be logged as
(direct) / (ne). Regex can only match a source that is non-existent. ChatGPT helps mitigate this by appendingutm_source=chatgpt.comto a number of outbound links, which persists through the journey, but does not occur with all links. - Google’s AI answers go unnoticed. Clicks from AI Overviews and AI Mode display a standard Google referrer and are classified as Organic Search. There’s currently no way to separate them within GA4.
- Zero-click responses leave no trace. If a user sees your brand name in an AI response and doesn’t click, that session is simply not logged. The visibility is genuine, but it does not appear in your analytics.
Since these gaps can’t be precisely measured in GA4, regard your AI channel as a minimum, not a total. The upward trend line is more significant than the exact figure.
How to Utilise the Data
Data lacking actionable steps is mere trivia. Here are three ways to leverage your new findings:
- Evaluate quality, not just volume. Compare the engagement rate and significant events for AI Search sessions against Organic and Referral traffic. Visitors coming from AI referrals are predisposed to conversion thanks to their prior recommendations, so even small traffic numbers can yield notable results.
- Enhance frequently cited pages. If a certain comparison article or guide consistently appears in your exploration, consider updating and expanding it, and creating additional related content. If some of these pages are aging, this is also an opportune moment to address content decay before your citations diminish along with their rankings.
- Monitor the trend on a monthly basis. While AI referral traffic is currently minimal for many websites, it is one of the few channels that is growing rapidly. A monthly review is sufficient; daily checks can quickly become a distraction rather than an effective strategy.
If your property was never correctly set up initially, rectify that first: our guide on transitioning WordPress to Google Analytics 4 explains the entire process, and everything discussed above assumes you have a functioning GA4 tag in place.
Conclusion
AI assistants generate genuine traffic, and GA4 has finally begun to recognise this, albeit incompletely. To gain a more comprehensive view:
- Use the regex filter in Traffic acquisition for instant checks.
- Develop a custom AI Search channel group (utilising source regex OR medium
ai-assistant, prioritised above Referral) for a lasting view. - Conduct a free-form exploration to identify the pages cited by AI assistants.
- Consider all figures as a minimum: traffic from apps, AI Overviews, and zero-click responses will not be recorded.
Have you started noticing AI referrals in your analytics reports? If so, which assistant is providing the traffic? Share your experiences in the comments section below!
FREE GUIDE
4 Key Steps to Accelerate Your WordPress Website
Implement the straightforward steps in our four-part mini series to cut your loading times by 50-80%.
Well done! You’ve reached the conclusion of the article!
Share this content:
Discover more from Qureshi
Subscribe to get the latest posts sent to your email.

