# Vercel

### Overview

Vercel's Log Drain feature lets you forward logs, traces, speed insights, and analytics to third-party providers or custom endpoints. This guide walks you through connecting your Vercel project to Limy Analytics in 5 steps.

***

### Prerequisites

* A Vercel project (with admin access to Settings)
* Your **Limy Analytics API key** (found in your Limy dashboard)

***

### Step 1 — Open Drains in Vercel Project Settings

1. Go to your Vercel dashboard and open your project.
2. Click **Settings** in the left sidebar.
3. Scroll down and select **Drains** from the menu.
4. Click the **Add Drain** button in the top-right corner.

If no drains exist yet, you'll see an empty state with a "No drains are associated with this project" message.<br>

<figure><img src="/files/8JINmc0Cuo0856FxAdls" alt=""><figcaption></figcaption></figure>

***

### Step 2 — Choose Data to Drain

In the **Add Drain** wizard:

1. Select **Logs** *(Runtime, build and static logs)*.
2. Click **Next**.

> The other options — Traces, Speed Insights, and Web Analytics — are not required for Limy Analytics log ingestion.

<figure><img src="/files/OkgZNQHh95UVIS4LYxPN" alt=""><figcaption></figcaption></figure>

***

### Step 3 — Configure the Drain

Fill in the drain settings:

| Field           | Value                                                               |
| --------------- | ------------------------------------------------------------------- |
| **Drain Name**  | `LimyAnalytics` (or any name you prefer)                            |
| **Projects**    | Select **Specific Projects**, then choose your project              |
| **Sources**     | Check at least: `Static Files`, `Rewrites`, `Firewall`, `Redirects` |
| **Environment** | Select **Production** (optionally add Preview)                      |
| **Sampling**    | Leave empty to capture all logs                                     |

Click **Next** when done.

<figure><img src="/files/arusNw8V5RxTWbmwMGeu" alt=""><figcaption></figcaption></figure>

***

### Step 4 — Configure the Destination

On the **Configure the destination** step:

1. Stay on the **Custom Endpoint** tab.
2. Set the URL to:

```
https://stream.getlimy.ai
```

3. Set **Encoding** to `JSON`.
4. Enable the **Custom Headers** toggle and add:

```
x-api-key: <Your Limy Analytics Key>
```

Replace `<Your Limy Analytics Key>` with your actual API key from the Limy dashboard. Do not share this key publicly.

5. Click **Create Drain**.

<figure><img src="/files/4YP7AGu6Bi6DtItRCUqR" alt=""><figcaption></figcaption></figure>

***

### Step 5 — Verify the Connection

Once saved, your drain will appear in the **Drains** list. Confirm it shows:

* **Name:** LimyAnalytics
* **Type:** Logs
* **Connected Projects:** your selected project
* A **blue checkmark** icon indicating the drain is active

<figure><img src="/files/N8AySa0J4lhmUJswdaPu" alt=""><figcaption></figcaption></figure>

***

### You're all set! 🎉

After setup, it may take **up to 10 minutes** before data appears in your Limy Analytics dashboard.

If you have any questions, reach out to **Limy Support**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.getlimy.ai/limy-pixel/cdn-integration/vercel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
