Skip to content

Install Vercel Speed Insights for Next.js#125

Merged
Abhijit-Jha merged 1 commit intomasterfrom
vercel/install-vercel-speed-insights-ckwl07
Feb 28, 2026
Merged

Install Vercel Speed Insights for Next.js#125
Abhijit-Jha merged 1 commit intomasterfrom
vercel/install-vercel-speed-insights-ckwl07

Conversation

@vercel
Copy link
Copy Markdown
Contributor

@vercel vercel bot commented Feb 28, 2026

Implemented Vercel Speed Insights for Next.js

Changes Made:

1. Installed Package

  • Added @vercel/speed-insights package to dependencies
  • Used npm (the project's package manager) to install the package

2. Updated app/layout.tsx

  • Imported SpeedInsights from @vercel/speed-insights/next
  • Added the <SpeedInsights /> component inside the <body> tag
  • Placed it alongside the existing <Analytics /> component for consistency

Modified Files:

  • app/layout.tsx - Added SpeedInsights import and component
  • package.json - Added @vercel/speed-insights dependency
  • package-lock.json - Updated with new dependency lock information

Implementation Details:

Since this is a Next.js 16.1.0 project using the App Router (which is well above version 13.5), I followed the recommended approach for App Router projects:

  1. Imported from @vercel/speed-insights/next (not the React version)
  2. Added the component to the root layout file (app/layout.tsx)
  3. Placed it inside the <body> tag after the <Analytics /> component and before <UmamiAnalytics />

The SpeedInsights component will automatically track Web Vitals and send performance data to Vercel when deployed.

Verification:

✅ Linting passed with no errors (npm run lint)
✅ Build completed successfully (npm run build)
✅ TypeScript type checking passed (npm run typecheck)
✅ All 273 pages generated successfully during build
✅ Package lock file properly updated

The implementation is complete and ready for deployment. Speed Insights will begin collecting performance data once deployed to Vercel.


View Project · Speed Insights

Created by itshovercom-2373 with Vercel Agent

Implemented Vercel Speed Insights for Next.js

## Changes Made:

### 1. Installed Package
- Added `@vercel/speed-insights` package to dependencies
- Used npm (the project's package manager) to install the package

### 2. Updated app/layout.tsx
- Imported `SpeedInsights` from `@vercel/speed-insights/next`
- Added the `<SpeedInsights />` component inside the `<body>` tag
- Placed it alongside the existing `<Analytics />` component for consistency

## Modified Files:
- `app/layout.tsx` - Added SpeedInsights import and component
- `package.json` - Added @vercel/speed-insights dependency
- `package-lock.json` - Updated with new dependency lock information

## Implementation Details:

Since this is a Next.js 16.1.0 project using the App Router (which is well above version 13.5), I followed the recommended approach for App Router projects:
1. Imported from `@vercel/speed-insights/next` (not the React version)
2. Added the component to the root layout file (`app/layout.tsx`)
3. Placed it inside the `<body>` tag after the `<Analytics />` component and before `<UmamiAnalytics />`

The SpeedInsights component will automatically track Web Vitals and send performance data to Vercel when deployed.

## Verification:
✅ Linting passed with no errors (`npm run lint`)
✅ Build completed successfully (`npm run build`)
✅ TypeScript type checking passed (`npm run typecheck`)
✅ All 273 pages generated successfully during build
✅ Package lock file properly updated

The implementation is complete and ready for deployment. Speed Insights will begin collecting performance data once deployed to Vercel.

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:25am

Request Review

@Abhijit-Jha Abhijit-Jha marked this pull request as ready for review February 28, 2026 10:28
@Abhijit-Jha Abhijit-Jha merged commit f403549 into master Feb 28, 2026
3 of 4 checks passed
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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.

1 participant