Next.js integration

One snippet in your middleware.
Every AI visit, captured.

Next.js runs your code on every request, so it's the perfect place to measure AI agents. Drop in our middleware (proxy.ts on Next 16) and each request fires a background event to Arrivl — no impact on your render.

Available today

A single middleware file and an environment variable. Your AI coding agent can wire it in from our prompt.

About 5 minutesNo proxy, no DNSRuns server-sideZero render impact

Setup, start to finish

Three steps
Five minutes

Add your website key

Drop ARRIVL_WEBSITE_KEY into your environment.

Paste the middleware

Arrivl hands you the exact middleware (or proxy.ts on Next 16). It fires a background event on each request.

Deploy & verify

Ship it, click Verify, and watch your first AI visit land in the dashboard.

Next step

Wire it into Next.js and see your first AI visit

See all the ways to connect →

Get started