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

# Vercel Integration

> Set up AI Traffic Analytics with Vercel Log Drains to track how AI agents interact with your Next.js, React, or static sites.

## Vercel Log Drain Integration

Connect GrowthOS AI Traffic Analytics to your Vercel deployment using Vercel's log drain feature to monitor AI agent crawl behavior and optimize your content visibility.

<Warning>
  This integration requires a Vercel Pro or Enterprise plan to access log drain functionality.
</Warning>

## Prerequisites

Before getting started, ensure you have:

* An active GrowthOS account
* Admin access to your Vercel account
* Vercel Pro or Enterprise plan
* Your website domain verified in GrowthOS

## Integration Setup

Follow these steps to connect your Vercel project with GrowthOS AI Traffic Analytics:

### Step 1: Start in GrowthOS

<Steps>
  <Step title="Navigate to AI Traffic Analytics">
    1. Log in to your GrowthOS dashboard
    2. Navigate to **AI Traffic Analytics**
    3. Click on **Vercel** integration option
  </Step>

  <Step title="Enter your domain">
    Enter your website URL in the input field provided.

    <Tip>
      Make sure to use the exact domain that's deployed on Vercel (e.g., `https://yourdomain.com`)
    </Tip>
  </Step>

  <Step title="Continue setup">
    Click **Continue** to proceed to the Vercel configuration steps.
  </Step>
</Steps>

### Step 2: Configure Vercel Log Drains

<Steps>
  <Step title="Access Project Settings">
    1. Open your Vercel dashboard
    2. Navigate to your project
    3. Go to **Project Settings**
  </Step>

  <Step title="Navigate to Log Drains">
    In the Project Settings sidebar, click on **Log Drains**.
  </Step>

  <Step title="Add new log drain">
    Click the **Add Log-Drain** button to create a new log drain configuration.
  </Step>

  <Step title="Select Custom Log Drain">
    Choose **Custom Log Drain** from the available options and click **Continue**.
  </Step>

  <Step title="Configure project scope">
    1. Select **Specific Projects**
    2. Choose the project you want to monitor for AI traffic

    <Info>
      You can monitor multiple projects by creating separate log drains for each one.
    </Info>
  </Step>

  <Step title="Configure log sources">
    Select both **Static** and **Function** as your log sources to capture complete AI agent interactions.
  </Step>

  <Step title="Set environment">
    Select **Production** as the environment to monitor live AI traffic patterns.

    <Warning>
      Only production traffic provides accurate AI agent behavior data.
    </Warning>
  </Step>
</Steps>

### Step 3: Connect GrowthOS Endpoint

<Steps>
  <Step title="Copy GrowthOS endpoint URL">
    Return to your GrowthOS setup tab and copy the **Endpoint URL** provided in the integration setup.
  </Step>

  <Step title="Paste endpoint in Vercel">
    Back in Vercel, paste the copied endpoint URL into the endpoint input field.
  </Step>

  <Step title="Enable custom headers">
    Toggle on **Custom Headers** in the Vercel log drain configuration.
  </Step>

  <Step title="Add authentication headers">
    You'll need to add two custom headers:

    1. **Header Key**: Copy from GrowthOS and paste into Vercel
    2. **Header Value**: Copy from GrowthOS and paste into Vercel

    <Check>
      These headers authenticate your log drain with GrowthOS securely.
    </Check>
  </Step>

  <Step title="Save log drain configuration">
    Click **Add** to save your log drain configuration in Vercel.
  </Step>
</Steps>

### Step 4: Complete Verification

<Steps>
  <Step title="Copy verification header">
    Vercel will generate an `x-vercel-verify` header. Copy this verification token.
  </Step>

  <Step title="Submit verification in GrowthOS">
    1. Return to your GrowthOS setup
    2. Click **Continue**
    3. Paste the `x-vercel-verify` header value
    4. Click **Submit**

    <Check>
      You should see a green checkmark indicating successful header verification.
    </Check>
  </Step>

  <Step title="Verify in Vercel">
    Back in Vercel, click **Verify** to confirm the connection with GrowthOS.
  </Step>

  <Step title="Finalize setup">
    1. Click **Add Log Drain** in Vercel
    2. Confirm by clicking **Confirm and Add Log Drain**
    3. Click **Done** when complete
  </Step>

  <Step title="Complete integration">
    Return to GrowthOS and click **Finish Integration** to start monitoring AI traffic.

    <Tip>
      Your website will now start capturing AI agent interactions within 24-48 hours.
    </Tip>
  </Step>
</Steps>

## What You'll Monitor

Once integrated, GrowthOS will track:

<CardGroup cols={2}>
  <Card title="AI Crawler Activity" icon="robot">
    Monitor visits from GPTBot, GoogleBot-AI, Claude-Web, and other AI agents.
  </Card>

  <Card title="Content Access Patterns" icon="chart-line">
    See which pages AI agents crawl most frequently and optimize accordingly.
  </Card>

  <Card title="Response Performance" icon="clock">
    Track how quickly your site responds to AI agent requests.
  </Card>

  <Card title="Blocked Resources" icon="shield-exclamation">
    Identify content that AI agents can't access due to restrictions.
  </Card>
</CardGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Log drain not receiving data">
    **Common solutions:**

    * Verify your Vercel plan supports log drains (Pro/Enterprise required)
    * Check that both Static and Function sources are enabled
    * Ensure the endpoint URL was copied correctly
    * Confirm custom headers are properly configured
  </Accordion>

  <Accordion title="Authentication errors">
    **Check these items:**

    * Header key and value match exactly between GrowthOS and Vercel
    * No extra spaces or characters in the header values
    * x-vercel-verify token was submitted correctly in GrowthOS
  </Accordion>

  <Accordion title="No AI traffic showing">
    **Remember:**

    * AI traffic data can take 24-48 hours to appear
    * AI agents don't crawl all sites equally - traffic depends on your content and authority
    * Check that your site isn't blocking AI agents in robots.txt
  </Accordion>
</AccordionGroup>

## Next Steps

<Card title="Optimize for AI Visibility" icon="magnifying-glass" href="/essentials/optimization">
  Learn how to use your AI traffic data to improve your content's visibility in AI search results.
</Card>

<Note>
  Need help with your integration? Contact our support team at [support@growth-os.co](mailto:support@growth-os.co) for personalized assistance.
</Note>
