In this article
This is a follow-up to part 1 of this series, about how AI models search and select sources. I briefly mentioned there that Google Analytics doesn't capture AI traffic well enough on its own, and here I'll walk you through how to actually fix it.
The problem with AI traffic in GA4, in brief
When someone clicks a link inside a ChatGPT or Perplexity answer and lands on your website, it should theoretically count as traffic in GA4. In practice, two things happen that ruin the measurement.
Firstly, Google added a dedicated "AI Assistant" channel in GA4 in May 2026. It automatically captures visits from services like ChatGPT, Gemini, Copilot, DeepSeek, and Grok. But Perplexity isn't on that list and still ends up in the regular "Referral" channel.
Secondly, and this is the bigger problem, between 35 and 70 per cent of all AI referral traffic arrives without any referrer information at all.
ChatGPT only started adding utm_source=chatgpt.com to links from its desktop version in June 2025. The mobile app, and anything cited before that date, still provides no referrer information.
This is worth clarifying, as it's not as well-known as it should be. Many assume that traffic GA4 can't place ends up in “Unassigned”, a sort of “we don't know” bucket. But “Direct” and “Unassigned” are two different mechanisms in GA4:
- Unassigned occurs when data exists but doesn't match any of the channel rules, typically from a faulty UTM setup.
- Direct is a precise technical state where the source is set to “direct” and the medium to “(none)”, which is exactly what happens when a browser sends no referrer header at all.
This is precisely the situation with much of the AI traffic, especially links opened in an app, copied and pasted into a new tab, or sent from an in-app browser that deliberately strips referrer data.

In short, the built-in solution only partially covers you. For a complete picture, you also need a custom channel group.
Step 1: Check what GA4 already captures
Go to Reports, then Acquisition, then Traffic acquisition. Set the primary dimension to "Session default channel group". If you've had AI traffic since the built-in channel was launched, "AI Assistant" will appear as a separate row.
This gives you a starting point, but remember that it doesn't include Perplexity, and it doesn't include sessions that have lost their referrer information.
Step 2: Build a custom GA4 channel group for AI traffic
Go to Admin, then Data Settings, then Channel Groups. Create a new custom channel group.
Add a rule based on the session source, using a regular expression that captures the domains of the major AI tools. Something along these lines is a good starting point:
chatgpt\.com|chat\.openai\.com|gemini\.google\.com|perplexity\.ai|copilot\.microsoft\.com|claude\.ai
This captures Perplexity, which the built-in channel doesn't cover, in addition to giving you an independent check on the others.
Step 3: Capture what GA4 files as Direct
This is harder to solve completely, but you can mitigate the problem.
If you have the opportunity, request that links shared through your own channels or partners always use UTM parameters.
For your own part, if you have content you know is being cited by AI tools, you can't force referrer information from the outside. However, you can use a hidden form field on contact forms and landing pages that asks “how did you find us?”, and then manually map the answers to AI sources afterwards. It's not elegant, but it gives you a point of comparison against what GA4 reports automatically.

Step 4: Build a custom exploration report in GA4
Go to Explore, and create a new free-form report. Add the dimensions Session source, Session medium, Landing page, Country, and Device category. Add the metrics Sessions, Engaged sessions, Conversions, and Revenue.
Apply a filter to include only sessions where the source matches openai, chatgpt, gemini, perplexity, or copilot. Save the report. This will become your fixed overview of how your AI traffic is actually performing, regardless of how it's categorised in the standard reports.
Step 5: Check the server logs GA4 never sees
What's described above captures humans who click through from an AI answer to your site. It doesn't capture anything that happens when the model itself fetches information from your site to answer a question, without any human clicking anything.
It doesn't show up in Google Analytics at all. It appears as bot traffic in your raw server logs, under user agents like OAI-SearchBot, Claude-SearchBot, PerplexityBot, and similar ones. These build the index the model actually searches in when someone asks a question, and are therefore closer to the citation pipeline than anything GA4 can show you.
Check if your hosting provider gives you access to raw server logs. A simple filter on these user-agent strings will tell you if and how often these bots are visiting your pages. It still doesn't guarantee you'll be cited in an actual answer, only that your page is part of the candidate set. If you're in control of your robots.txt and llms.txt, this is also where you'll see if your rules are actually being respected.
What the GA4 setup does not solve
Be honest with yourself that none of this gives you a complete picture. Even with all this in place, a significant portion of actual AI traffic will remain invisible to you, simply because referrer information doesn't exist for a large percentage of sessions. This is, as many have pointed out, an industry-wide measurement challenge with no perfect solution in 2026.
The goal of the setup above isn't perfect measurement. It's to go from measuring nothing to measuring something.
That gives you a consistent basis for comparison over time, even if the absolute number will always be an underestimate.
If you want the full picture, specifically how AI models search and select sources in the first place, and what that means for your priorities, you can read part 1 of this series. And if the GA4 setup above isn't enough and you're considering buying a dedicated visibility tool as well, I've written part 4, a separate review of the most common tools on the market, including my own experiences with them.





