Skip to main content
General
Observability

Vercel Speed Insights

Learn how to use Vercel Speed Insights for real-time performance monitoring.

Open MarkdownFull AI corpusFeedback

The starter kit already renders Vercel Speed Insights from the root layout. Enable it in Vercel to collect performance measurements from real visits to your deployed application.

What is already configured

The repository includes @vercel/speed-insights and renders its Next.js component in app/layout.tsx:

app/layout.tsx
import { SpeedInsights } from '@vercel/speed-insights/next';

// Inside the root layout body
<SpeedInsights />;

No environment variable is required.

Enable Speed Insights

  1. Open your project in the Vercel dashboard.
  2. Select Speed Insights in the project sidebar.
  3. Enable Speed Insights.
  4. Deploy the application again.
  5. Visit several pages on the deployed application, then check the Speed Insights dashboard.

Read the dashboard

Start with the page and device filters, then inspect the metrics that explain the experience:

  • LCP measures how quickly the main content becomes visible.
  • INP measures responsiveness across user interactions.
  • CLS measures unexpected layout movement.
  • FCP measures when the first content is painted.
  • TTFB helps identify slow initial server responses.

Use field data to identify a slow page or device class. Reproduce the problem locally with browser performance tools before changing code.

Control usage

The default component sends all supported measurements. If usage becomes material, reduce the sample rate in the existing root-layout integration:

app/layout.tsx
<SpeedInsights sampleRate={0.5} />

A value of 0.5 samples approximately half of eligible page views. Keep the default while traffic is low so early measurements are not unnecessarily sparse.

Verify the integration

If no data appears:

  1. Confirm Speed Insights is enabled for the correct Vercel project.
  2. Confirm the latest deployment contains <SpeedInsights />.
  3. Visit the deployed application with tracking protection or ad blockers disabled.
  4. Check that a reverse proxy or Content Security Policy is not blocking Vercel's collection requests.
  5. Allow time for real visits to produce data.

See the Vercel Speed Insights quickstart for current provider setup details and the usage guide before changing the sample rate.