Skip to content
Features

Citelayer® AI Referral Tracking — Measure Traffic from ChatGPT, Perplexity & Co.

6 min read

Two Different Things: Crawlers vs. Referrals

Before getting into setup and data, it’s important to understand the distinction Citelayer® makes between bot visits and AI referrals. These look similar on the surface but are fundamentally different events.

A bot visit happens when an AI crawler — an automated software agent operated by a company like OpenAI or Anthropic — fetches your page to index your content. No human is involved. The bot reads your content, and that information eventually influences what the AI system knows and says. Citelayer®’s Bot Analytics feature handles this, detecting crawlers server-side by examining the HTTP User-Agent header.

An AI referral happens when a real human uses an AI tool — asking ChatGPT a question, searching Perplexity, getting a recommendation from Claude — and then clicks a link to your site. That person’s browser arrives at your site with evidence of where they came from, either in the Referrer header or in UTM parameters in the URL. Citelayer® AI Referral Tracking captures this client-side, in the browser, and records which AI source sent the visitor.

Why does the distinction matter? Bot visit volume and AI referral volume are completely decoupled. A bot might visit your site thousands of times without sending a single human visitor. A piece of content might generate referrals from ChatGPT without GPTBot ever having crawled the specific page that surfaced it. You need both data points to understand your real AI visibility.


AI Sources Detected

Citelayer® detects referrals from the following AI-powered platforms, identified by their domain in the browser’s referrer:

  • ChatGPT — chatgpt.com and chat.openai.com
  • Perplexity — perplexity.ai
  • Claude — claude.ai
  • Gemini — gemini.google.com and bard.google.com
  • Microsoft Copilot — copilot.microsoft.com
  • You.com — you.com
  • Phind — phind.com
  • Kagi — kagi.com
  • Andi — andi.com

The list covers the most significant AI search and chat platforms as of the current release. New sources are added in plugin updates as the landscape evolves.

Referrals are also detected when the utm_source parameter in the URL matches a known AI platform name. This catches cases where an AI tool adds UTM tracking to the links it surfaces.


How the Tracking Works

Citelayer® loads a small JavaScript snippet on your frontend — no external CDN, no third-party service, just a script served directly from your WordPress installation. When a visitor’s page loads, the script checks two things: the value of document.referrer and the utm_source query parameter.

If either matches a known AI source, the script sends a tracking event using navigator.sendBeacon(), which transmits the data without blocking the page load or affecting the visitor’s experience. If sendBeacon isn’t available in the visitor’s browser, the script falls back to fetch() with the keepalive option set.

The event goes to a REST API endpoint on your own server:

POST /wp-json/citelayer/v1/ai-referral

Before accepting any data, the endpoint performs a same-origin check — the landing URL in the payload must belong to your site. It also enforces a rate limit of one request per IP address per 10 seconds, preventing any single source from flooding the log.

Nothing about this process involves cookies, fingerprinting, or cross-site tracking. The script only fires when there is a detectable AI referral signal, not on every page load.


Privacy: How IP Addresses Are Handled

The referral log needs some mechanism to prevent duplicate events — for example, if a visitor refreshes the page or navigates within the site, you don’t want to count five referrals from the same visit. Citelayer® uses IP-based deduplication, but it never stores the raw IP address.

Instead, the IP is hashed using SHA-256 before being written to the database. The hash is stored solely for deduplication purposes and cannot be reversed to recover the original IP. The actual IP address is never written to disk.

This approach gives you accurate deduplication while maintaining a clear data minimization posture. There are no cookies involved, and the data that gets stored — landing URL, referral source, timestamp, and an irreversible hash — does not constitute personal data under standard interpretations of GDPR.


The AI Referrals Dashboard

Navigate to Citelayer® → Bot Analytics → AI Referrals to view your referral data. The tab is part of the Bot Analytics dashboard and shares the same time period filter (7d / 30d / 90d / All-time).

Stat Cards

Three cards give you the high-level picture:

  • Visits from AI — total AI referral events in the selected period
  • Top Source — the AI platform sending the most visitors
  • Trend — percentage change compared to the previous equivalent period. If the last 30 days brought 40 referrals and the 30 days before that brought 25, you see +60%.

Trend Chart

A daily breakdown chart shows referral volume over the past 30 days, similar to the bot visit trend chart. Spikes here often correlate with content being cited or recommended by a specific AI system.

Top Sources Breakdown

A ranked list of AI sources by referral count for the selected period. This answers “which AI platforms are actually sending people to my site?” — and the answer is often surprising. You may be getting Perplexity referrals without realizing it, or finding that Claude sends more visitors than ChatGPT despite ChatGPT having the larger user base.

Referral Log

Below the summary data, a paginated log shows individual referral events:

DateSourceLanding PageReferrer URL
2026-03-15 14:22ChatGPT/blog/ai-marketing-guide/https://chatgpt.com/

The log is sorted newest first and includes as much referrer detail as the browser passed. Some AI tools strip the specific URL from the referrer for privacy reasons, in which case you’ll see the root domain only. The utm_source parameter, when present, gives more specific attribution.


The Database Table

Referral events are stored in wp_citelayer_ai_referrals. The table is created during plugin activation and handles cleanup in line with your data retention preferences. Like the bot visit table, it is entirely local to your WordPress installation.


Combining Referral Data with Bot Analytics

The most useful analysis combines both datasets. A high bot visit count with low referral traffic means AI systems are reading your content but not citing it in a way that sends visitors. A high referral count with low bot visit counts is unusual but can happen when AI systems aggregate content from multiple sources and surface your site based on partial information.

Use AI Blind Spots to identify which pages are being missed entirely, and the AI Readiness Scanner to check whether technical issues are limiting your overall AI discoverability.