Skip to content
Sommet
Esc
↑↓navigate↵open⌘Jpreview
On this page

Vercel

Send your Vercel request logs to a Sommet drain URL to count ChatGPT, Gemini, Claude, Perplexity, Copilot and other AI bot visits in near real time.

Vercel can push the logs of your projects to an HTTP endpoint, called a drain. Sommet gives you a secret drain URL and counts the AI bot requests in each delivery.

Drains are available on the Vercel Pro and Enterprise plans. On Hobby, put the Cloudflare proxy in front of your site, or use a custom drain from your app.

Connect

Start a drain in Vercel

Open your team in Vercel, then Settings → Drains → Add Drain and choose Logs.

  • Projects: the project that serves your domain.
  • Sources: the ones that serve requests: static files, functions and middleware. Leave out builds.
  • Environments: Production.
  • Sampling rate: 100 %. A lower rate lowers the counts by the same ratio.

Choose a custom HTTP endpoint as the destination. Vercel shows a verification code. Copy it and keep this tab open.

Create the drain URL in Sommet

In Sommet, open Settings → AI bot visits, choose Vercel and paste the verification code. Select Create a drain URL, then copy the Drain URL.

Finish the drain in Vercel

Paste the drain URL as the endpoint. Choose JSON or NDJSON as the format and leave compression off. Vercel calls the URL to verify it: Sommet answers with your verification code in the x-vercel-verify header.

The overview shows “Last logs received” after the first delivery. A delivery arrives every few seconds to every few minutes, depending on your traffic.

Notes

  • Vercel can log one request several times, once per runtime that served it. Sommet counts each request ID once.
  • Vercel retries failed deliveries. Sommet drops a request ID it already counted in the last 6 hours.
  • If you change the verification code, paste the new one in Change source and select Save. The drain URL stays the same.
  • Switching between Vercel and a custom drain keeps the same URL. Switching to Cloudflare deletes it.

Was this page helpful?