Advanced features

Track AI and search crawlers

AI assistants and search engines don't run JavaScript. Report their requests from your server to see when ChatGPT, Claude, Google and others read your pages.

AI assistants and search engines read your pages without running JavaScript, so the script never sees them. Your server can report them instead, and the dashboard's crawler card shows who reads what.

CategoryWhat it isExamples
AI answersFetched live because someone asked an assistantChatGPT-User, Claude-User, Perplexity-User, MistralAI-User
IndexingSearch engines, including AI searchGooglebot, bingbot, OAI-SearchBot, PerplexityBot, Claude-SearchBot, Applebot
TrainingCollecting text to train modelsGPTBot, ClaudeBot, Google-Extended, CCBot, Bytespider, Amazonbot

Report crawler hits

Send the user agent and path of each request to /api/v1/crawl with a website API key. Unknown user agents and static files are ignored, so you can send every request.

// proxy.ts (middleware.ts before Next.js 16)
import { NextResponse, type NextFetchEvent, type NextRequest } from "next/server";

const BOTS = /bot|crawler|spider|gpt|claude|perplexity|bytespider|ccbot|google-extended/i;

export function proxy(request: NextRequest, event: NextFetchEvent) {
  const ua = request.headers.get("user-agent") || "";
  if (BOTS.test(ua)) {
    // Report it without making the page wait.
    event.waitUntil(
      fetch("https://supranalytics.app/api/v1/crawl", {
        method: "POST",
        headers: { Authorization: `Bearer ${process.env.SUPRANALYTICS_API_KEY}`, "Content-Type": "application/json" },
        body: JSON.stringify({ user_agent: ua, path: request.nextUrl.pathname }),
      }).catch(() => {}),
    );
  }
  return NextResponse.next();
}

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

The crawler card's setup icon on the dashboard has the same snippets. Hide the card in Settings → General. Full reference: Crawler hits API.

AI agent or LLM? Read this page as Markdown