Skip to main content
The Vercel integration enables server-side tracking of AI crawler activity on your website using Vercel Log Drains. This allows you to monitor when AI bots like GPTBot, ClaudeBot, and PerplexityBot access your content.

Why Use Vercel Log Drains?

Traditional analytics tools rely on JavaScript that runs in the browser. AI crawlers don’t execute JavaScript, so they’re invisible to tools like Google Analytics. Vercel Log Drains capture server-side logs from your Edge Functions, Serverless Functions, and static files, giving you complete visibility into how AI platforms discover and index your content.

Benefits

  • Capture AI crawler traffic that JavaScript-based analytics miss
  • Zero code changes - Configure entirely through the Vercel dashboard
  • Real-time logging - Logs are streamed as requests happen
  • Works with any Vercel project - Next.js, static sites, or any other framework

Prerequisites

Before you begin, you’ll need:
  • A Vercel account on the Pro or Enterprise plan (Log Drains are not available on the Hobby plan)
  • A deployed project on Vercel
  • A ChatFeatured account with Agent Analytics enabled
Vercel Log Drains are only available on Pro and Enterprise plans. If you’re on the Hobby plan, consider using our Cloudflare integration instead.

Setup Instructions

Step 1: Get Your API Key

  1. Log in to ChatFeatured and navigate to your brand
  2. Go to Agent Analytics > Settings
  3. Click Create API Key and give it a name (e.g., “Vercel Log Drain”)
  4. Copy the generated API key - you’ll need it in Step 8

Step 2: Go to Vercel Dashboard

Navigate to https://vercel.com/dashboard

Step 3: Open Team Settings

Click on your team name in the top-left → Select Settings

Step 4: Navigate to Drains

In the left sidebar, click Drains

Step 5: Add a New Drain

Click the Add Drain button

Step 6: Select Data Type

Choose Logs

Step 7: Configure the Drain

  • Name: Agent Analytics
  • Projects: Select the projects you want to monitor

Step 8: Configure Log Sources

Expand “Additional configuration for logs”:
  • Sources: Check the following options:
    • Static Files
    • Edge Functions
    • Functions
  • Environments: Check Production
  • Sampling: Leave at 100%
These sources include HTTP request data with user agents, which is required for AI bot identification.

Step 9: Configure Destination

Select the Custom Endpoint tab and configure:
FieldValue
Endpoint URLhttps://ingest.chatfeatured.com/v1/logs/vercel
FormatNDJSON
Custom HeadersX-API-Key: YOUR_API_KEY
Replace YOUR_API_KEY with your API key from Step 1.

Step 10: Test and Create

  1. Click Test to verify the connection returns a 200 response
  2. Click Create Drain

Step 11: Verify Setup

Once configured, AI crawler traffic will appear in your Agent Analytics dashboard within a few minutes. Visit your site to generate some traffic, then check your dashboard for incoming data.

How It Works

Vercel Log Drains stream logs from your deployment:
  1. Request arrives at Vercel’s edge
  2. Vercel processes the request through your application
  3. Logs are generated containing request metadata (URL, user agent, IP, etc.)
  4. Logs are streamed to ChatFeatured’s ingestion endpoint in real-time
  5. AI crawlers identified and displayed in your analytics dashboard

What Gets Tracked

The Log Drain captures the following data for each request:
  • Host - The domain being accessed
  • Path - The URL path being requested
  • User Agent - Used to identify AI crawlers
  • IP Address - For geographic insights
  • Status Code - The HTTP response status
  • Timestamp - When the request occurred
  • Request Method - GET, POST, etc.
ChatFeatured’s backend automatically identifies AI crawlers (GPTBot, ClaudeBot, PerplexityBot, Bingbot, etc.) and filters out regular user traffic.

Filtering Projects

You can configure the Log Drain to only track specific projects:
  1. When creating or editing the drain, select specific projects instead of “All Projects”
  2. This is useful if you only want to track production marketing sites, not development projects

Troubleshooting

No data appearing in dashboard

  1. Verify the drain is active - Check the Drains page in Vercel settings
  2. Check the API key - Ensure the X-API-Key header is set correctly
  3. Test the connection - Use the Test button in the drain settings
  4. Check log sources - Ensure Static Files, Edge Functions, and Functions are selected

Test returns an error

  1. Verify the endpoint URL is exactly https://ingest.chatfeatured.com/v1/logs/vercel
  2. Ensure the format is set to NDJSON
  3. Check that your API key is valid and active

Some requests not appearing

  1. Ensure Production environment is selected
  2. Check that sampling is set to 100%
  3. Verify the relevant log sources are checked

Security

API Key Best Practices

  • Create a dedicated API key for Vercel (don’t reuse keys across integrations)
  • Rotate keys periodically from the ChatFeatured dashboard
  • Revoke keys immediately if you suspect they’ve been compromised

Data Privacy

  • Only request metadata is logged (no page content or user data)
  • IP addresses are used for geographic aggregation only
  • All data is transmitted over HTTPS
  • ChatFeatured is GDPR compliant

Pricing

Vercel Log Drains are available on:
PlanLog Drains
HobbyNot available
ProIncluded
EnterpriseIncluded
Log Drains require a Vercel Pro or Enterprise plan. If you’re on the Hobby plan, consider using our Cloudflare integration instead.

Next Steps

Once your Vercel integration is set up:
  1. Monitor your dashboard - Check Agent Analytics to see AI crawler activity
  2. Track citations - See which pages AI models cite in their responses
  3. Optimize content - Use insights to improve AI visibility for high-traffic pages
For more information on using Agent Analytics, see Setting up Agent Analytics.