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

# Speed Insights

Vercel Drains provide support for [Web Vitals](https://web.dev/articles/vitals) through the Speed Insights drain. These metrics can serve as signals for delivering great user experience on the web. To start receiving Web Vitals in AppSignal, enable **Speed Insights**, add `@vercel/speed-insights` package to your project and create a **Speed Insights drain**.

## 1. Enable Speed Insights

From your organisation's page, click on the project that you would like to enable the Speed Insights for. Then click on the **Speed Insights** tab, where you will be presented with an **Enable Speed Insights** dialog.

<img src="https://mintcdn.com/appsignal-715f5a51/MS9b5WO71lSfD5jG/assets/images/screenshots/vercel/enable-speed-insights-dark.png?fit=max&auto=format&n=MS9b5WO71lSfD5jG&q=85&s=835ec66c5dffa8f5224be2f8119a20c6" alt="Screenshot of &#x22;Enable Speed Insights&#x22; dialog in the Vercel UI" width="2452" height="1756" data-path="assets/images/screenshots/vercel/enable-speed-insights-dark.png" />

Click on **Purchase** to enable **Speed Insights**.

## 2. Add `@vercel/speed-insights` to your project

Add `@vercel/speed-insights` package to your project and include `<SpeedInsights />` component in your app.

<CodeGroup>
  ```shell Shell theme={null}
  npm install @vercel/speed-insights
  ```
</CodeGroup>

This will add a script to the page and start tracking Web Vitals. For more detailed instructions head over to [Vercel documentation page](https://vercel.com/docs/speed-insights/quickstart#add-the-speedinsights-component-to-your-app).

## 3. Configure Speed Insights drain

From a Vercel project navigate to **Settings > Drains** page and click on **Add Drain**.

<img src="https://mintcdn.com/appsignal-715f5a51/MS9b5WO71lSfD5jG/assets/images/screenshots/vercel/add-speed-insights-drain-dark.png?fit=max&auto=format&n=MS9b5WO71lSfD5jG&q=85&s=e67860fa99557704c5e5fe4e63cac1db" alt="Screenshot of &#x22;Add Drain&#x22; step in the Vercel UI" width="1576" height="1028" data-path="assets/images/screenshots/vercel/add-speed-insights-drain-dark.png" />

Select **Speed Insights** as the drain type and click **Next**.

<img src="https://mintcdn.com/appsignal-715f5a51/MS9b5WO71lSfD5jG/assets/images/screenshots/vercel/configure-speed-insights-drain-dark.png?fit=max&auto=format&n=MS9b5WO71lSfD5jG&q=85&s=802a92c5d790260104f8fb3cf94185d2" alt="Screenshot of &#x22;Add Drain&#x22; step in the Vercel UI" width="1568" height="1296" data-path="assets/images/screenshots/vercel/configure-speed-insights-drain-dark.png" />

Add a descriptive name for the drain, such as 'AppSignal speed insights drain'. The **Specific projects** option along with your project should be pre-selected in the **Projects** section. If it is not, make sure to only select the project that you enabled Speed Insights for. Click **Next**.

<img src="https://mintcdn.com/appsignal-715f5a51/MS9b5WO71lSfD5jG/assets/images/screenshots/vercel/configure-speed-insights-drain-destination.png?fit=max&auto=format&n=MS9b5WO71lSfD5jG&q=85&s=668e2c01cb32414a7db2b7d27a5f122a" alt="Screenshot of &#x22;Configure drain&#x22; step in the Vercel UIt" width="1572" height="1146" data-path="assets/images/screenshots/vercel/configure-speed-insights-drain-destination.png" />

For **destination** enter the following URL replacing `<api_key>` with your AppSignal app-level push API key, which can be found in [App settings](https://appsignal.com/redirect-to/app?to=api_keys\&key_tab=app):

<CodeGroup>
  ```plaintext Text theme={null}
  https://appsignal-endpoint.net/metrics/speed-insights?api_key=<api_key>
  ```
</CodeGroup>

<Note>
  You can find more information about **AppSignal API keys** in the AppSignal
  API's [Public Endpoint Authentication
  section](https://docs.appsignal.com/api/public-endpoint.html#authentication).
</Note>

Pressing **Test** will send a test trace to AppSignal.

Click **Create Drain**.

On successful setup, a new [magic dashboard](https://blog.appsignal.com/2019/03/27/magic-dashboards.html) will be created for you with Next.js Web Vitals.
