Why on the server
GPTBot, ClaudeBot, PerplexityBot, Google-Extended and most other crawlers fetch the HTML and leave. They appear in your server logs, not in JavaScript analytics. CortIQ classifies each request as a training crawler, agentic fetch or citation crawler with the same registry the browser script uses.
Three signals are reported: requests with a bot or agent user agent, fetches of /robots.txt, /llms.txt and /llms-full.txt, and hits on a hidden honeypot link that robots.txt tells crawlers to skip. A honeypot hit means the visitor ignores robots.txt, whatever its user agent claims.
AI agents that run inside a normal browser and send a standard Chrome user agent cannot be identified from the request alone; the browser script measures those after consent.
Pick your adapter
- Next.js / Vercel (incl. v0 apps):
middleware.tswith the dependency-free cortiq-server.mjs helper. - Netlify (incl. static exports from Lovable or Bolt): an Edge Function with the same helper.
- Cloudflare: the Worker, for any site behind Cloudflare. It adds the honeypot link and the
robots.txtline itself. - Node / Express:
app.use(cortiqExpress(createCortiq({ siteKey })))from the helper. - WordPress: built into the plugin from 5.5.0, on by default once the Tracking ID is set.
- Any other server: POST to the HTTP endpoint below.
The dashboard (Install tracking → Server-side agent measurement) shows each snippet with your tracking key filled in, and whether server-side data has arrived.
// Next.js middleware.ts (Next.js 16: proxy.ts, export function proxy)
import { NextResponse, type NextRequest, type NextFetchEvent } from 'next/server';
import { createCortiq } from './lib/cortiq-server.mjs';
const cortiq = createCortiq({ siteKey: process.env.CORTIQ_SITE_KEY });
export function middleware(request: NextRequest, event: NextFetchEvent) {
const waitUntil = (p: Promise<unknown>) => event.waitUntil(p);
if (cortiq.isTrap(request)) return cortiq.trapResponse(request, waitUntil);
cortiq.report(request, { waitUntil });
return NextResponse.next();
}Honeypot link for your HTML template (Next.js, Netlify, Node, any server), plus Disallow: /cortiq-trap/ in robots.txt:
<a href="/cortiq-trap/" rel="nofollow" tabindex="-1" aria-hidden="true" style="position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden">.</a>HTTP endpoint
Authenticate with the site's tracking key (tk_…). Every hit's host must belong to that site; hits for other hosts are rejected. Up to 100 hits per request.
POST https://cxmkdtgfocgbfizawlwa.supabase.co/functions/v1/server-hit
Authorization: Bearer tk_…
Content-Type: application/json
{"hits":[{"url":"https://example.com/page","userAgent":"Mozilla/5.0 (compatible; GPTBot/1.2)","ip":"203.0.113.0","status":200}]}What leaves your server, and what is stored
- Only agent-like requests, the watched files and honeypot hits are sent. Ordinary human requests stay on your server.
- The adapter cuts the IP to its network (/24 for IPv4, /48 for IPv6) and drops the query string before sending.
- CortIQ stores AI-registry bots and honeypot visitors: URL path, user agent, referrer, truncated IP and time. Other requests are discarded. The truncated IP is cleared after 30 days; rows follow the site's retention (default 365 days).
Nothing is stored on the visitor's device and no code runs in the browser: the adapter only uses the HTTP request your server already receives. In our assessment this is not storage of, or access to, information on the visitor's device under ePrivacy Art. 5(3) (Swedish LEK chapter 9, section 28), so cookie consent is not required for it. This is not settled: the EDPB's Guidelines 2/2023 read "gaining access" broadly, including IP addresses and HTTP headers, and a supervisory authority may take a different view. The request data is personal data under the GDPR. As controller you need a legal basis – typically legitimate interest (Art. 6(1)(f)) backed by a documented balancing test – and your privacy policy must state the interest and the visitor's right to object (Art. 13 and 21). Public authorities cannot rely on legitimate interest for processing in the performance of their tasks. You make the final assessment for your site. See the privacy policy.