Most analytics tools miss or misclassify AI referral traffic by default. This step-by-step guide shows you how to properly track visits from ChatGPT, Perplexity, Claude, Gemini, and other AI platforms in GA4, Plausible, and Matomo.
Other Articles
How to Measure GEO ROI and Track AI revenue from LLMs (ChatGPT, Claude, Gemini…)
Every AI search dashboard shows citations. Almost none show revenue. This handbook gives you the three-layer framework, a maturity matrix, a 20-point audit, and the CFO conversation framework to fix that.
How to Rank on ChatGPT: 7 easy Steps
The complete data-driven playbook for earning ChatGPT citations. Technical setup, content structure, authority signals, and monitoring strategies backed by 184K+ query analysis.
AI referral traffic is up 357% year-over-year.
In June 2025, over 1.13 billion website visits were attributed to AI sources, with ChatGPT driving more than 80% of identifiable AI referrals.
Yet most analytics installations significantly undercount this traffic because they were designed for a pre-AI web.
The problem is threefold:
chatgpt.com or chat.openai.com. GA4, Plausible, and Matomo do not automatically categorise these as a meaningful traffic source. The visit gets buried in a generic "referral" bucket.The net result: you are almost certainly receiving more AI-referred traffic than your reports show. This guide walks through the exact configuration for GA4, Plausible, and Matomo to fix that.
Before configuring tracking, here is a comprehensive reference of AI platform referral signatures.
AI Platform | Referral Domains | Notes |
ChatGPT | `chatgpt.com`, `chat.openai.com` | Both domains active; legacy domain still common |
Perplexity | `perplexity.ai`, `www.perplexity.ai` | Clean referral headers, most reliable |
Google Gemini | `gemini.google.com` | May be confused with other Google properties |
Google AI Overviews |
Some AI platforms have identifiable user agent strings for their crawlers:
Update (May 2026): GA4 now has a native AI Assistant channel.
On May 13, 2026, Google added an AI Assistant channel to GA4's Default Channel Group.
When GA4 detects a referrer it recognises as an AI assistant, it automatically sets the medium to ai-assistant, groups the session under the AI Assistant channel, and tags the campaign as (ai-assistant) — no configuration required.
It rolled out gradually and reached most properties around early June 2026.
![]()
It's a real convenience, but treat it as a floor, not a ceiling:
A partial, shifting platform list. At launch Google named ChatGPT, Gemini, and Claude; its current channel-definition page lists ChatGPT, Gemini, DeepSeek, Copilot, and Grok (Claude has dropped off the live definition). Google hasn't published a complete list, so verify it against Google's help page before you report it.
Perplexity is the gap to watch. Perplexity isn't named in Google's official AI Assistant definition, so its visits still appear to land in Referral — even though some third-party trackers report it as covered. Until Google confirms it, treat Perplexity as uncovered and catch it with a custom perplexity.ai rule.
No AI Overviews or AI Mode. Google's own AI surfaces are counted as Organic Search, not AI Assistant.
Not retroactive. The channel only counts forward from May 13, 2026. Earlier AI traffic stays buried in Referral and Direct, so native year-over-year comparisons won't work.
Referrer-only. Sessions that arrive without a referrer still fall into Direct.
So the native channel is the clean forward signal — but the custom channel group below is still worth building.
A custom group applies retroactively to your entire history and catches the platforms Google's list leaves out (Perplexity chief among them). The steps that follow set that up.
GA4 requires the most configuration. Here is the step-by-step process.
See your mentions across ChatGPT, Claude and Perplexity in real time, the moment buyers ask.
Within your "AI Referral" channel, click Add condition and configure:
Dimension: Source
Match type: matches regex
Regex pattern:
chatgpt\.com|chat\.openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|deepseek\.com|chat\.deepseek\.com|grok\.com|chat\.mistral\.ai|mistral\.ai|meta\.ai|phind\.com|you\.com|poe\.com
Update this regex as new platforms emerge.
Drag the AI Referral channel above the Referral channel in the priority list. This ensures AI traffic is categorised correctly before falling through to the generic referral bucket.
This audience can be used in Google Ads for remarketing and in GA4 for comparison reports.
Google AI Overview clicks appear with the same referral domain (google.com) as standard organic search.
There is no reliable way to separate them using referral data alone.
See your mentions across ChatGPT, Claude and Perplexity in real time, the moment buyers ask.
Create a Visit dimension named "AI Source Platform" and use this tracking code:
// In your tracking code
var ref = document.referrer.toLowerCase();
var aiSources = {
'chatgpt.com': 'ChatGPT',
'chat.openai.com': 'ChatGPT',
'perplexity.ai': 'Perplexity',
'claude.ai': 'Claude',
'gemini.google.com': 'Gemini',
'copilot.microsoft.com': 'Copilot',
'deepseek.com': 'DeepSeek',
'chat.deepseek.com': 'DeepSeek',
'grok.com': 'Grok',
'chat.mistral.ai': 'Mistral',
'meta.ai': 'Meta AI',
'phind.com': 'Phind',
'you.com': 'You.com'
};
for (var domain in aiSources) {
if (ref.indexOf(domain) !== -1) {
_paq.push(['setCustomDimension', 1, aiSources[domain]]);
break;
}
}
Replace 1 with your custom dimension ID.
You cannot control how AI models link to your site organically, but you can use UTM parameters where you control the link.
Content you create that AI models may cite:
https://yourdomain.com/product?utm_source=blog&utm_medium=content&utm_campaign=ai-citation
AI platform advertising (e.g., Perplexity sponsored results):
https://yourdomain.com/landing?utm_source=perplexity&utm_medium=sponsored&utm_campaign=q1-2026
Track your mentions across ChatGPT, Claude, Perplexity and all major AI platforms. Join 1,500+ brands monitoring their AI presence in real-time.
Free trial • No credit card required • Complete platform access
Hard to separate from standard Google organic |
Claude | `claude.ai` | Referrals from artifact links and conversation links |
Microsoft Copilot | `copilot.microsoft.com`, `bing.com/chat` | Can be confused with Bing organic |
Grok | `grok.com`, `x.com/i/grok` | May be classified as X/Twitter referral |
DeepSeek | `chat.deepseek.com`, `deepseek.com` | Growing presence |
Mistral | `chat.mistral.ai`, `mistral.ai` | Smaller but growing |
Meta AI | `meta.ai`, `facebook.com/ai` | May be classified as Facebook referral |
Phind | `phind.com` | Developer-focused |
You.com | `you.com` | AI search engine |
Bot | User Agent Contains | Purpose |
ChatGPT Plugin | `ChatGPT-User` | ChatGPT browsing feature |
Perplexity Bot | `PerplexityBot` | Perplexity indexing |
Google Extended | `Google-Extended` | Gemini training data |
Anthropic | `ClaudeBot`, `anthropic-ai` | Claude training/browsing |
GPTBot | `GPTBot` | OpenAI training data |
Workarounds:
Landing page analysis. AI Overview clicks often land on pages ranking for long-tail, question-based queries. Analyse landing page patterns to estimate.
Google Search Console. GSC now shows some AI Overview impression data. Cross-reference with GA4.
Third-party tools. Platforms like Qwairy specifically track AI Overview visibility.
Plausible is a privacy-focused analytics platform. Its approach differs from GA4.
Navigate to your dashboard and check Top Sources > All. Look for chatgpt.com, perplexity.ai, claude.ai, gemini.google.com, and other AI domains from the reference table.
In the dashboard filter bar, click Filter > Source > is and enter each AI domain separated by pipe |:
chatgpt.com|chat.openai.com|perplexity.ai|claude.ai|gemini.google.com|copilot.microsoft.com|deepseek.com|grok.com|chat.mistral.ai|meta.ai|phind.com|you.com
Bookmark this filtered view for quick access.
Add this script after the Plausible tracking script:
// Detect AI referral and fire custom event
(function() {
var ref = document.referrer.toLowerCase();
var aiDomains = [
'chatgpt.com', 'chat.openai.com', 'perplexity.ai',
'claude.ai', 'gemini.google.com', 'copilot.microsoft.com',
'deepseek.com', 'chat.deepseek.com', 'grok.com',
'chat.mistral.ai', 'meta.ai', 'phind.com', 'you.com'
];
var isAI = aiDomains.some(function(domain) {
return ref.indexOf(domain) !== -1;
});
if (isAI) {
// Fire Plausible custom event
plausible('AI Referral Visit', {
props: {
source: ref.split('/')[2] || 'unknown'
}
});
}
})();
AI Referral Visit as the event nameNow you can track AI referral visits as a goal with conversion rates in your dashboard.
# Example: Get AI referral traffic for the last 30 days
curl "https://plausible.io/api/v1/stats/breakdown?\
site_id=yourdomain.com&\
period=30d&\
property=visit:source&\
filters=visit:source==chatgpt.com|chat.openai.com|perplexity.ai|claude.ai" \
-H "Authorization: Bearer YOUR_API_KEY"
Schedule this API call weekly to build a time series of AI traffic trends.
Matomo offers robust customisation for AI traffic tracking.
chatgpt.comchat.openai.comperplexity.aiclaude.aigemini.google.comcopilot.microsoft.comdeepseek.comgrok.comchat.mistral.aimeta.aiphind.comyou.comApply this segment to any Matomo report to see only AI-referred traffic.
Edit config/config.ini.php:
[Tracker]
search_keyword_parameters = "q,query,search,keyword,term,text"
[SearchEngines]
chatgpt.com[] = "ChatGPT"
chatgpt.com[] = "prompt"
chat.openai.com[] = "ChatGPT"
chat.openai.com[] = "prompt"
perplexity.ai[] = "Perplexity"
perplexity.ai[] = "q"
Note: Some analysts prefer keeping AI platforms as referrals rather than search engines to maintain clear separation. Choose based on your reporting preferences.
Create a new dashboard named "AI Traffic Dashboard" and add these widgets with the AI segment applied:
Visitors Over Time
Referrers > Websites
Actions > Entry Pages
Visitors > Devices
Goals > Overview
Parameter | Convention | Examples |
utm_source | AI platform name (lowercase) | `chatgpt`, `perplexity`, `claude`, `gemini` |
utm_medium | Traffic type | `ai-referral`, `ai-sponsored`, `ai-citation` |
utm_campaign | Campaign or content identifier | `q1-2026`, `geo-guide`, `product-launch` |
utm_content | Specific content variant | `cta-top`, `inline-link`, `comparison-table` |
New AI platforms emerge regularly. DeepSeek went from obscurity to 125 million MAU in months. Set a quarterly reminder to review and update your AI referral domain list.
If you configure AI platforms as search engines in Matomo, make sure they are excluded from organic search reports to avoid double-counting.
AI platform mobile apps may send different referral headers than their web versions. Test and verify your configuration captures both web and app referrals.
A significant portion of AI-influenced visits will never be trackable as AI referrals. Users who read an AI response and then type your URL directly, or search for your brand on Google after seeing it recommended, appear as direct or branded organic traffic. To estimate dark AI traffic:
Monitor branded search volume trends (increases may correlate with AI visibility)
Track direct traffic anomalies that coincide with AI citation spikes
Use AI visibility monitoring tools to correlate citation frequency with traffic patterns
Analytics tells you how much AI traffic you receive. AI monitoring tools like Qwairy tell you why (which queries, which platforms, what context). Connecting these two data sources gives you the complete picture. Use Qwairy to monitor which AI platforms cite your brand and for which queries, then correlate with your analytics to understand the full attribution path from AI citation to website visit to conversion.
Everything above works.
It also takes real effort: six steps in GA4, a custom script and API calls in Plausible, segments and a config.ini.php edit in Matomo — and a recurring reminder to update your regex every quarter as new platforms launch.
Qwairy does the whole thing for you — and AI referral tracking is included on every plan, not gated behind a higher tier.
![]()
Connect your Google Analytics property once, and Qwairy:
Detects AI referrers automatically across ChatGPT, Perplexity, Claude, Gemini, Copilot, Grok, Google AI Overview, AI Mode, Mistral, DeepSeek and more. No regex to write, no channel group to build, no priority to reorder.
Adds new AI sources as they launch, so your tracking never goes stale and you can drop the quarterly maintenance reminder.
Estimates dark traffic — the visits that land as "direct" because the referrer was stripped — instead of leaving that 30-50% invisible.
Benchmarks AI traffic quality against your other channels: engagement, conversion, and the revenue each channel actually drives.
![]()
That last step is the one most tools skip.
Almost every AI search dashboard stops at citations.
Qwairy ties those citations to conversions and revenue, so you can prove what your AI visibility is actually worth — not just that you're being mentioned.
![]()
The manual setup above is the right call if you want full control inside your own analytics stack. If you'd rather skip the configuration and the maintenance — and connect AI citations to the revenue they generate, not just the traffic — Qwairy does it out of the box, on every plan.