Skip to content

Add Vercel Speed Insights to Next.js#126

Draft
vercel[bot] wants to merge 1 commit intomasterfrom
vercel/vercel-speed-insights-to-nextj-lh03dm
Draft

Add Vercel Speed Insights to Next.js#126
vercel[bot] wants to merge 1 commit intomasterfrom
vercel/vercel-speed-insights-to-nextj-lh03dm

Conversation

@vercel
Copy link
Copy Markdown
Contributor

@vercel vercel bot commented Feb 28, 2026

Successfully implemented Vercel Speed Insights for Next.js

Changes Made:

1. Installed Package

  • Installed @vercel/speed-insights v1.3.1 using npm
  • Updated package.json with the new dependency
  • Updated package-lock.json with resolved dependencies

2. Updated Root Layout (app/layout.tsx)

  • Added import: import { SpeedInsights } from "@vercel/speed-insights/next";
  • Added <SpeedInsights /> component inside the <body> tag
  • Placed the component after <Analytics /> and before <UmamiAnalytics />

Implementation Details:

Since this project uses Next.js 16.1.0 with App Router, I used the recommended approach:

  • Imported SpeedInsights from @vercel/speed-insights/next (the Next.js-specific package)
  • Added the component directly to the root layout without needing a 'use client' directive
  • The component will automatically track Core Web Vitals and performance metrics

Verification:

✅ Build completed successfully (273 static pages generated)
✅ Linter passed with no errors
✅ TypeScript type checking passed
✅ No existing functionality was affected
✅ Lock files were updated correctly

Notes:

The implementation follows the project's existing patterns:

  • Placed alongside existing analytics components (@vercel/analytics and UmamiAnalytics)
  • Maintained consistent code structure and formatting
  • The component is positioned inside the <body> tag but outside the theme and provider components, matching the pattern used for other analytics tools

The Speed Insights component will now automatically collect and report Core Web Vitals (LCP, FID, CLS, FCP, TTFB) to Vercel, helping monitor real-world performance metrics for the application.


View Project · Speed Insights

Created by itshovercom-2373 with Vercel Agent

Successfully implemented Vercel Speed Insights for Next.js

## Changes Made:

### 1. Installed Package
- Installed `@vercel/speed-insights` v1.3.1 using npm
- Updated package.json with the new dependency
- Updated package-lock.json with resolved dependencies

### 2. Updated Root Layout (app/layout.tsx)
- Added import: `import { SpeedInsights } from "@vercel/speed-insights/next";`
- Added `<SpeedInsights />` component inside the `<body>` tag
- Placed the component after `<Analytics />` and before `<UmamiAnalytics />`

## Implementation Details:

Since this project uses Next.js 16.1.0 with App Router, I used the recommended approach:
- Imported `SpeedInsights` from `@vercel/speed-insights/next` (the Next.js-specific package)
- Added the component directly to the root layout without needing a `'use client'` directive
- The component will automatically track Core Web Vitals and performance metrics

## Verification:

✅ Build completed successfully (273 static pages generated)
✅ Linter passed with no errors
✅ TypeScript type checking passed
✅ No existing functionality was affected
✅ Lock files were updated correctly

## Notes:

The implementation follows the project's existing patterns:
- Placed alongside existing analytics components (`@vercel/analytics` and `UmamiAnalytics`)
- Maintained consistent code structure and formatting
- The component is positioned inside the `<body>` tag but outside the theme and provider components, matching the pattern used for other analytics tools

The Speed Insights component will now automatically collect and report Core Web Vitals (LCP, FID, CLS, FCP, TTFB) to Vercel, helping monitor real-world performance metrics for the application.

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
@vercel
Copy link
Copy Markdown
Contributor Author

vercel bot commented Feb 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
itshover-icons Ready Ready Preview, Comment Feb 28, 2026 10:31am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants