Install Vercel Speed Insights with latest docs#20
Draft
vercel[bot] wants to merge 1 commit into
Draft
Conversation
# Vercel Speed Insights Installation Report
## Summary
Successfully installed and configured Vercel Speed Insights for the Expo documentation website (Next.js project).
## Changes Made
### 1. Package Installation
- **Package**: `@vercel/speed-insights` (version 2.0.0)
- **Location**: `docs/package.json`
- **Method**: Added via `yarn add @vercel/speed-insights`
### 2. Integration
- **File Modified**: `docs/pages/_app.tsx`
- **Changes**:
- Added import: `import { SpeedInsights } from '@vercel/speed-insights/next';`
- Added component: `<SpeedInsights />` inside the root `<>` fragment, after the `</MotionConfig>` closing tag
### 3. Lock File Update
- **File**: `docs/yarn.lock`
- **Status**: Updated with new dependencies
## Implementation Details
This is a **Next.js Pages Router** project (not App Router). According to Vercel's official documentation, the Speed Insights component should be:
1. Imported from `@vercel/speed-insights/next`
2. Added to the `pages/_app.tsx` file
The `SpeedInsights` component was placed at the root level of the application, ensuring it's rendered on all pages. It's positioned after all providers and the main content to avoid interfering with the existing provider structure.
## Verification
✅ TypeScript compilation passes (`yarn tsc --noEmit`)
✅ Linting passes (`yarn lint`) - no errors, only pre-existing warnings in unrelated files
✅ Next.js build starts successfully
✅ Lock file properly updated
## Next Steps
To see Speed Insights data:
1. Deploy this code to Vercel
2. Enable Speed Insights in the Vercel dashboard (Project Settings → Speed Insights)
3. After deployment and user visits, data will appear in the Vercel dashboard
## Notes
- The component is minimal and doesn't require any props for basic functionality
- Speed Insights is available on all Vercel plans (including free tier)
- The tracking script will be automatically injected by Vercel when deployed
- Data collection is GDPR-compliant and privacy-friendly
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Author
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 Report
Summary
Successfully installed and configured Vercel Speed Insights for the Expo documentation website (Next.js project).
Changes Made
1. Package Installation
@vercel/speed-insights(version 2.0.0)docs/package.jsonyarn add @vercel/speed-insights2. Integration
docs/pages/_app.tsximport { SpeedInsights } from '@vercel/speed-insights/next';<SpeedInsights />inside the root<>fragment, after the</MotionConfig>closing tag3. Lock File Update
docs/yarn.lockImplementation Details
This is a Next.js Pages Router project (not App Router). According to Vercel's official documentation, the Speed Insights component should be:
@vercel/speed-insights/nextpages/_app.tsxfileThe
SpeedInsightscomponent was placed at the root level of the application, ensuring it's rendered on all pages. It's positioned after all providers and the main content to avoid interfering with the existing provider structure.Verification
✅ TypeScript compilation passes (
yarn tsc --noEmit)✅ Linting passes (
yarn lint) - no errors, only pre-existing warnings in unrelated files✅ Next.js build starts successfully
✅ Lock file properly updated
Next Steps
To see Speed Insights data:
Notes
View Project · Speed Insights
Created by pragan333 with Vercel Agent