Search Console & Analytics · FREE SEO UTILITY

GA4 AI Search & Chatbot Referral Traffic RE2 Regex Builder.

Generate an RE2-compliant Session Source regex to segment ChatGPT, Perplexity, Claude, Gemini & Copilot traffic in GA4 and Looker Studio.

14 referral domains matched in RE2
GA4 Session Source RE2 regex
^(?:.*\.)?(?:chatgpt\.com|chat\.openai\.com|openai\.com|perplexity\.ai|claude\.ai|anthropic\.com|gemini\.google\.com|bard\.google\.com|copilot\.microsoft\.com|edgeservices\.bing\.com|meta\.ai|grok\.com|you\.com|phind\.com)$
SQL channel grouping snippet
CASE
  WHEN REGEXP_CONTAINS(LOWER(traffic_source.source), r'^(?:.*\.)?(?:chatgpt\.com|chat\.openai\.com|openai\.com|perplexity\.ai|claude\.ai|anthropic\.com|gemini\.google\.com|bard\.google\.com|copilot\.microsoft\.com|edgeservices\.bing\.com|meta\.ai|grok\.com|you\.com|phind\.com)$') THEN 'AI Search & Assistants'
  ELSE 'Other Channels'
END AS ai_channel_group

How to use this in your SEO workflow

  • GA4 buckets AI assistant referrals under generic Referral traffic unless you group them with a Session Source RE2 pattern.
  • In GA4 Admin -> Data display -> Channel groups, add a custom channel where Session source partially/fully matches regex.
  • Pair your top AI landing pages with the AI Overviews & GEO Readiness Checker to double down on citable page structures.
Analyze organic query opportunities in Search Console Opportunities

Related in-depth SEO guides

SEO Academy