Skip to content

Add Vercel Speed Insights to Next.js#3

Draft
vercel[bot] wants to merge 1 commit intomainfrom
vercel/vercel-speed-insights-to-nextj-f6cb3k
Draft

Add Vercel Speed Insights to Next.js#3
vercel[bot] wants to merge 1 commit intomainfrom
vercel/vercel-speed-insights-to-nextj-f6cb3k

Conversation

@vercel
Copy link
Copy Markdown

@vercel vercel bot commented Jan 25, 2026

Vercel Speed Insights Installation and Configuration

Successfully installed and configured Vercel Speed Insights for the Next.js project.

Changes Made:

  1. Installed @vercel/speed-insights package

    • Added @vercel/speed-insights@^1.3.1 to dependencies
    • Updated package.json and package-lock.json
  2. Modified app/layout.tsx

    • Added import: import { SpeedInsights } from "@vercel/speed-insights/next"
    • Added <SpeedInsights /> component inside the <body> tag, placed after the </Providers> closing tag
    • This follows the recommended placement for Next.js 14.2.5 with App Router

Implementation Details:

The project is using Next.js 14.2.5 with the App Router architecture, so the implementation followed the standard approach for Next.js 13.5+:

  • Used the @vercel/speed-insights/next import (not the React version)
  • No client component or usePathname() hook needed
  • Simple declarative component placement in the root layout

Verification:

✅ Build completed successfully (npm run build)
✅ TypeScript type checking passed (npm run type-check)
✅ No build errors or warnings introduced
✅ All changes staged with git

Files Modified:

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

The Speed Insights component will now track and report Core Web Vitals metrics when the application is deployed to Vercel.


View Project · Speed Insights

Created by ma1orek with Vercel Agent

## Vercel Speed Insights Installation and Configuration

Successfully installed and configured Vercel Speed Insights for the Next.js project.

### Changes Made:

1. **Installed @vercel/speed-insights package**
   - Added `@vercel/speed-insights@^1.3.1` to dependencies
   - Updated package.json and package-lock.json

2. **Modified app/layout.tsx**
   - Added import: `import { SpeedInsights } from "@vercel/speed-insights/next"`
   - Added `<SpeedInsights />` component inside the `<body>` tag, placed after the `</Providers>` closing tag
   - This follows the recommended placement for Next.js 14.2.5 with App Router

### Implementation Details:

The project is using Next.js 14.2.5 with the App Router architecture, so the implementation followed the standard approach for Next.js 13.5+:
- Used the `@vercel/speed-insights/next` import (not the React version)
- No client component or `usePathname()` hook needed
- Simple declarative component placement in the root layout

### Verification:

✅ Build completed successfully (`npm run build`)
✅ TypeScript type checking passed (`npm run type-check`)
✅ No build errors or warnings introduced
✅ All changes staged with git

### Files Modified:

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

The Speed Insights component will now track and report Core Web Vitals metrics when the application is deployed to Vercel.

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

vercel bot commented Jan 25, 2026

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

Project Deployment Review Updated (UTC)
wwwwwwwwww Ready Ready Preview, Comment Jan 25, 2026 0:25am

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