Skip to content

Install and Configure Vercel Speed Insights - #42

Merged
JFrusher merged 3 commits into
mainfrom
vercel/install-and-configure-vercel-s-0mmdy8
Oct 2, 2026
Merged

JFrusher merged 3 commits into
mainfrom
vercel/install-and-configure-vercel-s-0mmdy8

Conversation

@vercel

@vercel vercel Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Vercel Speed Insights Installation

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

Changes Made

1. Installed Package

  • Added @vercel/speed-insights@^2.0.0 to dependencies
  • Updated package-lock.json to reflect the new dependency

2. Modified Files

  • suite/app/layout.tsx: Added SpeedInsights component to root layout

    • Imported SpeedInsights from @vercel/speed-insights/next (Next.js-specific entry point)
    • Added <SpeedInsights /> component at the end of the body, after existing Vercel Analytics components
  • suite/package.json: Added the package to dependencies

3. Implementation Details

  • Followed the latest official Vercel documentation from https://vercel.com/docs/speed-insights/quickstart
  • Used the Next.js App Router-specific import path (@vercel/speed-insights/next)
  • Placed the component in the root layout file to enable tracking across all pages
  • No environment variables or additional configuration required
  • Speed Insights will automatically start collecting metrics when deployed to Vercel

Framework Detection

  • Confirmed project uses Next.js 16.3.8 with App Router
  • Package manager: npm (package-lock.json present at root)
  • Project structure: Monorepo with suite as the Next.js application

Testing

  • Verified package installation: @vercel/speed-insights@2.0.0 successfully installed
  • Confirmed TypeScript compilation for the Next.js application (existing vitest.config.ts issues are unrelated to this change)
  • Lock files updated correctly

Notes

  • The SpeedInsights component will only collect metrics when deployed to Vercel
  • No runtime overhead when running locally or on non-Vercel platforms
  • Metrics will appear in the Vercel dashboard after deployment and sufficient data collection
  • The implementation follows existing patterns in the codebase (similar to @vercel/analytics already present)

View Project · Speed Insights

Created by jfrusher with Vercel Agent

# Vercel Speed Insights Installation

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

## Changes Made

### 1. Installed Package
- Added `@vercel/speed-insights@^2.0.0` to dependencies
- Updated package-lock.json to reflect the new dependency

### 2. Modified Files
- **suite/app/layout.tsx**: Added SpeedInsights component to root layout
  - Imported `SpeedInsights` from `@vercel/speed-insights/next` (Next.js-specific entry point)
  - Added `<SpeedInsights />` component at the end of the body, after existing Vercel Analytics components
  
- **suite/package.json**: Added the package to dependencies

### 3. Implementation Details
- Followed the latest official Vercel documentation from https://vercel.com/docs/speed-insights/quickstart
- Used the Next.js App Router-specific import path (`@vercel/speed-insights/next`)
- Placed the component in the root layout file to enable tracking across all pages
- No environment variables or additional configuration required
- Speed Insights will automatically start collecting metrics when deployed to Vercel

## Framework Detection
- Confirmed project uses Next.js 16.3.8 with App Router
- Package manager: npm (package-lock.json present at root)
- Project structure: Monorepo with suite as the Next.js application

## Testing
- Verified package installation: `@vercel/speed-insights@2.0.0` successfully installed
- Confirmed TypeScript compilation for the Next.js application (existing vitest.config.ts issues are unrelated to this change)
- Lock files updated correctly

## Notes
- The SpeedInsights component will only collect metrics when deployed to Vercel
- No runtime overhead when running locally or on non-Vercel platforms
- Metrics will appear in the Vercel dashboard after deployment and sufficient data collection
- The implementation follows existing patterns in the codebase (similar to @vercel/analytics already present)

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

vercel Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor Author

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

Project Deployment Actions Updated
trousseau-suite Ready Ready Preview Oct 2, 2026 9:15am UTC

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Telemetry must scrub private URLs and avoid loading on non-Vercel deployments.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity

Open (2)
What changed in this PR

Adds Vercel Speed Insights to the Next.js application.

Changes:

  • Adds the Speed Insights dependency.
  • Renders Speed Insights in the root layout.
  • Updates the npm lockfile.
File Description
suite/​app/​layout.tsx Integrates Speed Insights globally.
suite/​package.json Adds the dependency.
package-lock.json Locks the dependency and metadata.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread suite/app/layout.tsx Outdated
{/* Cookieless page counts on the hosted instance. Vercel serves the
endpoint, so a copy hosted anywhere else sends nothing. */}
{onVercel() ? <PageCounts /> : null}
<SpeedInsights />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Implemented in 31b0d67. Speed Insights now runs through a client wrapper that applies countedUrl(event.url) before sending, and the privacy policy text plus legal integration test were updated to disclose and verify Speed Insights telemetry.

Comment thread suite/app/layout.tsx Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Jacob Frusher <99102901+JFrusher@users.noreply.github.com>
Co-authored-by: JFrusher <99102901+JFrusher@users.noreply.github.com>
Copilot AI requested a review from JFrusher October 2, 2026 09:20
@JFrusher
JFrusher marked this pull request as ready for review October 2, 2026 10:08
@JFrusher
JFrusher merged commit 1d8d38f into main Oct 2, 2026
8 of 9 checks passed
@JFrusher
JFrusher deleted the vercel/install-and-configure-vercel-s-0mmdy8 branch October 2, 2026 10:16

This branch was successfully deployed

1 active deployment
Preview — 31b0d672 Deployed Oct 2, 2026 by vercel[bot]
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.

3 participants