RP
RevenueProven
All Docs
AI Discovery Pixel: CSP and Deployment Details

AI Discovery Pixel: CSP and Deployment Details

The AI Discovery pixel sends events to Revenue Proven when AI assistant traffic is detected. This guide covers Content Security Policy directives, single-page app support, and ad-blocker behavior.

The AI Discovery pixel is a small JavaScript snippet you embed on the pages you want to measure. On each page load it checks the referring URL for known AI assistants, ChatGPT, Claude, Gemini, Perplexity, and Copilot, and when a match is found, sends a single event to Revenue Proven. The script fires once per page load and maintains no persistent state on your site.

AI Discovery pixel settings showing the snippet and verification status
Copy the snippet from AI Discovery > Pixel Settings and paste it into the <head> of every page you want to measure.

Where the pixel sends data

The pixel script loads from revenueproven.com. When it detects an AI referral, it sends the event to the collection endpoint at your own origin by default. The event payload includes the referring AI source, your landing page URL, a persistent visitor identifier stored in a first-party cookie, and the secure account token. No visitor personal information is included.

Content Security Policy directives

If your site uses a Content Security Policy header, add the following directives to allow the pixel to run and send data.

  • script-src: include the origin you load the pixel from (your own domain if you self-host the snippet, or revenueproven.com if you load it from Revenue Proven directly)
  • connect-src: include 'self' so the pixel can POST events to the collection endpoint on your own site
  • img-src and frame-ancestors: no changes required

Single-page app support

The pixel records the page load it fires on. In a single-page app, in-app route changes do not re-run the snippet automatically. To capture per-route events in an SPA, call the snippet evaluation on each route change inside your router, for example in a Next.js App Router layout effect or a Vue router afterEach hook. The snippet exits immediately when there is no AI referrer, so calling it on every route change has negligible performance cost.

Ad blockers and privacy extensions

Some privacy extensions block first-party tracking scripts. This rarely affects production traffic at meaningful scale, but it can interfere with your own verification testing. Use a clean browser profile or incognito with extensions disabled when verifying the pixel is working before going live.

Bot filtering

Revenue Proven applies bot filtering and event deduplication at the collection endpoint. Known crawlers and automated tools are dropped before they reach storage so they do not inflate your AI referral counts.

Related Reading

See "AI Discovery Pixel" for installation steps and authentication details.