Skip to main content
The Pharos Pixel is a lightweight JavaScript snippet you add to your website once. After installation, every visit to your site is automatically checked for AI referral signals, and sessions that originated from platforms like ChatGPT, Perplexity, or Claude are recorded under your brand’s AI Traffic report. Unlike UTM-based attribution, the pixel detects AI referrals even when the visitor arrives without query parameters — using referrer analysis and bot-detection signals to classify each session accurately.

Find your pixel snippet

Each brand has a unique pixel tied to its brand ID. To get yours:
1

Open Pixel settings

In the sidebar, navigate to Settings, then click the Pixel tab.
2

Select your brand

Make sure the correct brand is selected in the sidebar brand switcher. The snippet is personalized to the selected brand — using a snippet from the wrong brand will attribute traffic incorrectly.
3

Copy the snippet

Click Copy next to the code block. The snippet is pre-filled with your brand ID.

Install the pixel on your website

Paste the snippet into the <head> section of every page on your site. Place it before the closing </head> tag, ideally as early as possible so it loads before other scripts.
<!-- Pharos Analytics -->
<script>
(function(w,d,s,id,bid){
  w.pharos=w.pharos||function(){(w.pharos.q=w.pharos.q||[]).push(arguments)};
  var js=d.createElement(s);js.async=1;js.id=id;
  js.src='https://cdn.pharos.ai/sdk/v1/pharos.min.js';
  js.setAttribute('data-brand-id',bid);
  var f=d.getElementsByTagName(s)[0];f.parentNode.insertBefore(js,f);
})(window,document,'script','pharos-analytics','YOUR_BRAND_ID');
</script>
<noscript><img src="https://cdn.pharos.ai/bot-detect?brand_id=YOUR_BRAND_ID&page=/" width="1" height="1" alt="" style="display:none"></noscript>
The snippet you copy from Settings → Pixel has your actual project URL and brand ID already filled in. Do not use the placeholder values shown above.
The <noscript> beacon at the end of the snippet is an image-based fallback that captures AI bot crawls even when JavaScript is disabled. Keep both the <script> and <noscript> tags together.

Install via Google Tag Manager

If your site uses Google Tag Manager instead of direct <head> edits:
1

Create a new tag

In GTM, go to Tags → New and choose Custom HTML as the tag type.
2

Paste the snippet

Paste the full Pharos snippet (including the <noscript> block) into the HTML field.
3

Set the trigger

Add a trigger and select All Pages. This ensures the pixel fires on every page view.
4

Publish the container

Submit and publish your GTM container to push the change live.

Advanced tracking

Beyond passive attribution, the pixel exposes a pharos() function you can call from your own JavaScript for conversions, user identity, and cross-domain tracking.
Call pharos('trackConversion', ...) when a user completes an important action. Pass the event name and an optional numeric value (for revenue tracking).
// Track a free signup
pharos('trackConversion', 'signup', 0);

// Track a paid purchase
pharos('trackConversion', 'purchase', 99.99);
Conversion events are associated with the session’s original referral source, so you can see which AI platforms drive not just visits but actual outcomes.

Verify your installation

After installing the pixel, confirm that it is working correctly before relying on the data.
1

Open the verification tool

Go to Settings → Pixel and scroll to the Verify Installation section.
2

Click Verify

Click the Verify button. Pharos checks for tracking events received from your brand in the last 24 hours.
3

Review the result

The result panel shows one of four states:
StatusMeaning
Pixel verified5 or more events in the last 24 hours — the pixel is working correctly.
Partial detectionFewer than 5 events, or only bot traffic — the pixel may not be on all pages.
Pixel not detectedNo events in the last 24 hours — check the installation steps below.
Verification errorPharos couldn’t reach its database — try again in a moment.
If the status is partial or not detected, the panel lists specific troubleshooting steps.
After installing the pixel, visit your own site from a regular browser to generate a test event. Wait a minute, then click Verify to confirm the event was received.

Common installation issues

  • No events detected: Confirm the snippet is in the <head> section of every page, not just the homepage. Open your browser’s developer console and check for JavaScript errors on load.
  • Partial detection: The pixel may be missing from some page templates. Check that your <head> snippet is in a shared layout component rather than individual pages.
  • CSP blocked: If your site has a Content Security Policy, add the Pharos SDK domain to your script-src and connect-src directives.
  • Tag Manager not firing: Verify the trigger is set to All Pages and that the container has been published, not just saved.

What data the pixel collects

The pixel records the following for each visit:
  • Referrer source — the domain or platform that sent the visitor (e.g., chatgpt.com, perplexity.ai)
  • Referrer type — categorized as AI, organic, direct, or other
  • Page visited — the URL of the page the visitor landed on
  • Timestamp — when the visit occurred
  • User agent — used for bot vs. human visitor classification
The pixel does not collect personally identifiable information unless you call pharos('identify', ...) explicitly.
To see AI traffic data after the pixel is installed, go to the AI Traffic page in the sidebar.