DataSag guides · Updated 27 October 2026

Measure AI referral traffic on your website

AI referral analytics groups tracked visits with recognizable assistant referrers or supported campaign signals. It does not measure every recommendation or citation, because many answers produce no click and some clicks lose their source signals. Campaign labels are self-declared.

Before you start

Install the DataSag script once on the pages you intend to measure. Use the public key from the project you are inspecting. Publish your change, then test the public domain rather than relying on an editor preview.

Account credentials, database credentials and provider API keys do not belong in the tracking snippet. Keep existing consent controls in place. Report availability depends on your current plan and provider connections.

Measure AI referral traffic: step by step

  1. Verify ordinary pageview collection before investigating AI traffic. Without a working tracker on the landing page, missing referrals cannot be interpreted.
  2. In DataSag, open the project's AI visibility report and use its traffic source option to analyze AI referrals from tracked visits. The current traffic analysis uses a 90-day window.
  3. Inspect landing pages and the available referrer evidence. A recognized AI referrer indicates an observed arrival, not the exact question, answer position or number of people who saw the answer.
  4. Keep tagged campaigns separate from observed referrers. A manually created UTM link can test collection but cannot demonstrate an organic AI recommendation.
  5. Use a saved prompt with an explicitly selected provider to inspect answer citations separately. DataSag's OpenAI test uses an API response with web search, not a direct observation of the ChatGPT consumer app.
  6. Record the prompt, model or provider, date, cited URL and whether a click was observed. Compare repeated tests using a fixed question set and report the sample size.
document.referrer
// Inspect on the landing page after an actual external click.
// An empty string does not identify the acquisition source.

What a successful check looks like

Traffic reports describe observed visits. Prompt tests describe observed API answers and citations. Neither is presented as a complete share of AI recommendations.

Record the tested URL, date, browser state and observed request. Repeat on a nested page to check the shared installation. Keep the evidence so you can distinguish a later regression from a report-filter change.

Common mistake

Direct traffic is not a reliable substitute for missing AI referrers. Apps, browser policies, copied links and redirects can all remove referral information.

Find your platform's installation point

Related checks

Understand search and AI visibility · Get setup help