Skip to main content
Use a Vercel Drain to forward production Static and Runtime request logs to Crawler Analytics.

Before you start

You need:
  • a Vercel Pro or Enterprise team with permission to manage Drains;
  • a production project serving the hostname configured for the Qwairy brand;
  • access to Measure > Crawler Analytics > Settings;
  • a secure place to retain the one-time connector secret.

Create and protect the key

  1. In Crawler Analytics settings, select Vercel.
  2. Select Create Key.
  3. Enter a name and the IANA time zone that should define daily snapshots.
  4. Copy the secret when it appears. It cannot be displayed again.
  5. Keep it in the Vercel Drain configuration or another restricted secret store. Do not include it in a URL, repository, or client-side variable.
To rotate the key, create a replacement, update the Drain header, confirm delivery, and then delete the previous key. An integration can have up to five active keys.

Configure the drain

  1. In the Vercel dashboard, open Team Settings > Drains > Add Drain.
  2. Choose a custom log destination and set the data type to Logs.
  3. Select JSON format.
  4. Select the Production environment.
  5. Include Static and Runtime sources.
  6. Set the endpoint to:
  7. Add this custom header, using the secret copied from Qwairy as its value:
    Existing Drains that use x-qwairy-token remain compatible. Prefer X-API-Key for new configurations.
  8. Keep production traffic at 100% sampling, or add no sampling rule. A lower sampling rate produces partial counts.
  9. Save the Drain.
See the Vercel Log Drains reference for the current provider controls and schema.

Test delivery

Use Vercel’s destination test to check the endpoint and header. That test may not contain an accepted crawler request, so it does not by itself move the Qwairy connector to connected. Then request an allowed path on the monitored production hostname with a recognized crawler User-Agent. For example, replace the URL below with a safe path on your site:
Confirm that the Vercel Drain reports successful delivery. In Qwairy, the connector changes from pending after the rollup pipeline accepts an event for the configured hostname.

Limits, sampling, and cost

  • Vercel cannot restrict this Drain by User-Agent. It forwards matching Static and Runtime traffic, and Qwairy discards non-AI requests on receipt.
  • Forwarded human traffic can still count toward Vercel delivery volume and provider charges. Review current Vercel pricing before enabling the Drain on a high-volume site.
  • Any Vercel sampling rule below 100% makes Crawler Analytics totals partial.
  • Qwairy applies shared event, request, and daily ingestion ceilings described on the Crawler Analytics overview.

Troubleshooting

  • Destination test fails: check the HTTPS endpoint, the X-API-Key or legacy x-qwairy-token header name, and the one-time secret.
  • Drain succeeds but Qwairy stays pending: verify that Static and Runtime production sources are selected, then send a current GET or HEAD request with a recognized crawler User-Agent to the configured brand hostname.
  • Counts are lower than Vercel logs: check sampling rules, environment selection, source selection, Qwairy exclusion rules, and delivery continuity warnings.
  • Counts differ from all request traffic: only classified AI crawler requests enter Crawler Analytics; other rows are intentionally discarded.
  • Provider delivery errors continue after rotation: confirm that the Drain uses the replacement key before deleting the old one.