Skip to main content
← Back to Blog

AI Search Analytics

How to Track ChatGPT and Perplexity Referral Traffic

GA4 can classify recognized AI-assistant referrals. Server and browser tracking preserve different parts of the visit, and neither can identify the prompt that created it.

The short version

Start with ChatGPT and Perplexity in Google Analytics 4's default AI Assistants channel. When a recognized assistant sends a referrer, GA4 assigns the medium ai-assistant and the campaign (ai-assistant). That gives many properties a clean starting point without a custom regex.

Three boundaries still matter. GA4 sees visits after a click, while an AI answer can mention your brand without sending a visit. Google classifies clicks from AI Overviews and AI Mode as Organic Search. Visits without a referrer cannot be assigned to an assistant from GA4 data alone.

The Foglift answer

Foglift keeps the answer layer and visit layer as separate evidence. AI Visibility records measured prompts, mentions, citations, competitors, sentiment, engine, and time. Foglift Tracker records recognized AI referrers and landing paths through server, edge, or browser integrations. Unlimited Technical Audits and active-use weekly Google AI Overview monitoring are available at $0. The $49-per-month Launch plan adds daily monitoring across ChatGPT, Claude, Perplexity, Gemini, and Google AI Overview.

What the tracked query retrieves

Foglift ran 25 scheduled observations from July 17 to July 19, 2026 across five engines for how to track AI referral traffic from ChatGPT and Perplexity. The cited sources split across platform documentation, implementation guides, and video walkthroughs. That mix supports a two-layer workflow: use analytics or Tracker for attributable visits, then use prompt-level monitoring for the answers, mentions, and citations that may never send a click.

SignalWhat it provesWhat it does not prove
Session in AI AssistantsA recognized assistant referred a visitWhich prompt or citation produced the click
Prompt-level citationThe engine cited a page for a measured promptThat a user clicked or converted
Direct or branded liftDemand changed during the measured windowThat AI search caused the change
Conversion with AI sourceAn attributable AI visit completed a key eventThe full influence path before that visit

Why AI search attribution is incomplete

The first gap is zero-click behavior. Pew Research Center analyzed browsing from 900 U.S. adults and 68,879 unique Google searches from March 2025. When an AI summary appeared, users clicked a traditional result in 8% of visits, compared with 15% when no summary appeared. A source inside the summary received a click in 1% of visits with a summary. Citation exposure and website traffic are different measurements.

The second gap is the HTTP referrer. A source can send only its origin, or omit the Referer header, depending on its policy and the navigation context. The web standard's default policy sends the origin for same-security cross-origin requests, but stricter policies and app-to-browser paths can remove that evidence. When the evidence is absent, a responsible analytics system leaves the visit unattributed.

The third gap is channel overlap. Google's current default-channel documentation puts non-ad links from AI Overviews and AI Mode inside Organic Search. Ahrefs made the same limitation explicit in its June 2025 study of 81,947 sites: Google's AI search traffic could not be reliably separated from traditional search in site analytics. Do not create a precise Google AI traffic number from data that lacks the distinction.

Step 1: Check GA4's native AI Assistants channel

Open Reports → Acquisition → Traffic acquisition. Set the primary dimension to Session default channel group and look for AI Assistants. Use the session-scoped dimension for visit performance. Use the first-user dimension only when the question is how a person was originally acquired.

Add Session source / medium as a secondary dimension. This shows which assistant generated the visit and confirms whether GA4 assigned ai-assistant. OpenAI provides an additional check: its publisher documentation says ChatGPT search links automatically include utm_source=chatgpt.com.

Use native classification when it works

Google maintains the assistant list behind the default channel. A hand-maintained regex can add a missing source, but it also creates maintenance work and false-positive risk. Inspect your source rows before adding another rule.

Step 2: Build a controlled custom channel when needed

A custom channel remains useful when you need a stable reporting definition, want to include an assistant GA4 has not classified, or need to apply the rule retroactively in reports and explorations. Google says standard GA4 properties can create two custom channel groups in addition to the predefined group.

  1. Open Admin → Data display → Channel groups.
  2. Copy the default channel group and name the copy AI traffic reporting.
  3. Add a channel named AI Assistants.
  4. Use Source matches regex as the channel condition, with assistant domains verified in your property.
  5. Do not combine that source condition with Medium exactly ai-assistant in the same condition group. An unclassified assistant can still carry referral, so requiring both values defeats the fallback.
  6. Place AI Assistants above Referral. Google evaluates channels in order and uses the first match.

A conservative source regex looks like this:

^(chatgpt\.com|chat\.openai\.com|perplexity\.ai|claude\.ai|gemini\.google\.com|copilot\.microsoft\.com|notebooklm\.google\.com)$

Treat that list as a starting point. Add a host only after it appears in your acquisition data or the platform documents it. Google's first-party example is source-regex driven and uses a broad expression that matches terms such as ai, gpt, and google. For a production property, exact host matching reduces the chance that an unrelated source moves out of Referral or Organic Search.

Do not add Google Search to this custom channel. GA4's documented behavior keeps AI Overview and AI Mode clicks in Organic Search, and the visit record does not expose a dependable flag for splitting them out.

Step 3: Build the report around business outcomes

Session count alone says little about value. In Traffic acquisition or an Exploration, use the AI Assistants channel with these dimensions and metrics:

FieldQuestion it answersUseful cut
Session source / mediumWhich assistant referred visits?Assistant by week
Landing pageWhich page received the demand?Product, pricing, guide, comparison
Engaged sessionsDid visitors continue after landing?Compare with Organic Search
Key event rateHow often did an attributable visit convert?Signup, demo, checkout, activation
RevenueWhat value did GA4 assign to the sessions?Source and landing page

Small samples swing sharply. Ahrefs reported that AI search supplied 0.5% of its traffic but 12.1% of signups in one 30-day window in 2025. That case study describes one site and one measurement window. Report the visit and conversion counts beside every rate so readers can judge the denominator.

Step 4: Connect GA4 to visibility and revenue

GA4 starts after the click. To measure the full path, combine it with prompt-level monitoring, server-side referral evidence, and your CRM.

Measure answer exposure

Track a fixed set of buyer prompts across ChatGPT, Perplexity, Gemini, Claude, and Google AI Overview. Store mention status, position, citations, cited URLs, competitor names, sentiment, engine, and run time. The AI search monitoring guide explains that layer. It gives you the denominator that referral reports lack: how often the brand was present before anyone had a chance to click.

Choose the tracking path that matches your site

Foglift Tracker has two collection paths. Server and edge adapters run at the request layer. The browser pixel runs after a page loads, which makes it suitable for static and no-code sites. The signals are different, so choose the path based on the question you need to answer.

Install pathSignals availableBest fit
Server or edge adapterCrawler requests and recognized human referralsNext.js, Express, Node, and edge runtimes
Browser pixelRecognized human referrals onlyStatic sites and no-code platforms

Use the Next.js guide for middleware composition, the Cloudflare Workers guide for edge capture, or the nginx guide for request mirroring in front of an application or cache. The WordPress guide installs the referral-only browser pixel and explains when nginx is needed for crawler visibility.

Both paths store the landing path, matched referrer, and event time without cookies, fingerprints, full query strings, or stored IP addresses. Referrer-stripped visits stay uncounted. The browser pixel cannot observe crawlers because bots frequently do not execute client-side JavaScript. A recognized referral does not reveal the original prompt or prove that the landing page was cited. Match trends by engine, landing page, and time window, then label the relationship as an inference unless a deterministic campaign identifier connects the records.

Carry the source into the CRM

Persist the first attributable AI source and the converting-session source with the lead. Keep both fields. A person can first arrive from Perplexity, return through branded search, and convert later. Add “AI assistant” to the self-reported discovery field so users can tell you about exposure that did not create a trackable first visit.

Join those fields to qualified pipeline, closed revenue, activation, or retention. The AI search ROI framework covers the broader operating model. Keep click attribution and self-reported influence in separate columns so the total remains auditable.

Use an evidence-graded dashboard

A useful dashboard shows the whole path while preserving the strength of each signal. Use three labels: confirmed, inferred, and directional.

Dashboard rowSourceEvidence labelDecision
Mention and citation rateAI Visibility monitoringConfirmed for measured promptsWhich engine or prompt needs work
Sessions in AI AssistantsGA4 or server referrerConfirmed referralWhich landing pages receive clicks
Visibility-to-visit movementTime-aligned monitoring and analyticsInferred relationshipWhere to run a controlled content test
Direct and branded-search changeGA4 and Search ConsoleDirectionalWhether to investigate broader influence
Pipeline and revenueCRM and billingConfirmed when source persistsWhere the channel creates business value

Review the dashboard weekly for operational changes and monthly for business outcomes. The weekly view finds broken classification, new assistant sources, citation losses, and landing page shifts. The monthly view gives conversion and pipeline denominators time to accumulate.

Close the measurement loop

Run an AI Visibility Check to measure the answer layer. Install Foglift Tracker to preserve recognized referral and landing-page evidence from your own server.

Sources and data freshness

  1. Google Analytics Help, Default channel group, accessed July 14, 2026. Documents the AI Assistants channel definition and Google AI Overview / AI Mode treatment.
  2. Google Analytics Help, Custom channel groups, accessed July 14, 2026. Documents channel order, limits, retroactive reporting, and the AI-assistant example.
  3. OpenAI, Publishers and Developers FAQ, accessed July 14, 2026. Documents utm_source=chatgpt.com on ChatGPT search referral URLs.
  4. MDN, Referrer-Policy header, accessed July 14, 2026. Documents when origin data is sent or omitted.
  5. Pew Research Center, Google AI summary click analysis, July 22, 2025. Sample: 900 U.S. adults and 68,879 Google searches.
  6. Ahrefs, AI Traffic Has Increased 9.7x in the Past Year, June 26, 2025. Sample: 81,947 sites.
  7. Ahrefs, AI search conversion case study, June 16, 2025. Single-site, 30-day Ahrefs conversion analysis.
  8. Foglift Tracker documentation, accessed July 17, 2026. Current server-adapter and browser-pixel boundaries, recognized referrers, stored fields, privacy boundary, and referrer-stripping behavior.

Frequently asked questions

How do I track ChatGPT and Perplexity referral traffic?

In GA4, open Traffic acquisition and review Session default channel group for AI Assistants, then add Session source / medium to separate ChatGPT from Perplexity. A server or edge adapter can preserve the recognized referrer and landing path before browser analytics runs. A browser pixel can record recognized human referrals on static and no-code sites. Neither method reveals the original prompt or proves that the landing page was cited.

Does GA4 track traffic from AI assistants?

Yes. Google's current GA4 default-channel documentation includes an AI Assistants channel. When a referrer matches Google's maintained list of AI assistants, GA4 sets the medium to ai-assistant and the campaign to (ai-assistant). Check the Session default channel group in Traffic acquisition before building a custom channel.

How do I create an AI traffic channel in GA4?

In Admin, open Data display and Channel groups, copy the default group, and add a channel named AI Assistants. Use a reviewed Source matches regex condition for assistant domains that your property receives, without requiring ai-assistant medium in the same condition group. Place AI Assistants above Referral. Avoid broad rules such as matching every source containing ai or google because they can absorb unrelated traffic.

Can GA4 separate Google AI Overview traffic from organic search?

Not reliably from GA4 channel data alone. Google's default-channel documentation classifies non-ad links from Google AI Overviews and AI Mode as Organic Search. Treat Search Console and prompt-level AI visibility as supporting evidence instead of relabeling an unknown share of Google organic sessions as AI traffic.

Which AI referrer domains should I monitor?

Start with referrers you can verify in your own data. Foglift Tracker currently recognizes chatgpt.com, chat.openai.com, claude.ai, perplexity.ai, gemini.google.com, copilot.microsoft.com, and notebooklm.google.com. OpenAI also documents that ChatGPT search referral URLs include utm_source=chatgpt.com.

Why does some AI-influenced traffic appear as Direct?

A visit can lack referrer data because a source applies a restrictive Referrer-Policy, a user moves from an app to a browser, or the visit follows a later branded search or typed URL. Direct traffic is therefore a mixed bucket. An increase after an AI citation is directional evidence. It cannot establish that the citation caused those sessions.

How should I measure AI search ROI?

Keep three evidence layers separate: prompt-level exposure such as mentions and citations, attributable visits with an AI source or referrer, and business outcomes such as signups, qualified leads, revenue, or activation. Report direct and branded-search changes as supporting indicators. This prevents a modeled influence signal from being presented as a confirmed conversion path.

Can Foglift connect AI referrals to answer-level visibility?

Foglift keeps the evidence layers separate so teams can compare them without overstating attribution. AI Visibility stores measured prompt runs, mentions, citations, competitors, sentiment, engine, and time. Foglift Tracker records recognized AI referrers and landing paths from server, edge, or browser integrations. Unlimited Technical Audits and active-use weekly Google AI Overview monitoring are available at $0; Launch costs $49 per month and adds daily monitoring across ChatGPT, Claude, Perplexity, Gemini, and Google AI Overview.

Fundamentals: Learn about GEO (Generative Engine Optimization) and AEO (Answer Engine Optimization) (the two frameworks for optimizing your content for AI search engines).

Related reading

Free tool

Run a free Technical Audit for your AI Readiness Score

Audit any URL in 30 seconds. See scores for SEO, AI Readiness, performance, security, and accessibility.

Free Technical Audit

No signup required. Results in 30 seconds.