ga4-chatgpt-ai-traffic

Installation
SKILL.md

Track Organic Traffic from ChatGPT & AI Search in GA4

By default, GA4 dumps ChatGPT, Perplexity, and Claude clicks into generic Referral (or Direct when links strip referrers), hiding your highest-intent buyers. Use this skill to isolate and benchmark AI organic traffic cleanly.

Step 1: Canonical AI Search Source Regex (2026)

Use this regex for Session source. GA4's matches regex must match the whole value, so the pattern is anchored: it accepts subdomains (chat.deepseek.com) and rejects look-alike domains (notchatgpt.com). Referrer domains arrive in lowercase, but GA4 keeps the case of utm_source / utm_medium, so keep your own UTM tags lowercase (or add the capitalised variants).

^(.*\.)?(chatgpt\.com|chat\.openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|edgeservices\.bing\.com|you\.com|phind\.com|meta\.ai|deepseek\.com|grok\.com)$

Test it against your own source list before saving: every AI row should match and nothing else. Note: ChatGPT automatically appends ?utm_source=chatgpt.com on many outbound citation links—matching Session source captures both UTM-tagged clicks and referrer-only clicks.

Step 2: Create a Custom GA4 Channel Group

  1. Go to GA4 Admin -> Data display -> Channel groups -> Create new channel group (copy Default Channel Group).
  2. Add a new channel named AI Search with two AND conditions:
    • Source matches regex (use the regex above)
    • Medium does not match regex .*(cpc|ppc|paid|display|cpm|affiliate|sponsored).* (the .* on both sides is needed because GA4 matches the whole value)
  3. CRITICAL: Drag AI Search to the top of the channel order list (above Organic Search and Referral); GA4 assigns each session to the first channel that matches, so otherwise Referral claims these sessions and your new channel stays at zero.
Installs
3
First Seen
2 days ago