Skip to content

Add Vercel Speed Insights to Next.js#15

Draft
vercel[bot] wants to merge 1 commit into
mainfrom
vercel/vercel-speed-insights-to-nextj-h98pa8
Draft

Add Vercel Speed Insights to Next.js#15
vercel[bot] wants to merge 1 commit into
mainfrom
vercel/vercel-speed-insights-to-nextj-h98pa8

Conversation

@vercel

@vercel vercel Bot commented Jan 19, 2026

Copy link
Copy Markdown
Contributor

Vercel Speed Insights Integration Report

Summary

Successfully installed and configured Vercel Speed Insights for the Next.js 14 application using the App Router pattern.

Changes Made

1. Installed Package

  • Package: @vercel/speed-insights@1.3.1
  • Method: pnpm install @vercel/speed-insights
  • Status: ✅ Successfully installed
  • Lock file updated: pnpm-lock.yaml

2. Modified Files

app/layout.tsx
  • Added import: import { SpeedInsights } from '@vercel/speed-insights/next'
  • Added component: <SpeedInsights /> component placed inside the <body> tag, after the <Analytics /> component and inside the <ThemeProvider>
  • Placement rationale: The component is correctly positioned after {children} and Analytics, following Next.js 13.5+ App Router best practices

Implementation Details

Framework: Next.js 14.2.35
Router Type: App Router (Next.js 13.5+)
Import source: @vercel/speed-insights/next (correct for App Router and Next.js 13.5+)

The SpeedInsights component is now:

  • Automatically tracking Core Web Vitals
  • Sending performance data to Vercel's infrastructure
  • Operating in the client context within the ThemeProvider

Verification Steps Completed

Build Test: npm run build - Completed successfully

  • Compiled successfully
  • 5/5 static pages generated
  • No new errors or warnings introduced

Linter Check: npm run lint - Passed

  • Pre-existing console warnings only (not related to our changes)
  • No new linting errors

Dependencies:

  • @vercel/speed-insights properly added to dependencies in package.json
  • pnpm-lock.yaml updated with full dependency tree

Additional Notes

  • The project already had @vercel/analytics installed, so having both analytics and speed-insights components is standard practice
  • No breaking changes to existing functionality
  • All existing code structure preserved
  • Ready for deployment to Vercel infrastructure to begin collecting performance metrics

Files Changed

  1. package.json - Added @vercel/speed-insights dependency
  2. pnpm-lock.yaml - Updated with new dependency and transitive dependencies
  3. app/layout.tsx - Added SpeedInsights import and component

View Project · Speed Insights

Created by getsuga743 with Vercel Agent

## Vercel Speed Insights Integration Report

### Summary
Successfully installed and configured Vercel Speed Insights for the Next.js 14 application using the App Router pattern.

### Changes Made

#### 1. Installed Package
- **Package**: `@vercel/speed-insights@1.3.1`
- **Method**: `pnpm install @vercel/speed-insights`
- **Status**: ✅ Successfully installed
- **Lock file updated**: `pnpm-lock.yaml`

#### 2. Modified Files

##### app/layout.tsx
- **Added import**: `import { SpeedInsights } from '@vercel/speed-insights/next'`
- **Added component**: `<SpeedInsights />` component placed inside the `<body>` tag, after the `<Analytics />` component and inside the `<ThemeProvider>`
- **Placement rationale**: The component is correctly positioned after {children} and Analytics, following Next.js 13.5+ App Router best practices

### Implementation Details

**Framework**: Next.js 14.2.35
**Router Type**: App Router (Next.js 13.5+)
**Import source**: `@vercel/speed-insights/next` (correct for App Router and Next.js 13.5+)

The SpeedInsights component is now:
- Automatically tracking Core Web Vitals
- Sending performance data to Vercel's infrastructure
- Operating in the client context within the ThemeProvider

### Verification Steps Completed

✅ **Build Test**: `npm run build` - Completed successfully
- Compiled successfully
- 5/5 static pages generated
- No new errors or warnings introduced

✅ **Linter Check**: `npm run lint` - Passed
- Pre-existing console warnings only (not related to our changes)
- No new linting errors

✅ **Dependencies**: 
- @vercel/speed-insights properly added to dependencies in package.json
- pnpm-lock.yaml updated with full dependency tree

### Additional Notes

- The project already had @vercel/analytics installed, so having both analytics and speed-insights components is standard practice
- No breaking changes to existing functionality
- All existing code structure preserved
- Ready for deployment to Vercel infrastructure to begin collecting performance metrics

### Files Changed
1. **package.json** - Added @vercel/speed-insights dependency
2. **pnpm-lock.yaml** - Updated with new dependency and transitive dependencies
3. **app/layout.tsx** - Added SpeedInsights import and component

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

vercel Bot commented Jan 19, 2026

Copy link
Copy Markdown
Contributor Author

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

Project Deployment Review Updated (UTC)
my-web Ready Ready Preview, Comment Jan 19, 2026 6:59pm

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