Vercel setup for server-side tracking
Connect Vercel request logs to Cleotic to detect AI crawlers and referrals on eligible production pages. This captures requests without depending on the visitor running your tracking snippet.
You need a deployed Vercel site, permission to manage its team's drains, and a Cleotic tracking site for its domain. Vercel Drains require a Pro or Enterprise plan. See Vercel Drains for availability and pricing.
1. Get your Cleotic endpoint
- Open Project Settings -> Tracking setup.
- Choose Connect a site, select Vercel, and enter the domain. For an existing site, open its connection panel.
- In Connect, copy the Vercel Log Drain endpoint, which ends in
/vercel.
Copy the endpoint from your site record. Do not substitute the general Cleotic API address.
2. Configure the Vercel drain
In Vercel, open Team Settings -> Drains -> Add Drain and choose Logs. Configure:
- Only the project serving your tracked domain.
- Production environment and log sources that include page requests.
- Custom Endpoint, using the Cleotic URL.
- JSON or NDJSON format.
- A signature verification secret, keeping the generated value or setting your own.
Keep full sampling for the traffic you want to measure. Sampling or path exclusions reduce the evidence Cleotic receives. Vercel documents these options in Using Drains.
Create the drain. Vercel tests the endpoint during creation.
3. Save the matching secret
Copy the drain's signature verification secret. In Cleotic's Connect step, paste it into Paste Vercel signature secret and click Save, then Finish setup.
Cleotic requires this secret to verify incoming log batches, even though Vercel makes signature configuration optional. If you rotate it in Vercel, update Cleotic too.
4. Verify collection
Check the drain's delivery status in Vercel. Then request a real public HTML page on the tracked production domain. Cleotic filters out preview traffic, assets, APIs, redirects, and failed requests.
To test crawler detection, replace the URL below with a public page that returns a successful response without redirecting:
curl -A "Mozilla/5.0 (compatible; GPTBot/1.0; +https://openai.com/gptbot)" \
https://your-domain.com/your-public-page
This creates synthetic crawler-labelled traffic. It tests ingestion, not a real OpenAI visit. Allow for provider delivery and processing, then check Sources -> AI traffic with the matching date range and domain.
Troubleshoot
| Symptom | Check |
|---|---|
401 drain secret not configured | Save the secret in Cleotic |
401 invalid signature | Use the same secret in Vercel and Cleotic |
404 tracking site not found | Copy the endpoint from the current tracking site |
413 request entity too large | Contact support with the delivery error |
| Delivery succeeds but no AI events appear | Confirm the requests contain an AI signal and pass the domain, environment, and page filters |
| No page traffic arrives | Check project selection, sources, sampling, and provider delivery |
A successful verification request checks the endpoint connection; it does not establish that production traffic is arriving. Ordinary pageviews can contribute to the total without creating crawler or referral rows.
Stop or change tracking
Pause or remove the drain in Vercel to stop forwarding. Pausing the tracking site in Cleotic preserves its configuration but drops incoming data. Neither resumes or backfills visits missed while collection was stopped.