Requirements
- A Vercel plan that includes Drains, and permission to create one for your team.
- The Vercel project that serves the domain the source is created for.
Set up
1
Create the source in Quotable
In Agent Analytics, select Connect source, choose Vercel Log Drain and select Generate credentials. Keep the wizard open: you’ll paste values in both directions.
2
Create the drain in Vercel
In your Vercel team settings, create a log drain:
- Data: logs.
- Projects: only the project that serves this domain.
- Sources: the request log sources (static files, functions, edge, external rewrites). Build logs aren’t request traffic and are dropped as
not_http_traffic. - Environment: production. Preview traffic is dropped unless you opt in (below).
- Delivery format: JSON or NDJSON. Both are accepted.
- Endpoint URL: the endpoint URL from the wizard.
- Custom header:
Authorizationwith the valueBearer aa_live_….
3
Map the Vercel project in Quotable
Under Vercel project mapping in the wizard, fill in:
- Vercel project id: the
prj_…ID of the project. Logs from any other Vercel project are then dropped asproject_mismatch. - Drain verification key: the key Vercel shows while you create the drain. Quotable returns it in the
x-vercel-verifyheader, which is how Vercel confirms the endpoint is yours. - Include preview deployments: leave off unless you want preview traffic counted.
4
Confirm delivery
Select Check now in Quotable. Vercel delivers within seconds of a request.
Preview deployments
By default, only production traffic is counted. A preview deployment is a different site with a different audience, and its crawls would distort your production numbers. Records from other environments are dropped asenvironment_filtered.
To count previews, turn on Include preview deployments in the project mapping and select Save mapping.
Test the endpoint
The wizard shows acurl command with the x-agent-analytics-test: 1 header. It proves the token and endpoint work and shows how a GPTBot request is classified, without storing anything. See Test deliveries.
Rotate the token
- Rotate the token in Quotable. The old token stops working immediately.
- Update the
Authorizationheader of the drain in Vercel.
Disconnect
Delete the drain in Vercel, then disconnect the source in Quotable.Troubleshooting
Next steps
Read the dashboard
What to look at once data arrives.
Troubleshooting
Fix deliveries that fail or arrive empty.