Skip to main content

Foglift Sensor · v1.4.0

Track AI engine referrals and AI crawler visits to your website.

Track AI crawler visits and AI engine referrals to your website. See which AI engines (ChatGPT, Claude, Perplexity, Gemini, Copilot) are crawling your content AND sending you human visitors.

The closed loop

OptimizeCrawlCiteClick

Citation-only competitors stop at “Cite.” The Sensor captures the last step. When a human reads an AI answer and clicks through, the Sensor records the engine that sent them and the page they landed on. That click is where intent becomes legible.

What it tracks

Primary · AI referral visits

Humans clicking through from ChatGPT, Claude, Perplexity, Gemini, and Microsoft Copilot answers.

  • Per-visit landing page. Each referral records the exact page the visitor opened. A visit from ChatGPT landing on /pricing is directional evidence of pricing intent. A pricing-related prompt is one hypothesis to compare against your monitored prompt set; the original prompt, answer, and citation surface remain unknown. A visit from Perplexity landing on /integrationssuggests integration intent without revealing which prompt or answer led to the click.
  • Engine attribution. The matched Referer hostname identifies the engine. Referrer-stripped clicks are not counted, so the number remains trustworthy instead of inflated by user-editable URL parameters.
  • Revenue-relevant. These are humans on your site, ready to convert.

Secondary · AI crawler visits

Model-development crawlers, search indexers, and user-requested live-answer fetchers hitting your pages.

  • Agent, purpose, path. Each fetch records the matched agent name, its documented role, the path that was fetched, and when.
  • Access evidence. A recognized crawler request shows that the agent reached the recorded path. It does not prove indexing, citation, or recommendation.
  • No human traffic. Crawler requests and referral clicks are separate observations. Use AI Visibility Checks to measure answers and citations.

The two halves are reported through one install. Visit dashboards render both feeds with sample data only; production dashboards render your own customer-side data with the same shape.

Install

Version 1.4.0 uses a hostname-bound, publishable workspace identifier and works on every plan. It is safe in source code and cannot read or change your account. Open AI Traffic while signed in to copy setup with your workspace identifier filled in.

npm

npm install @foglift/tracker@^1.4.0

Next.js

// middleware.ts
import { trackAITraffic } from "@foglift/tracker/nextjs";

export const middleware = trackAITraffic({
  siteToken: "YOUR_WORKSPACE_ID",
});

export const config = {
  matcher: ["/((?!_next/static|_next/image|favicon.ico).*)"],
};

Express

import express from "express";
import { trackAITraffic } from "@foglift/tracker/express";

const app = express();
app.use(trackAITraffic({ siteToken: "YOUR_WORKSPACE_ID" }));

Node.js (any framework)

import http from "node:http";
import { createAITrafficTracker } from "@foglift/tracker/node";

const tracker = createAITrafficTracker({
  siteToken: "YOUR_WORKSPACE_ID",
});

http
  .createServer((req, res) => {
    tracker.track(req);
    res.end("ok");
  })
  .listen(3000);
Legacy API-key compatibility and multi-brand attribution

Existing API-key installs remain supported. Multi-brand API-key installs should pass brandId; the SDK sends it as brand_id. New installs should use the public siteToken path above.

trackAITraffic({
  apiKey: process.env.FOGLIFT_API_KEY!,
  brandId: process.env.FOGLIFT_BRAND_ID,
});
Manage legacy API keys

Hosted browser pixel

For static sites and no-code builders, the hosted browser pixel uses a public workspace identifier. The browser pixel records recognized AI answer referrals and can record a recognized agent visit when that agent executes the page JavaScript. Classic non-JavaScript crawler requests still require server logs, edge logs, middleware, or a server-side Sensor. Multi-brand users should include data-foglift-brand with the selected brand UUID; every no-key pixel install should set this public identifier.

html

<script async
  src="https://foglift.io/pixel.js"
  data-foglift-brand="BRAND_UUID"></script>

Wix: Install Foglift AI Tracking

Open Connections, choose Install Wix app, and approve the Wix consent screen. Foglift uses Wix's sanctioned embedded-script app channel and binds automatically when the site domain exactly matches the workspace domain; otherwise Foglift can bind the installed site manually.

The Wix app measures recognized AI referral clicks and visits from JavaScript-executing agents. Classic crawler-request capture is platform-dependent and still under evaluation.

Open Connections

WordPress or another nginx-backed site

Use the nginx mirror install to record crawler requests before a page cache can hide them. It sends a bodyless, non-blocking copy of only recognized crawler requests and never forwards the query string.

Open the nginx mirror install guide

Cloudflare Worker

Already behind Cloudflare? Deploy the first-class edge adapter to observe recognized crawler requests and AI referrals before they reach your origin. It passes traffic through unchanged and uses the same publishable workspace identifier.

Why it matters

Most AI search platforms answer one question: which engines cite your brand? That is useful, but it stops one step before the part you can actually compound on. The Foglift Sensor closes the loop. When a ChatGPT or Perplexity user clicks through to your site, the engine and the landing page are recorded. Pair the landing page with the content on that page to form hypotheses about intent clusters. Referral data does not reconstruct the original prompt, answer, or citation surface. Compare repeated path patterns with a fixed AI Visibility prompt panel for answer-level evidence.

The crawler feed answers a narrower question: which recognized agents reached which paths? It does not establish that a page was indexed, cited, recommended, or affected by an optimization. Pair that access evidence with AI Visibility Checks for answer-level evidence and the referral feed for click-level evidence.

FAQ

What does the Sensor actually log per visit?

Three fields per matching request: the path the visitor landed on, the matched user-agent category (for crawlers) or matched Referer host (for human referrals), and a server-side timestamp. No cookies, no fingerprinting, no IP, no full query string. Non-matching requests (the vast majority of your traffic) are never reported at all.

How is this different from Foglift's AI Visibility Checks?

AI Visibility Checks ask the engines what they say about your brand. The Sensor asks your own server what the engines did after those answers appeared. AI Visibility monitoring tells you whether ChatGPT cites you for 'best CRM for solo founders.' The Sensor tells you that a human reading that ChatGPT answer clicked through and landed on your /pricing page. Two halves of the same loop.

What pricing tier do I need?

The public workspace-token install works on every plan, including Free. The workspace identifier is publishable and hostname-bound; it cannot access account data. Sensor event limits follow your plan. Existing secret API-key installs remain supported as a legacy path.

Which frameworks are supported?

Next.js (middleware), Express (app.use), generic Node.js HTTP servers, and Cloudflare Workers ship as first-class adapters. Any other runtime can call the underlying classification functions (detectAICrawler, detectAIReferrer) directly and POST the visit yourself; both are exported from the package root.

Which crawlers and referrer hosts are detected?

Agents: GPTBot and ClaudeBot for model development; OAI-SearchBot, Claude-SearchBot, PerplexityBot, Googlebot, and bingbot for indexing; ChatGPT-User, Claude-User, Perplexity-User, and other live-answer fetchers for user-requested retrieval. Multipurpose crawlers and site-owner-requested agent crawls stay distinct instead of being forced into those categories. Referrers: chatgpt.com, chat.openai.com, claude.ai, perplexity.ai, gemini.google.com, copilot.microsoft.com, notebooklm.google.com. A live-answer fetch means the page was pulled while answering a user; it is citation-proximate, not proof that the answer cited the page.

Does the Sensor work for static sites or marketing pages on a CDN?

Yes for any runtime that lets you see the request (Next.js middleware on Vercel, a Cloudflare Worker, an Express proxy in front of static assets). These server or edge paths record recognized crawler requests and AI referral clicks. For fully static hosts, the hosted browser pixel uses a public workspace identifier. The browser pixel records recognized AI answer referrals and can record a recognized agent visit when that agent executes the page JavaScript. Classic non-JavaScript crawler requests still require server logs, edge logs, middleware, or a server-side Sensor.

Get started

Open AI Traffic to copy setup with your workspace identifier filled in, then verify the first recognized request. The public-token path works on every plan; Sensor event limits follow your account plan.

Open AI Traffic