> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devtune.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect a Vercel log drain

> Measure AI crawls, answer fetches and 404 demand on your Vercel projects with a log drain. No code changes.

A Vercel log drain sends DevTune the requests that AI crawlers and answer fetchers make to the projects you choose, with no code changes. The drain filters on Vercel's side, so other visitors' requests never leave Vercel. It covers production deployments only.

## Before you start

* A paid plan that includes AI Traffic, and project management permission. See [Set up AI Traffic](https://docs.devtune.ai/ai-traffic/setup.md#before-you-start).
* A Vercel Pro or Enterprise team.
* **IP Address Visibility › Show in Log Drains** turned on in your Vercel team's settings. **Show in Vercel Dashboard** doesn't affect the drain.

## Connect Vercel

1. In **Settings › Integrations**, find **Vercel** under **Crawler sensors** and select **Set up**.
2. Select **Connect Vercel**, approve DevTune's integration on Vercel, and choose the team and the projects it can access.
3. Back in DevTune, choose the **Vercel projects** to measure and select **Create drain**.
4. DevTune tests delivery and creates the drain. Each host the drain reports is listed with the sensor that counts it.

A host that Cloudflare pull or edge middleware already reports stays on that sensor, and the drain's requests for it are dropped, so no request is counted twice.

## Check the drain is working

1. Request a page on a chosen project's production domain with a crawler user agent. Replace the address with your own:

   ```bash theme={null}
   curl -A "GPTBot/1.3" https://www.example.com/
   ```

2. In **Settings › Integrations**, reload the page. Within a few minutes the **Vercel** row changes from **Waiting for data** to **Active**, with **Last ingest** and a time, and the host appears under **Host**.

3. Don't expect the test request in the verified totals. It didn't come from OpenAI's network, so it isn't counted as a verified crawl.

## Client IP addresses

DevTune checks each crawler's address against its operator's published networks, then discards it. Keep **Show in Log Drains** on. With it off, Vercel still delivers the requests but without client addresses, so every AI request is stored with its identity unknown. See [crawler identity checks](https://docs.devtune.ai/ai-traffic/advanced-setup.md#crawler-identity-checks) for what each verdict means.

## If something goes wrong

| Symptom | What to do |
| - | - |
| The test request doesn't show up | Request a chosen project's production domain. The drain covers production deployments only, so a request to a preview URL doesn't show up. |
| The Vercel panel tells you to turn on **Show in Log Drains** | Vercel is hiding client addresses. Turn on **IP Address Visibility › Show in Log Drains** in your Vercel team's settings. The notice clears with the next request that carries an address. |
| Requests arrive with their identity unknown behind another CDN | If another CDN, such as Cloudflare or Fastly, sits in front of Vercel, the address Vercel records is the CDN's, so those requests can't be verified. Connect [Cloudflare](https://docs.devtune.ai/ai-traffic/cloudflare.md) to measure that CDN directly. |

## Disconnect Vercel

Select **Manage**, then **Disconnect Vercel**. DevTune deletes the drain on Vercel. If Vercel no longer accepts DevTune's access, delete the DevTune drain in your Vercel team's **Drains** settings.

## Next steps

* **[Set up AI Traffic](https://docs.devtune.ai/ai-traffic/setup.md)** - connect website analytics, Search Console and the tracking snippet
* **[Reading AI Traffic](https://docs.devtune.ai/ai-traffic/dashboard.md)** - what each view counts
* **[Crawler identity checks](https://docs.devtune.ai/ai-traffic/advanced-setup.md#crawler-identity-checks)** - what each verdict means


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.