Updated December 18, 2025
TL;DR: GA4 misattributes most AI-driven traffic to "Direct" or "Referral" by default, making it impossible to measure the ROI of your Answer Engine Optimization efforts. We'll show you how to fix this by creating a Custom Channel Group with specific regex patterns that identify ChatGPT, Perplexity, Claude, and Gemini referrals. You'll get the exact regex code, step-by-step GA4 configuration instructions, and validation methods to start tracking AI traffic today. The setup applies retroactively to historical data, letting you immediately see how AI-referred sessions compare to traditional search.
If you're a VP of Marketing or CMO at a B2B SaaS company, you've probably noticed something strange in your GA4 reports. Your organic search traffic is declining, but your direct traffic is climbing. Your CEO is asking questions. Your board wants answers. And you suspect the truth is buried somewhere in your analytics, invisible.
Here's what's actually happening: Nearly half (48%) of B2B buyers now use AI tools like ChatGPT, Claude, and Perplexity to research software solutions. When they click links from these platforms, GA4 doesn't recognize the source. GA4 dumps this traffic into "Direct" or "Referral," obscuring the impact of your content marketing investment and making it impossible to prove ROI on Answer Engine Optimization.
We'll show you exactly how to configure GA4 to track AI traffic as its own channel. You'll get the specific regex patterns, step-by-step interface navigation, validation methods, and reporting strategies to turn invisible AI traffic into measurable pipeline data.
Why GA4 hides your AI traffic by default (and why it matters)
GA4 expects traffic to arrive through standard search engine referrers like google.com and bing.com, or via UTM-tagged campaigns you control. AI platforms don't fit either pattern.
When someone asks ChatGPT "What's the best project management software for distributed teams?" and clicks your link, one of three things happens in GA4:
Copy-pasted URLs appear as Direct traffic. The majority of ChatGPT users copy URLs from AI responses and paste them into a new browser tab. These sessions show up as "Direct" with no source attribution because ChatGPT and most LLMs do not pass referral data when users copy and paste URLs.
Clicked links get buried in generic Referral. When users do click links from Perplexity or Claude, the traffic arrives with referrer domains like perplexity.ai or claude.ai. GA4's default channel group categorizes these as "Referral" alongside Reddit, industry blogs, and random backlinks. You can't distinguish high-intent AI research from low-value referral traffic.
Partial UTMs create Unassigned traffic. ChatGPT sometimes includes utm_source=chatgpt.com in links but no utm_medium. When a link has utm_source but no utm_medium, GA4 may route the traffic to "Unassigned" with utm_medium showing as "(not set)."
This matters because AI-referred traffic converts differently than traditional search. While conversion rates vary by study, industry research shows AI sessions last 17% longer than organic search. When you can't measure this traffic, you're flying blind on nearly half your total addressable market.
Key terminology for AI analytics:
Before we dive into configuration, here are the GA4 terms you'll encounter:
Session source/medium: The dimension showing where traffic originated (e.g., google/organic, chatgpt.com/referral). We'll use this to identify AI platforms.
Custom Channel Group: A user-defined classification system grouping sessions into categories like "AI Search," "Organic Search," or "Paid Social." Unlike GA4's default channel group, you can edit and reorder these.
Regex (Regular Expression): Pattern-matching syntax that lets you create rules like "matches any domain containing chatgpt.com OR perplexity.ai OR claude.ai." GA4 uses RE2 regex syntax with specific limitations.
AI Overviews: Google's AI-generated answer boxes appearing at the top of search results. Traffic from these shows up as google/organic, making it nearly impossible to separate from traditional search without advanced tracking.
Referrer data: The URL of the previous page that linked to your site. AI platforms sometimes strip or modify this data, which is why tracking fails.
The three ways to track AI traffic in GA4
You have three options for identifying AI-driven sessions in GA4. Each method has different strengths depending on whether you need historical analysis, ongoing reporting, or tracking for specific campaigns.
| Method |
Description |
Pros |
Cons |
Best For |
| Custom Channel Grouping |
Create a permanent "AI Search" channel visible in all standard reports |
Applies retroactively; visible to all users; no ongoing maintenance |
Requires Editor permissions; changes affect property-wide reporting |
VPs and CMOs needing board-ready reports and consistent team dashboards |
| Explorations with Regex |
Build ad-hoc analysis reports using regex filters on Session source |
Private workspace for testing; no risk of breaking shared reports |
Manual setup each time; not in standard reports |
Marketing Ops doing deep-dive analysis or testing patterns before rollout |
| UTM Parameters |
Tag links you control with utm_source=chatgpt&utm_medium=ai_referral |
Works for controlled experiments and owned chatbots |
Only tracks links you manually tag; can't tag organic AI citations |
Testing specific campaigns or tracking custom GPTs you own |
Method 1: Using GA4 Explorations with Regex (Best for deep analysis)
We recommend Explorations when you want to build custom reports without changing your property's global settings. This is useful for validating AI traffic patterns before committing to a permanent channel group.
How it works: Create a Free Form exploration in GA4's Explore section, add "Session source/medium" as a dimension, then apply this regex filter:
^.*(chatgpt\.com|openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com).*
The report shows only AI platform traffic. Save it as a template you can reuse monthly. Our full exploration setup guide covers the detailed interface navigation if you need step-by-step instructions.
Limitation: Explorations are private to your account, though you can share them. If you want your entire marketing team to see AI traffic in their standard reports, use Method 2.
Method 2: Creating a Custom Channel Group (Best for reporting)
This is the permanent solution we recommend for most marketing teams. A Custom Channel Group adds "AI Search" as a channel alongside "Organic Search" and "Referral" in all your standard GA4 reports. The setup applies retroactively to historical data, so you'll immediately see past AI traffic properly categorized.
Critical: GA4 evaluates channel rules top to bottom. If your new "AI Search" channel is positioned below "Referral," all AI traffic will match the Referral rule first and never reach your AI Search rule. You must place AI Search above Referral in the channel list. We'll walk you through the exact positioning in the step-by-step section below.
Method 3: UTM parameters (Best for controlled links)
UTM parameters work for links you control, but you cannot add UTMs to organic AI citations. If you publish content that gets cited by AI platforms organically, this method won't capture that traffic.
When to use UTMs:
- You built a custom GPT that recommends your product
- You're running a paid campaign that might get scraped by AI platforms
- You want to test whether traffic from a specific AI platform converts differently
Recommended UTM structure:
https://yoursite.com/product
Google recommends always setting utm_source, utm_medium, and utm_campaign together. Missing parameters result in "(not set)" values that clutter your reports. Remember that GA4 is case-sensitive, so "AI_Referral" and "ai_referral" will appear as separate rows.
Step-by-step: How to set up your AI Channel Group
We'll walk you through the core configuration that makes AI traffic visible in all your standard GA4 reports.
Before you start: Confirm you have Editor or Administrator permissions at the property level. Viewers and Analysts cannot create or modify channel groups.
Step 1: Navigate to Channel Groups settings
- Click the Admin gear icon in the bottom left corner of GA4
- In the middle "Property" column, scroll to Data display
- Click Channel groups
- You'll see "Default channel group" listed (this cannot be edited per Google's documentation)
- Click Create new channel group
Step 2: Name your channel group
- Enter a name like "Custom channels with AI" or "Marketing channels 2025"
- Click Add new channel to create your first custom channel
Step 3: Configure the AI Search channel
- Channel name: Enter "AI Search" (or "AI Chatbots" if you prefer)
- Under Channel definition, click Add condition group
- Set the first dropdown to Session source
- Set the operator to matches regex (or "matches regex ignore case" if available)
- In the pattern field, paste this regex:
^.*(chatgpt\.com|openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|bard\.google\.com|copilot\.microsoft\.com|edgeservices\.bing\.com).*
This pattern catches ChatGPT (chatgpt.com, openai.com), Perplexity (perplexity.ai), Claude (claude.ai), Gemini (gemini.google.com, bard.google.com), and Microsoft Copilot (copilot.microsoft.com, edgeservices.bing.com). The ^.* and .*$ anchors allow for URL variations.
- Click Save to create the channel
Step 4: Copy remaining default channels
GA4 requires you to define all channels in a custom group, not just your new AI Search channel. The fastest approach: ask your GA4 administrator if your organization already has a custom channel group you can duplicate and modify. If starting from scratch, use Google's official default channel definitions as a reference and replicate each rule.
Step 5: Reorder channels (CRITICAL)
This is where most implementations fail. Channel order determines attribution.
- After saving your channels, click Reorder at the top of the channel list
- Drag AI Search so it appears above the Referral channel
- Your order should look like:
- Direct
- Cross-network
- Paid Search
- Paid Social
- (other paid channels)
- Organic Search
- Email
- Affiliates
- Display
- AI Search ← Your new channel
- Referral ← Must be below AI Search
- (remaining channels)
- Click Apply then Save group
Why this matters: If Referral is listed above AI Search, GA4 will assign AI visits to Referral first because Referral's broad "matches any external domain" rule catches them. Your AI Search rule will never be evaluated.
Step 6: Validate with real data
Don't trust the setup until you've confirmed it works:
- Navigate to Reports > Acquisition > Traffic acquisition
- At the top of the data table, change the dropdown from "Default channel group" to your new custom channel group name
- Look for your "AI Search" channel in the list
- If you see AI Search with 0 sessions and Referral has traffic from chatgpt.com or perplexity.ai, your channel order is wrong. Go back and move AI Search above Referral
For real-time testing, enable GA4 DebugView. Install the Google Tag Assistant Chrome extension, visit your site from a ChatGPT or Perplexity link (or ask a colleague to test), then go to Admin > DebugView in GA4. Watch the events stream in and check that Session source shows the AI platform domain.
We've implemented this exact configuration across 50+ enterprise B2B SaaS properties in our AEO retainers, and this validation process catches 90% of setup errors before they corrupt your reporting.
The "Dark AI" problem: What you still can't track
Even with perfect GA4 configuration, you won't capture all AI-driven traffic. We call this invisible segment "Dark AI" traffic, and understanding its limitations helps you set realistic expectations.
Copy-paste and mobile app behavior: The majority of ChatGPT users copy URLs and paste them into new tabs, showing up as "Direct" traffic with no referrer data. Mobile apps compound this problem because links open in webviews that suppress referrer headers.
AI summarization and privacy settings: When ChatGPT synthesizes your content without linking to a source, users never click through. Browsers with aggressive tracking protection like Brave and Firefox may also strip referrer data regardless of source.
The AI traffic you measure in GA4 represents a minimum baseline, not the total AI-driven audience.
This is exactly why we built our proprietary AI visibility auditing infrastructure. We track whether your brand gets cited by ChatGPT, Claude, and Perplexity for specific buyer queries, regardless of whether users click through. That citation data combined with GA4 click-through data gives you the complete picture of AI-driven pipeline contribution that your board actually cares about.
How to analyze the data and report to your board
Raw session counts don't tell the story your CEO and board need to hear. They care about qualified pipeline and revenue contribution. Here's how we recommend extracting business value from AI traffic data.
Move beyond vanity metrics. Don't lead with "We got 487 AI Search sessions this quarter." Start with business outcomes: "AI-referred traffic drove 23 qualified leads at a 31% SQL conversion rate, compared to 19% from traditional organic search."
Focus on these metrics in your Traffic Acquisition report:
- Engaged sessions: GA4's proxy for quality visits (≥10 seconds, 2+ page views, or a conversion). AI traffic often shows higher engagement because users arrive with specific intent.
- Average session duration: Benchmark AI traffic against Organic Search and Referral. Research shows visitors from AI platforms spend significantly more time on sites than those from organic search.
- Key Events (conversions): Filter for events like "form_submit," "trial_signup," or "demo_request." Calculate conversion rate (Key Events ÷ Sessions) for AI Search vs. other channels.
- Revenue: If you have ecommerce tracking or CRM integration, attribute revenue directly to the AI Search channel.
Build a monthly AI visibility dashboard that includes:
- AI Search sessions: Month-over-month trend
- AI Search MQLs: Qualified leads attributed to AI channel (requires CRM integration)
- AI Search SQL conversion rate: Percentage of AI-referred MQLs that become Sales Qualified Leads
- Share of voice: Your brand's citation frequency vs. top 3 competitors (requires external AI monitoring tool)
Competitive benchmarking context: Current B2B SaaS data shows AI traffic represents 0.3% of total traffic but is growing at 45% month-over-month. If your AI Search channel shows 2-5% of total sessions, you're outperforming the market average.
Frame your board presentation around "closing the visibility gap." Show them the competitive benchmark (competitors cited in 42% of queries, you're at 8%), translate that 34-point gap into lost pipeline dollars, then present your AEO roadmap with early wins from AI Search traffic data.
Frequently asked questions about AI tracking
Does GA4 automatically filter out AI bot traffic?
Yes. GA4 automatically excludes traffic from known bots using the IAB (Interactive Advertising Bureau) list. However, this only tracks clicks from human users engaging within AI platforms, not the AI crawlers themselves. If sessions average under 5 seconds with 0-1 page views and no conversions, you may have bot contamination. Use GA4's DebugView to inspect individual sessions.
Can I track traffic from Google AI Overviews separately?
No, not with standard GA4 tracking. Traffic from AI Overviews shows up as google/organic because users click directly from Google search results. You cannot distinguish it from traditional search traffic without specialized monitoring tools that track your citation frequency in AI Overviews separately from click-through data.
How do I get more traffic from ChatGPT in the first place?
Tracking is step one. Getting cited is step two. AI platforms prioritize content with clear structure, third-party validation, and factual grounding. We developed the CITABLE framework specifically to engineer content for LLM retrieval: Clear entity & structure, Intent architecture, Third-party validation, Answer grounding, Block-structured for RAG, Latest & consistent data, and Entity graph & schema markup.
Can I track citations in AI platforms even if users don't click?
Not with GA4 alone. You need specialized monitoring tools that query AI platforms programmatically. We built our own AI visibility tracking infrastructure that measures your citation frequency and share-of-voice across ChatGPT, Claude, Perplexity, and Google AI Overviews, giving you metrics you can't get from web analytics alone.
Take the next step: Stop guessing, start measuring
You now have the exact configuration to make AI traffic visible in GA4. The setup will immediately clarify where that mysterious "Direct" traffic is actually coming from and give you the data to prove the ROI of your content marketing investment.
But tracking is only half the battle. If you're getting cited in only 5% of buyer-intent queries while competitors dominate the other 95%, you need a strategy to close that gap.
You now have the data infrastructure to prove AI traffic ROI to your CEO and board. But if your competitive AI visibility audit shows you're cited in only 5% of buyer-intent queries while competitors own the other 95%, you need a strategy to close that gap before your next board meeting.
We don't just track AI visibility at Discovered Labs. We engineer it. Our CITABLE framework has helped B2B SaaS companies go from invisible in AI search to consistently cited across ChatGPT, Perplexity, and Claude. We combine daily content production, third-party validation campaigns, and proprietary tracking infrastructure to deliver measurable pipeline impact with month-to-month terms and no long-term contracts.
Get your free AI Visibility Audit and see the competitive gap before your board asks about it.
Key terminology for AI analytics
AI Search / AI Chatbots: A custom channel category you create in GA4 to group traffic from ChatGPT, Claude, Perplexity, and similar platforms. Not a default GA4 channel.
Regex (Regular Expression): Pattern-matching syntax used to identify multiple domains with one rule. Example: chatgpt\.com|perplexity\.ai matches both domains.
Session source/medium: The GA4 dimension showing traffic origin. Format is typically "source / medium" like "chatgpt.com / referral" or "google / organic."
Custom Channel Group: A user-defined traffic classification system in GA4 that groups sessions into categories. Applies retroactively to historical data and is visible property-wide.
Engaged session: A GA4 metric representing quality visits that lasted ≥10 seconds, had ≥2 page views, or triggered a conversion event. Better than raw session counts for measuring traffic value.
Dark AI traffic: Sessions from AI platforms that arrive without referrer data (typically copy-pasted URLs), making them impossible to identify in GA4. Shows up as "Direct" traffic.
Referrer data: The URL of the previous page that linked to your site. AI platforms often strip or modify this data, causing attribution failures.
AI Overviews: Google's AI-generated answer boxes at the top of search results. Traffic from these shows as google/organic, making it indistinguishable from traditional search.
UTM parameters: Custom tags added to URLs (utm_source, utm_medium, utm_campaign) that explicitly identify traffic sources. Only works for links you control, not organic citations.
DebugView: GA4's real-time diagnostic tool for testing tracking configurations before they affect live reports. Access via Admin > DebugView.