Technical Guide

AI traffic attribution analytics: how to track revenue from ChatGPT, Perplexity, and Claude

Vincent Ruan
Vincent RuanFounder, Attrifast ·

AI engines are now a meaningful traffic source for SaaS and ecommerce sites — and most analytics tools are blind to them. This guide explains why GA4 misclassifies AI referrals as Direct, how document.referrer actually works for AI traffic, and how to connect AI engine visits to real revenue events.

Published March 2026 · 12 min read
TL;DR
  • ChatGPT, Perplexity, Claude, and Gemini all send standard HTTP referrer headers — the data exists and is readable.
  • GA4 misclassifies almost all AI traffic as Direct/(none) due to referral exclusion logic and missing domain lists.
  • AI-referred visitors convert at 2–4x the rate of organic search in early data — these are high-intent buyers.
  • Proper AI traffic attribution requires capturing the referrer at session start and linking it to your payment processor server-side.
  • Attrifast tracks AI engine traffic and ties each visit to Stripe revenue automatically — no custom code.

AI engines are sending traffic. Your analytics probably do not know it.

In January 2026, Similarweb reported that ChatGPT had surpassed 180 million monthly active users, with a growing share actively clicking through to external websites from AI-generated answers. Perplexity, which positions itself explicitly as a research engine with citations, generates outbound clicks as a core product feature. Claude and Gemini are following the same model.

For SaaS founders and ecommerce operators, this creates a specific problem: a new traffic channel with potentially high purchase intent is arriving at your site and your analytics tool is recording it as Direct traffic. You cannot optimize a channel you cannot see.

According to SparkToro research on AI referral patterns, sites in technical niches — developer tools, B2B SaaS, specialized equipment — are seeing AI engine referrals represent 5–15% of inbound traffic, and the share is growing month over month. For the average consumer site the share is lower, roughly 1–3%, but still non-trivial given the conversion quality.

Why AI-referred visitors convert differently

A user arriving from a Google search result may be researching broadly. A user arriving from a ChatGPT citation arrived because an AI explicitly recommended your product in response to a question like "what is the best analytics tool for Stripe businesses?" That recommendation narrows intent dramatically. Early adopter data from Attrifast users shows AI-referred visitors converting to paid customers at 2–4x the rate of organic search visitors.

AI engine referral share: who is sending the traffic

Estimated distribution of AI-originated web referrals, early 2026. Based on aggregated referrer data across Attrifast-tracked sites and corroborating Similarweb AI traffic reports.

Share of AI engine referrals (%)
ChatGPT
62%
Perplexity
18%
Claude
11%
Gemini
6%
Other AI
3%

ChatGPT dominates referral volume. Perplexity punches above its user-count because citations are a core product feature. Claude and Gemini are growing fastest quarter over quarter.

How AI traffic referrers actually work: the technical reality

When a user clicks a link inside an AI chat interface, the browser sends an HTTP Referer header to the destination server — the same mechanism that has powered web analytics since the mid-1990s. On the client side, your JavaScript can read this as document.referrer.

What document.referrer returns for each AI engine
ChatGPThttps://chatgpt.com/or chat.openai.com for older links
Perplexityhttps://perplexity.ai/consistent across all citation types
Claudehttps://claude.ai/present on all outbound clicks
Geminihttps://gemini.google.com/distinct from google.com organic

Why referrers get lost: three common failure modes

1. Referrer-Policy headers set to same-origin

If the AI engine sets a Referrer-Policy of same-origin or no-referrer on its outbound links, the browser will not send the referrer header to cross-origin destinations. ChatGPT and Perplexity currently use unsafe-url or origin-when-cross-origin, which preserves the referrer. This can change at any time.

2. HTTPS → HTTPS with meta refresh redirects

Some AI engines route clicks through intermediate redirect pages for security or tracking. If that redirect page lacks a Referrer-Policy that passes the original referrer, the destination site sees the redirect URL as the referrer instead. This is the most common cause of Perplexity AI traffic appearing as Direct in some analytics tools.

3. GA4's referral exclusion and session stitching logic

GA4 maintains a list of 'referral exclusions' — domains that should not start new sessions. Google's own domains are excluded to prevent organic search sessions from being overwritten by subsequent Google clicks. AI engine domains are not on this list, but GA4's session model often fails to attribute the correct source when a user visits multiple pages within the same session, defaulting to Direct.

What you see in GA4 vs what is actually happening

The same 100 visitors, two different views. GA4 collapses everything into Direct. Proper AI traffic attribution breaks out each source and ties it to revenue.

What GA4 shows
Organic Search45%
Direct / (none)← AI traffic hidden here38%
Referral12%
Social5%

AI traffic from ChatGPT, Perplexity, and Claude is invisible. You cannot act on data you cannot see.

What Attrifast shows
Organic Search45%
ChatGPT18%
Referral12%
Perplexity AI10%
Social5%
Claude AI6%
Direct4%

Each AI source is visible with its own conversion rate and revenue contribution.

How analytics tools handle AI traffic: comparison

GA4, Plausible, Fathom, and Attrifast — how each handles AI engine referrers and revenue attribution.

GA4None detection
Shows referrer

No

Links to revenue

No

All AI traffic appears as Direct/(none)

PlausiblePartial detection
Shows referrer

Yes

Links to revenue

No

Shows referrer domain but no revenue data

FathomPartial detection
Shows referrer

Yes

Links to revenue

No

Shows referrer domain but no revenue data

AttrifastFull detection
Shows referrer

Yes

Links to revenue

Yes

AI source → session → Stripe payment linked

How to track AI traffic revenue with Attrifast: step by step

Attrifast captures document.referrer at the start of every session and stores it server-side with a privacy-safe session token. When a Stripe payment completes, it joins the payment record back to that original session — including its AI engine referrer. Here is the full setup flow.

1

Add the Attrifast script tag

Paste a single 4 KB script tag into your site's <head>. No configuration needed — the tracker automatically reads document.referrer on every page load.

2

Connect Stripe via OAuth

One-click OAuth connection. Attrifast matches browser sessions to server-side payment events using a privacy-safe session token — no cookies, no PII stored.

3

See AI traffic in your dashboard immediately

ChatGPT, Perplexity, Claude, and Gemini referrals appear as distinct channels. Each row shows visitors, conversion rate, and revenue generated.

4

Filter revenue by AI source

Click any AI source to see the exact pages visitors landed on, their conversion rate versus your organic average, and total revenue attributed.

What you will see in your dashboard

Within 24 hours of installation, AI traffic sources appear as named channels: ChatGPT, Perplexity AI, Claude AI, Gemini. Each row shows sessions, conversion rate, revenue generated, and revenue per visitor. You can sort by revenue to immediately see which AI engine produces the highest-value customers for your business.

No consent banners are required. Attrifast is cookieless by design and GDPR-compliant without needing to ask users for permission — important for technical audiences who are most likely to dismiss consent dialogs.

Why tracking AI referrals now is a first-mover opportunity

SEO took years to become a mature discipline. Social media analytics tooling lagged platform growth by two to three years. The pattern repeats: new traffic channels emerge, attribution tooling follows slowly, and early adopters who build measurement infrastructure first gain durable advantages in understanding and optimizing their traffic mix.

AI-generated content optimization — sometimes called GEO (Generative Engine Optimization) — is emerging as a discipline precisely because traffic from AI engines behaves differently from traditional search. Knowing your current AI traffic baseline and which AI engines send the highest-value visitors gives you the data foundation to run structured experiments: which content formats get cited, which product pages earn AI recommendations, and which AI engines reward which types of businesses.

You cannot optimize what you do not measure. The businesses that set up AI traffic attribution analytics in early 2026 will have 12–18 months of historical data when the rest of the market starts paying attention.

180M+

ChatGPT monthly active users (Jan 2026)

Similarweb
2–4x

Higher conversion rate vs organic search for AI referrals

Attrifast user data
5–15%

Of traffic for B2B SaaS sites now from AI engines

SparkToro, 2025–2026

Key takeaways

1AI engines like ChatGPT and Perplexity send referrals via the standard HTTP Referer header — the same mechanism used by Google and Twitter. The data is there; most tools ignore it.
2GA4 misclassifies most AI traffic as Direct because it strips referrers from same-site navigations and does not maintain a known AI domain list.
3ChatGPT drives an estimated 62% of AI-originated web referrals in early 2026, but Perplexity and Claude are growing fastest month over month.
4AI-referred visitors convert at 2–4x the rate of organic search visitors in early adopter data — they arrive with specific intent after an AI directly recommended a product.
5Tracking AI traffic revenue requires linking the referrer at browser session time to the payment event server-side. Cookie-free tools that do this natively have a structural advantage.

Frequently asked questions

Does ChatGPT send referrer data when it links to my website?

Yes. When a user clicks a link inside ChatGPT, the browser sends a standard HTTP Referer header containing "chat.openai.com" or "chatgpt.com". Perplexity sends "perplexity.ai", Claude sends "claude.ai", and Gemini sends "gemini.google.com". These referrers are readable via document.referrer in JavaScript, the same way Google referrals work.

Why does GA4 show AI traffic as Direct?

GA4 has a hard-coded referral exclusion list that strips referrers from known domains (like google.com) to avoid self-referrals. AI engine domains are not on GA4's "known referrers" list, so their traffic hits GA4's session-start logic without a recognized source. GA4 then classifies it as Direct/(none). GA4 also loses the referrer when a user clicks through a multi-page AI chat interface.

How much revenue is coming from AI engines in 2026?

Based on Similarweb data from late 2025 and early 2026, AI engine referrals represent 1–5% of total web traffic for the average SaaS or ecommerce site, up from near-zero in 2023. For developer tools and B2B SaaS, the share is higher — anecdotally 5–15% — because technical users are more likely to use AI assistants for product research.

Is Perplexity AI traffic trackable?

Yes. Perplexity sends clicks through with a "perplexity.ai" referrer intact. The main challenge is that Perplexity caches some pages inside its UI, which can strip referrer data for a small percentage of clicks. Direct click-throughs from Perplexity's answer citations are fully trackable via document.referrer.

How do I track which AI sources drive paying customers, not just visitors?

You need a tool that captures the referrer at session start and then links that session to a downstream payment event. Attrifast does this server-side using a session token: when a Stripe payment completes, it joins the payment record to the original session referrer without relying on cookies. GA4 cannot do this natively.

Does Claude AI send referrer data?

Yes, claude.ai sends a standard Referer header on outbound clicks. Attribution for Claude traffic works identically to ChatGPT attribution — capture document.referrer at page load and store it with the session. The domain to look for is "claude.ai".

Indexed AI referral traffic growth (Sep 2024 = 100)

Source: Digiday — 'In Graphic Detail: The state of AI referral traffic in 2025', based on Conductor data

See which AI engines drive your revenue

Connect Stripe and get ChatGPT, Perplexity, and Claude broken out as distinct revenue channels — in 2 minutes, no cookies, no engineering.

Start free trial →

Loved by 500+ users