The Dark Funnel: How to Track Perplexity and ChatGPT in GA4

The Dark Funnel: How to Track Perplexity and ChatGPT in GA4

Referral Traffic from Perplexity: Setting up GA4 Filters for AI Attribution

Definition

Perplexity Referral Traffic is a specific segment of inbound user visits originating from the Perplexity.ai "Answer Engine" interface, typically identified in Google Analytics 4 (GA4) by the source perplexity.ai and medium referral. Unlike traditional search engine traffic (which is categorized as organic), these visits are often misclassified as generic referrals or "Direct" traffic, requiring custom regex filters and Channel Groups to accurately attribute them to your Share of Model efforts.


The Problem: The "Dark Funnel" of AI Traffic

Marketing teams rely on the "Organic Search" bucket to measure SEO success. However, Answer Engines like Perplexity do not behave like Google.

  1. Misclassification: GA4’s default channel definitions often dump Perplexity traffic into the generic "Referral" bucket, mixing high-intent AI users with random backlink clicks from low-quality blogs.
  2. The "Direct" Void: If a user uses the Perplexity mobile app, the referrer header is sometimes stripped, causing the visit to appear as "(Direct) / (none)."
  3. Attribution Blindness: You might be winning the Share of Model war—appearing in thousands of answers—but if you aren't filtering specifically for perplexity.ai, your analytics dashboard will show flat growth while your actual visibility explodes.

The Consequence:

You cannot calculate the ROI of your AEO strategy if you cannot distinguish between a user clicking a link in a 2015 blog post and a user clicking a citation in a live Perplexity answer.

image.png


The Solution: Custom Channel Grouping

To fix this, we do not just want a filter; we want a Permanent Infrastructure Upgrade. We will create a new "Channel Group" in GA4 specifically for AI Answer Engines.

This allows you to see "AI Traffic" side-by-side with "Organic Search" and "Paid Social" in your acquisition reports.

Step 1: The Regex Pattern

First, you need a Regular Expression (Regex) that captures Perplexity and its peers (ChatGPT, Claude, Gemini).

The Magic String:

Code snippet

perplexity\.ai|chatgpt\.com|gemini\.google\.com|claude\.ai|copilot\.microsoft\.com

Step 2: Create the Custom Channel

  1. Go to AdminData displayChannel groups.
  2. Select "Create new channel group" (typically based on the Default Channel Group).
  3. Name it "AEO / AI Channels".
  4. Click "Add new channel".
  5. Name: AI Answer Engines
  6. Condition: Source matches regex perplexity\.ai|chatgpt\.com|... (Use the snippet above).
  7. Order: Drag this new channel to the TOP of the list. Crucial: If you leave it at the bottom, the "Referral" rule might catch it first.

Step 3: Verification

Once saved, wait 24 hours. Then navigate to Reports > Acquisition > Traffic acquisition. Switch the primary dimension to "AEO / AI Channels." You should now see a distinct row for Perplexity traffic.


Comparison: Default vs. Custom Tracking

Feature

Default GA4 "Referral"

Custom "AI Channel" Group

Visibility

Buried inside thousands of referrals

Top-level line item

Accuracy

Low (Mixed with blogs/news)

High (Strictly AI engines)

Trend Analysis

Impossible (Too noisy)

Clear (Track AEO growth)

Conversion Rate

Diluted

Specific (Often higher intent)

Retroactive?

No (Only applies moving forward)

Yes (In some reporting views)


Code Example: The "Quick Check" Exploration

If you don't have Admin access to create Channel Groups, use this "Exploration" configuration to audit your traffic immediately.

Variable Settings:

  • Dimensions: Session source / medium
  • Metrics: Sessions, Engaged sessions, Conversions
  • Filter: Session source matches regex (see below)

Code snippet

# Regex for Perplexity and major AI Referrers

perplexity\.ai|chatgpt|bing\.com\/chat|bard\.google\.com|claude\.ai

Analysis Tip:

If you see high traffic from perplexity.ai but zero conversions, check your Client-Side Rendering status. It is possible the AI user is landing on a page that loads too slowly or looks broken compared to the concise answer they just read.


Key Takeaways

  1. Referral != Referral: Stop treating Perplexity traffic like a backlink. It is a search intent query, functionally identical to SEO but with higher qualification.
  2. Order Matters: When creating Custom Channel Groups, the order of operations is strict. Place your "AI Engines" rule above the standard "Referral" rule, or GA4 will ignore it.
  3. Cross-Reference Logs: GA4 relies on client-side headers. If users are on the Perplexity App, headers might be stripped. Compare this data with your Server Log Analysis for ground truth.
  4. The "Bing" Nuance: Perplexity sometimes utilizes Bing's index. Occasionally, traffic might be misattributed to bing / organic. Watch for concurrent spikes.
  5. Conversion intent: Early data suggests Perplexity users have a higher "Time on Page" than Google users because they are pre-qualified by the AI's summary.

References & Further Reading

  1. Google Analytics Help: Custom Channel Groups. Official documentation on how to configure channel grouping logic.
  2. Perplexity AI: User-Agent Strings. Identifying the specific bot and referrer strings used by the Perplexity engine.
  3. Website AI Score: Share of Model metrics. How to track your visibility beyond rankings.
GEO Protocol: Verified for LLM Optimization
Hristo Stanchev

Audited by Hristo Stanchev

Founder & GEO Specialist

Published on 30 December 2025