Cherry Seed

How do you track AI referral traffic separately from organic search in GA4?

ai-traffic ga4 referral-tracking chatgpt perplexity dark-traffic server-logs

Quick Answer

About 70% of AI-referred traffic shows as Direct in GA4 because AI apps open links without passing referrer headers, making server log analysis essential for accurate measurement. GA4 added a built-in AI Assistants channel group that recognises ChatGPT, Perplexity, and Claude by referral domain, but it only catches the roughly 30% that arrives with a clean referrer string. To separate the rest, you need server-side log analysis that matches known AI IP ranges and user-agent strings against your traffic, then reconciles the gap with GA4's reported numbers.

Full Answer

GA4's AI Assistants channel was a useful first step — it matches known AI referral domains like chat.openai.com and perplexity.ai and groups them into a dedicated channel. The problem is that most AI-referred traffic never carries those referrer headers. Mobile AI apps, in-app browsers, and ChatGPT's desktop client strip referrer data before the page loads, so GA4 files those visits under Direct alongside bookmarks and typed URLs.

Server logs capture what GA4 cannot. Every request hits your web server with a user-agent string and IP address regardless of whether JavaScript tracking executes. Known AI crawlers like GPTBot and ChatGPT-User have documented user-agent strings, and their IP ranges are published. Matching these against your access logs reveals the true volume of AI-origin traffic that GA4 categorises as Direct.

The practical workflow is: export your server logs, filter for known AI user-agents and IP ranges, then compare that count against GA4's AI Assistants channel. The difference is your dark AI traffic — real visitors who arrived through an AI recommendation but are invisible to client-side analytics. For WooCommerce stores, routing events server-side captures these visits at the source, before the browser decides whether to pass a referrer. That makes the traffic visible to both your analytics and your ad platforms, closing the measurement gap that client-side tracking alone cannot reach.

Sources

Programmatic Access

GET https://seresa.io/wp-json/cherry-tree-by-seresa/v1/seeds/1064

Cite This Answer

Cherry Tree by Seresa - https://seresa.io/seed/ai-data-readiness/how-do-you-track-ai-referral-traffic-separately-in-ga4-2026