Install and Configure Vercel Speed Insights - #42
Merged
Merged
Conversation
# 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>
Contributor
Author
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Telemetry must scrub private URLs and avoid loading on non-Vercel deployments.
Review effort: Balanced
Findings: 1
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.
| {/* Cookieless page counts on the hosted instance. Vercel serves the | ||
| endpoint, so a copy hosted anywhere else sends nothing. */} | ||
| {onVercel() ? <PageCounts /> : null} | ||
| <SpeedInsights /> |
Contributor
There was a problem hiding this comment.
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.
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>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Vercel Speed Insights Installation
Successfully installed and configured Vercel Speed Insights for this Next.js project.
Changes Made
1. Installed Package
@vercel/speed-insights@^2.0.0to dependencies2. Modified Files
suite/app/layout.tsx: Added SpeedInsights component to root layout
SpeedInsightsfrom@vercel/speed-insights/next(Next.js-specific entry point)<SpeedInsights />component at the end of the body, after existing Vercel Analytics componentssuite/package.json: Added the package to dependencies
3. Implementation Details
@vercel/speed-insights/next)Framework Detection
Testing
@vercel/speed-insights@2.0.0successfully installedNotes
View Project · Speed Insights
Created by jfrusher with Vercel Agent