How to Track ChatGPT Traffic in GA4 (Step-by-Step 2026)

Learn how to set up Google Analytics 4 to track visitors coming from ChatGPT. Step-by-step guide with regex filters, limitations, and better alternatives.

Marco Di Cesare

Marco Di Cesare

November 1, 2025 · 8 min read

Share:

ChatGPT is sending traffic to websites. The question is: how much is it sending to yours?

I discovered this problem the hard way. My "direct" traffic was growing 126% year-over-year, but my brand awareness hadn't changed. Something was sending traffic that looked like direct visits—but wasn't. It took me weeks to figure out: my analytics were systematically lying to me about AI traffic.

In this guide, I'll show you exactly how to track ChatGPT referral traffic in Google Analytics 4. I'll cover the manual setup, its limitations, and a better approach for accurate AI traffic detection that I built into Loamly.

Why Track ChatGPT Traffic?

Before I dive into the technical setup, let me explain why this matters:

If you're not tracking it, you're flying blind on one of the fastest-growing traffic channels.

Method 1: Manual GA4 Setup (The Hard Way)

Here's how to track ChatGPT traffic using native GA4 features.

Step 1: Create a Custom Dimension

First, you need a way to identify AI traffic sources:

  1. Go to AdminCustom definitionsCustom dimensions
  2. Click Create custom dimension
  3. Configure:
    • Dimension name: AI Traffic Source
    • Scope: Event
    • Event parameter: ai_source

Step 2: Set Up a Regex Filter for ChatGPT Referrers

ChatGPT traffic comes from several referrer patterns:

chatgpt.com
chat.openai.com
*.chatgpt.com

Create an exploration report:

  1. Go to ExploreBlank
  2. Add dimension: Session source
  3. Add filter: Source matches regex chatgpt|openai

Step 3: Build a Custom Exploration

Create a dedicated report for AI traffic:

  1. Dimensions: Session source, Landing page, Device category
  2. Metrics: Sessions, Engaged sessions, Conversions, Revenue
  3. Filter: Source matches chatgpt|openai|perplexity|claude

The Problem with This Approach

Here's what GA4 can't tell you:

What You SeeWhat's Actually Happening
chatgpt.com referrerChatGPT web interface click
Direct trafficChatGPT mobile app, API, Operator (80%+ of AI traffic)
(not set)Could be AI, could be anything

The hard truth: GA4 misses 80%+ of AI traffic because:

  • ChatGPT mobile app doesn't pass referrer
  • ChatGPT Operator uses headless browsing
  • Claude and Perplexity have similar limitations
  • Many AI tools strip referrer headers

Method 2: Use Loamly for Accurate Detection (The Smart Way)

Loamly was built specifically to solve this problem. Here's how it works:

Cryptographic Verification (100% Accurate)

For ChatGPT Operator, Loamly uses RFC 9421 cryptographic signatures:

// ChatGPT Operator sends signed requests
// Loamly verifies the signature against OpenAI's public key
const isVerifiedOperator = await verifyRFC9421Signature(request, OPENAI_PUBLIC_KEY);

This is the only way to get 100% accurate Operator detection.

Behavioral Analysis

For other AI sources, Loamly analyzes:

  • Request patterns and timing
  • Browser fingerprints consistent with AI crawlers
  • User agent analysis
  • Session behavior patterns

One-Line Installation

<script src="https://app.loamly.ai/t.js?d=yourdomain.com"></script>

That's it. No regex filters, no custom dimensions, no exploration reports.

What ChatGPT Traffic Looks Like in Loamly

Once installed, you'll see:

  • Verified AI visitors with source attribution (ChatGPT, Claude, Perplexity, Gemini)
  • What AI said about you before sending the visitor
  • Conversion tracking specific to AI traffic
  • Revenue attribution for AI-sourced purchases

Should You Still Use GA4?

Yes! GA4 is great for:

  • Overall traffic analysis
  • Marketing attribution (ads, email, social)
  • Ecommerce tracking
  • Audience building

But for AI traffic specifically, you need a specialized tool. Use both:

  • GA4 for traditional marketing analytics
  • Loamly for AI visibility and traffic

Quick Setup Comparison

FeatureGA4 ManualLoamly
Setup time30-60 min2 min
ChatGPT web detectionPartialFull
ChatGPT OperatorNoVerified
Mobile app trafficNoYes
Claude, Perplexity, GeminiLimitedFull
What AI says about youNoYes
Conversion trackingManualAutomatic

Next Steps

  1. Check your AI visibility for free - See what ChatGPT says about your brand
  2. Set up Loamly - Get accurate AI traffic tracking in 2 minutes
  3. Keep GA4 - Use it for what it's good at

FAQ

Does ChatGPT actually send traffic to websites?

Yes! When users ask ChatGPT questions, it often includes links to relevant websites. With ChatGPT Operator, it can directly browse and interact with sites on behalf of users. I see this in Loamly's data every day—ChatGPT is generating over 1.2 billion outgoing referrals per quarter.

How much traffic can I expect from ChatGPT?

It varies by industry. B2B SaaS companies report 5-15% of their traffic coming from AI sources. Consumer brands see 2-8%. Travel and hospitality see the highest rates (3-5% of total traffic). The number is growing rapidly—AI traffic grew 700% in 2025 alone.

Why does GA4 miss so much ChatGPT traffic?

Three reasons: (1) ChatGPT mobile app doesn't pass referrer headers, (2) users copy-paste URLs instead of clicking (no referrer), and (3) ChatGPT Operator uses headless browsing that strips referrer information. GA4 was built for traditional web traffic, not AI intermediaries.

Is ChatGPT traffic valuable?

Extremely. AI-sourced traffic converts at 11x the rate of organic search for sign-ups, according to Microsoft Clarity's study of 1,200 publisher websites. These are high-intent users who specifically asked AI for a recommendation. When someone asks ChatGPT "what's the best analytics tool for tracking AI traffic," they're ready to act.

Can I see what ChatGPT said before sending the visitor?

Only with specialized tools like Loamly. GA4 just shows the referrer (if it's passed), not the context. Loamly captures the query context so you know exactly what brought each visitor. This is crucial for understanding which AI recommendations actually convert.

Should I still use GA4?

Yes! GA4 is great for overall traffic analysis, marketing attribution (ads, email, social), ecommerce tracking, and audience building. But for AI traffic specifically, you need a specialized tool. Use both: GA4 for traditional marketing analytics, Loamly for AI visibility and traffic.

How do I know if my "direct" traffic is actually from ChatGPT?

Look for patterns: if your direct traffic is growing faster than brand awareness, if users mention finding you through "search" but can't recall specific queries, or if you see conversion rates that match AI traffic patterns (higher than organic search). The only way to know for sure is with specialized AI traffic detection that uses cryptographic verification and behavioral analysis.



Methodology: How I Built This Guide

I wrote this guide because I couldn't find a clear explanation of why GA4 misses AI traffic. Here's what I learned building Loamly.

The Problem

When I started building Loamly, I discovered that standard analytics tools (GA4, Mixpanel, traditional stuff) were completely blind to AI traffic. They couldn't tell me:

  • What AI platforms were saying about my brand
  • How much traffic actually came from AI recommendations
  • Whether AI mentions were positive, negative, or neutral
  • How my AI visibility compared to competitors

The Solution

I built Loamly to solve this. It uses:

  • Cryptographic verification (RFC 9421) for ChatGPT Operator—the only way to get 100% accurate Operator detection
  • Behavioral analysis for other AI sources—analyzing request patterns, browser fingerprints, and session behavior
  • One-line installation—no regex filters, no custom dimensions, no exploration reports

Why This Matters

If you're not tracking AI traffic, you're flying blind on one of the fastest-growing traffic channels. AI traffic grew 700% in 2025, and it converts at 11x the rate of organic search. But most of it is hiding in your "direct" bucket.

Ready to see your real AI traffic? Get your free AI visibility report and discover what you're missing.

Tags:ChatGPTGoogle AnalyticsGA4AI TrafficTutorial
Marco Di Cesare

Marco Di Cesare

Founder, Loamly

Stay Updated on AI Visibility

Get weekly insights on GEO, AI traffic trends, and how to optimize for AI search engines.

No spam. Unsubscribe anytime.

Check Your AI Visibility

See what ChatGPT, Claude, and Perplexity say about your brand. Free, no signup.

Get Free Report