Back to Blog
AI traffic

How to Track AI-Referred Traffic in Google Analytics 4 (ChatGPT, Perplexity & Gemini)

Asva AI Team
Published: April 10, 2026
Updated: April 9, 2026
8 min read
Share this insight

ChatGPT, Perplexity, Gemini, and Claude are sending real visitors to your website right now. They're clicking links from AI-generated answers, arriving on your product pages, and in many cases converting — but Google Analytics 4 is only showing you a fraction of it.

This guide explains exactly how AI referral traffic works in GA4, how to find it, how to measure its revenue impact, and why the number GA4 shows you is always an undercount.

https://cdn.sanity.io/images/en9d2pb2/production/de333cabeb9c6e85dc37a7eb7723849d4b5c7748-1200x630.png

Want to skip the manual work? The AI traffic decoder tracks AI-referred sessions automatically across all platforms. But if you want to understand the methodology — or build this yourself in GA4 — read on.


Why AI Traffic Is Harder to Track Than It Looks

When a user on Perplexity reads an AI answer and clicks a link to your site, Perplexity should pass a referrer header — and GA4 should record it as perplexity.ai / referral. Sometimes that's exactly what happens.

But three things consistently break this clean picture:

1. Referrer stripping. ChatGPT's mobile app, Perplexity's deep linking, and most AI platforms in private browsing mode strip referrer headers. GA4 records these as direct visits.

2. The influence-to-click gap. A user asks Gemini which moisturizer to buy. Gemini recommends your brand. The user opens a new tab and types your URL directly. GA4 calls this direct traffic. The AI recommendation drove it.

3. Multi-session attribution lag. User researches via ChatGPT on Tuesday, doesn't buy. Returns via branded Google search on Thursday and purchases. GA4's last-click model credits organic search — the AI recommendation gets zero credit.

GA4 Records AsWhat Actually Happened
direct / (none)User clicked a ChatGPT link in the mobile app
organic / googleUser searched your brand name after seeing it on Perplexity
direct / (none)User copied URL from Claude response and pasted in new tab
referral / chatgpt.comUser clicked link directly in the ChatGPT web interface
organic / googleUser read a Gemini AI Overview that cited your product

Step 1: Find Your AI Referral Traffic in GA4

Method 1: Traffic Acquisition Report (5 minutes)

  • In GA4, go to Reports → Acquisition → Traffic Acquisition
  • Set your date range (last 90 days gives a meaningful sample)
  • Filter by session source and search for each AI platform:
  • PlatformGA4 SourceMediumShare of AI Traffic
    ChatGPTchatgpt.comreferral60–70%
    Perplexityperplexity.aireferral20–30%
    Google Geminigemini.google.comreferral5–10%
    Claudeclaude.aireferral2–5%
    Microsoft Copilotcopilot.microsoft.comreferral2–5%
    You.comyou.comreferral<2%
  • Record: sessions, conversions, revenue, and AOV per source
  • Method 2: Custom Segment for Side-by-Side Channel Comparison

  • Go to Explore → Blank exploration
  • Create a segment with OR conditions across all AI source domains
  • Add a second segment for Paid Search, a third for Organic Search
  • Compare all three across: Sessions, Conversion Rate, Revenue, AOV
  • https://cdn.sanity.io/images/en9d2pb2/production/bf46a3b0a15610f5f2e001fa0a4e3c009dcae17e-1200x630.png

    What You'll Typically Find

    MetricAI Referral TrafficTypical Range
    Share of total sessions1–5% of all trafficVaries by category visibility
    Session conversion rate1.5–3%Comparable to paid search
    Average order value115–125% of site avg15–25% premium is normal
    Bounce / exit rateLower than paidHigh-intent arrivals
    Traffic source split60–70% ChatGPTPerplexity second at 20–30%

    Step 2: Calculate What GA4 Is Missing

    The sessions from Step 1 are the visible AI traffic. The actual revenue impact is larger. Here's the framework used to estimate true AI-driven revenue:

    https://cdn.sanity.io/images/en9d2pb2/production/07f5f69d66643c0ba0a17602e0d4771001fc9cd5-1200x630.png

    The 5-Layer AI Attribution Model

    LayerMultiplierWhat It CapturesHow to Validate
    L1: GA4 Direct1.0×Tracked AI referral sessionsRead from GA4 directly
    L2: Dark Social×1.25Referrer-stripped sessions landing as directCorrelate direct spikes with AI mention peaks
    L3: Branded Search Halo×1.4Users who searched brand name after AI exposureGSC branded keyword spikes in same week cohorts
    L4: Marketplace Spillover×1.5–2.5Purchase intent converting on Amazon/NykaaUse your DTC-to-marketplace revenue ratio
    L5: LTV Multiplier×1.1–1.3Higher repeat rate of AI-referred cohortsCRM: repeat purchase rate by acquisition source
    Combined (Indian D2C)~7.06×Full true revenue contributionValidated: MyMuse 90-day GA4 dataset
    Combined (US DTC)~4–5×Lower marketplace spillover in US marketAdjust Layer 4 for your market split

    Layer 2 — Dark Social: ChatGPT's mobile app strips referrer headers. Same for Perplexity on iOS or any AI platform in private mode. 20–30% of AI-originated sessions arrive as direct.

    Layer 3 — Branded Search Halo: Users who aren't ready to click from the AI response often search your brand name later. This traffic lands in organic branded search, not AI referral. Typical lift: 20–35% above baseline branded search volume.

    Layer 4 — Marketplace Spillover: In India, ~55–60% of D2C brand revenue flows through Amazon/Nykaa/Flipkart (RedSeer 2024). If 40% of your revenue is DTC and 60% marketplace, multiply GA4 AI revenue by 2.5 to get total brand revenue from AI intent.

    Layer 5 — LTV: AI-referred customers arrive via trusted recommendation, not an ad. CRM data consistently shows higher 90-day repeat purchase rates from AI-referred cohorts vs. paid search.


    Step 3: Benchmark Your AI Traffic Performance

    Sessions Benchmark

    AI Traffic as % of Total SessionsInterpretationNext Action
    Under 0.5%Low AI visibility — brand rarely citedAudit entity signals, fix llms.txt
    0.5–2%Emerging presence — inconsistent citationBuild topical authority, earn citations
    2–5%Strong visibility — reliably recommendedScale content, expand prompt clusters
    Over 5%Category leader in AI visibilityDefend position, test new AI platforms

    Conversion Rate Benchmark

    CVR ComparisonInterpretation
    AI CVR < Organic SearchLanding page mismatch — AI users expect specific product context
    AI CVR ≈ Organic SearchHealthy baseline — optimize landing pages for AI query context
    AI CVR > Paid SearchStrong signal — invest aggressively in AEO

    AOV Benchmark

    AOV Gap vs. Site AverageInterpretation
    AI AOV below averageAI sending to wrong pages (category vs. product pages)
    AI AOV = site averageNeutral — no premium, review landing page alignment
    AI AOV 15–25% above averageNormal for AI referral — high-intent buyers
    AI AOV 25%+ above averageExceptional — AI driving premium product discovery

    Step 4: Set Up Ongoing AI Traffic Monitoring

    Option A: Permanent GA4 Custom Report

  • GA4 → Reports → Library → Create new report
  • Dimensions: Session source/medium + Landing page + Device category
  • Metrics: Sessions, Engaged sessions, Conversion rate, Revenue, AOV
  • Filter: Session source contains chatgpt.com OR perplexity.ai OR gemini.google.com OR claude.ai
  • Save as AI Traffic Performance and pin to your Reports homepage
  • Option B: GA4 Custom Alerts (Anomaly Detection)

    Alert NameConditionTrigger ThresholdAction
    AI Traffic Spikechatgpt.com sessions+50% week-over-weekInvestigate — new recommendation live
    AI Traffic DropAll AI sources combined-30% week-over-weekCheck if competitor displaced your citation
    High-Intent AI LandingProduct page + AI sourceCVR above 3%Scale retargeting on this page

    Setup: GA4 → Admin → Custom Insights → Create. Set source condition + session threshold. Enable email notification to your team.

    Option C: Automated Attribution Platform

    The AI traffic decoder monitors all of this automatically — AI mentions across ChatGPT, Perplexity, Claude, and Gemini in real time, mapped to GA4 traffic events, with true revenue attribution including dark social and marketplace layers.


    The GA4 + Claude Code Technical Setup

    For teams who want to automate this entire analysis via Claude Code, here's the setup used to generate all the data in this article. It connects the Google Analytics MCP server to Claude Code, enabling natural language GA4 queries.

    # Install permanently (pipx run fails — not in Claude Code's PATH)
    pipx install analytics-mcp
    # Authenticate using your own OAuth client (avoids 'This app is blocked')
    gcloud auth application-default login \
      --client-id-file='path/to/your_oauth_desktop_client.json' \
      --scopes=https://www.googleapis.com/auth/analytics.readonly
    
    Config (~/.claude.json):
    {
      "mcpServers": {
        "analytics-mcp": {
          "type": "stdio",
          "command": "/Users/yourname/.local/bin/analytics-mcp",
          "args": [],
          "env": {
            "GOOGLE_APPLICATION_CREDENTIALS": "/Users/yourname/.config/gcloud/application_default_credentials.json"
          }
        }
      }
    }
    

    Restart Claude Code → GA4 tools load automatically. You can then ask Claude to pull AI traffic segmentation, run attribution calculations, and diagnose funnel issues — all in natural language against your live GA4 data.

    The #1 setup failure: The default gcloud OAuth client is blocked for Analytics scopes. Create your own OAuth 2.0 Desktop App client ID in Google Cloud Console and use --client-id-file flag.

    What to Do With This Data

    1. Optimize your highest-AI-converting pages. If /collections/bestsellers converts AI-referred visitors at 4% but your homepage converts them at 0.8%, drive more AI recommendations to specific product pages. Prompt intelligence shows exactly which prompts trigger your brand mentions.

    2. Build retargeting audiences from AI-referred visitors. These are the highest-quality retargeting audience that exists — visitors who received an AI recommendation and still didn't convert on first visit. Create a GA4 audience: source contains ChatGPT/Perplexity/Gemini + exclude converted users. Target at 2–3× bid vs. cold retargeting.

    3. Use AI traffic trends to measure AEO ROI. When you publish new content, update your llms.txt, or earn citations, AI referral traffic is the most direct proxy for whether those investments are working. Track week-over-week AI session trends alongside your AI visibility score.

    https://cdn.sanity.io/images/en9d2pb2/production/a4fdb43915514079a0b09009c803120c2a68b7bc-902x878.png


    AI Is a Channel, Not a Curiosity

    Four years ago, tracking TikTok referral traffic felt optional. Today it's a primary acquisition channel. AI referral traffic is on the same trajectory — faster.

    ChatGPT crossed 100 million weekly users faster than any product in history. Perplexity is growing 3× year-over-year. Google's AI Overviews appear in roughly 30% of all searches. The brands that start measuring AI traffic seriously today will have 12–18 months of attribution data and optimization learnings when this channel matures into one of the top traffic sources for most categories.

    For a full picture of what it takes to be the brand AI recommends — not just to track when it happens — read our guide to answer engine optimization or explore how the AI traffic decoder automates everything in this guide.

    Book a demo to see how Asva AI tracks, attributes, and optimizes your AI traffic across every major platform.

    See How Your Brand Shows Up in AI Search

    Get a free AI visibility audit — see where you rank in ChatGPT, Perplexity, Gemini, and more.

    Comments (0)

    Leave a Comment

    No comments yet. Be the first to comment!