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

# Vercel

> Integrate Siteline with Vercel Log Drains

Use [Vercel Log Drains](https://vercel.com/docs/observability/log-drains) to forward server-side request logs directly to Siteline. No code changes required — configuration is done entirely through the Vercel dashboard. Log drains run outside your application's request path, so there is zero impact on site performance.

## Prerequisites

* A [Siteline website key](/authorization)
* A Vercel account with your project deployed

<Info>
  Log Drains are available on Vercel's **Pro** and **Enterprise** plans. See [Vercel Drains pricing](https://vercel.com/docs/drains#usage-and-pricing) for details.
</Info>

## Setup

<Steps>
  <Step title="Open Log Drains settings">
    In the [Vercel Dashboard](https://vercel.com/dashboard), navigate to your project's **Settings** > **Log Drains** and click **Add Log Drain**.
  </Step>

  <Step title="Select drain type">
    Choose **Custom HTTP Endpoint** as the drain type.

    <img src="https://mintcdn.com/gptrends/nGw-xAI4h9k0wsyT/images/add_drain.png?fit=max&auto=format&n=nGw-xAI4h9k0wsyT&q=85&s=432609eafaa33777fa26a3eb96c55b54" alt="Add drain" style={{ width:"60%" }} width="706" height="369" data-path="images/add_drain.png" />
  </Step>

  <Step title="Select data sources">
    Select **Logs** as the data to drain.

    <img src="https://mintcdn.com/gptrends/nGw-xAI4h9k0wsyT/images/select_logs.png?fit=max&auto=format&n=nGw-xAI4h9k0wsyT&q=85&s=9634d8d0578550fed1683932e048e95f" alt="Select logs" width="1478" height="578" data-path="images/select_logs.png" />
  </Step>

  <Step title="Configure the drain">
    Fill in the following fields:

    * **Drain Name**: `Siteline Agent Analytics`
    * **Projects**: Select your website project
    * **Sources**: Select all except `Builds`
    * **Environment**: `Production`
    * **Sampling Rate**: `100%`
  </Step>

  <Step title="Set the endpoint URL">
    Enter the following URL, replacing the placeholder with your Siteline website key:

    ```
    https://api.siteline.ai/v1/intake/vercel-log-drain?websiteKey=YOUR_WEBSITE_KEY
    ```
  </Step>

  <Step title="Save">
    Click **Create Drain** to activate. Vercel will begin forwarding logs immediately.
  </Step>
</Steps>

## How it works

Vercel Log Drains stream server-side request logs to an external HTTP endpoint in real time:

1. AI agents, bots or humans make requests to your Vercel-hosted site
2. Vercel processes the request and generates a log entry
3. The log entry is forwarded to the Siteline intake endpoint in the background
4. Siteline identifies AI agent visits and human referral traffic and surfaces it in your Agent Analytics dashboard

Your website's response time is unaffected — log drains operate asynchronously after the response is sent.

## Endpoint parameters

<ResponseField name="websiteKey" type="string" required>
  Your Siteline website key, passed as a query parameter in the endpoint URL.
</ResponseField>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Log drain not sending data">
    Verify the drain is active in **Settings** > **Log Drains**. Check that the endpoint URL includes your website key and that the drain status shows **Active**.
  </Accordion>

  <Accordion title="Only seeing some requests">
    Ensure **Sampling Rate** is set to `100%` and that `Builds` is the only source excluded.
  </Accordion>

  <Accordion title="How do I find my website key?">
    Navigate to **Agent Analytics** in your Siteline workspace and click **Manage Configuration** to view or regenerate your key.
  </Accordion>

  <Accordion title="How do I update the endpoint URL?">
    In **Settings** > **Log Drains**, delete the existing drain and create a new one with the updated URL.
  </Accordion>
</AccordionGroup>

<Tip>
  **Need help?** [Book a setup call](https://cal.com/team/siteline/tech-set-up) and we'll walk you through it.
</Tip>
