Foglift Tracker · v1.3.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
Citation-only competitors stop at “Cite.” The tracker captures the last step. When a human reads an AI answer and clicks through, the tracker 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
/pricingtells you ChatGPT cited that page for a pricing-related prompt. A visit from Perplexity landing on/integrationstells you which integration was being asked about. - Engine attribution. The matched referrer hostname identifies the engine. No guessing.
- Revenue-relevant. These are humans on your site, ready to convert.
Secondary · AI crawler visits
GPTBot, ClaudeBot, PerplexityBot, Google-Extended, and the broader AI fetcher set hitting your pages.
- Bot, path, timestamp. Each crawler hit records the matched bot name, the path that was fetched, and when.
- Early signal. A GPTBot crawl on a new product page is the leading indicator that a ChatGPT citation could follow.
- No human traffic. Crawler hits never pay off directly. They are the warmup, not the event.
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
One npm install per adapter. Set FOGLIFT_API_KEY in your environment and you are reporting. Generate a key at foglift.io/dashboard/settings.
npm
npm install @foglift/tracker
Next.js
// middleware.ts
import { trackAITraffic } from "@foglift/tracker/nextjs";
export const middleware = trackAITraffic({
apiKey: process.env.FOGLIFT_API_KEY!,
});
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({ apiKey: process.env.FOGLIFT_API_KEY! }));Node.js (any framework)
import http from "node:http";
import { createAITrafficTracker } from "@foglift/tracker/node";
const tracker = createAITrafficTracker({
apiKey: process.env.FOGLIFT_API_KEY!,
});
http
.createServer((req, res) => {
tracker.track(req);
res.end("ok");
})
.listen(3000);Multi-brand attribution
Multi-brand SDK installs on @foglift/tracker v1.3.0+ should pass brandId with the UUID from Dashboard → Developer → Your brands. The SDK sends it as brand_id; single-brand installs can omit it. The v1.3.0 npm publish is waiting on the 2FA-gated release step, so keep pinned v1.2 installs on the single-brand snippets until that publish completes.
trackAITraffic({
apiKey: process.env.FOGLIFT_API_KEY!,
brandId: process.env.FOGLIFT_BRAND_ID,
});Hosted browser pixel
For static sites and no-code builders, the hosted pixel captures AI engine referrals. Multi-brand users should include data-foglift-brand with the selected brand UUID; single-brand accounts can omit it.
html
<script async src="https://foglift.io/pixel.js" data-foglift-key="sk_fog_..." data-foglift-brand="BRAND_UUID"></script>
Cloudflare Workers is also a first-class adapter (@foglift/tracker/cloudflare). Full reference in the @foglift/tracker README on npm.
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 Tracker 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 and you can infer the prompt class the engine cited it for, without any extra instrumentation.
The crawler feed complements that signal. A new product page that starts attracting GPTBot crawls within hours of publish is a leading indicator that the engine has noticed it. A referral click a week later confirms the engine started recommending it. The full loop is the artifact: optimize, crawl, cite, click, then back into optimize with a better target.
FAQ
What does the tracker actually log per visit?
Three fields per matching request: the path the visitor landed on, the matched user-agent category (for crawlers) or matched referrer host (for human referrals), and a server-side timestamp. No cookies, no fingerprinting, no IP, no query string. Non-matching requests (the vast majority of your traffic) are never reported at all.
How is this different from Foglift's visibility scans?
Visibility scans ask the engines what they say about your brand. The tracker asks your own server what the engines did about your brand. The scan tells you whether ChatGPT cites you for 'best CRM for solo founders.' The tracker 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?
Free on the Growth plan and above. The free product tier includes scans but not the persistent tracker pipeline. Pricing is at foglift.io/pricing.
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?
Crawlers: GPTBot, ClaudeBot, PerplexityBot, Google-Extended, Amazonbot, Bytespider, and the long tail of named AI fetchers. Referrers: chatgpt.com, chat.openai.com, claude.ai, perplexity.ai, gemini.google.com, copilot.microsoft.com, notebooklm.google.com. Google AI Overview disambiguation on google.com referrers is intentionally out of scope for v1.3 and tracked for the next release.
Does the tracker 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). For fully static hosts that never see the request server-side, the package also ships a 1x1 pixel beacon (dist/pixel.js) you can embed in HTML; the same engine and referrer classifiers run on the beacon endpoint.
Get started
Install the tracker, set your API key, watch your AI referral feed start populating. Free on Growth and above.
Generate an API key