Skip to content

Install Vercel Speed Insights package#1

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

Install Vercel Speed Insights package#1
vercel[bot] wants to merge 1 commit into
mainfrom
vercel/install-vercel-speed-insights-1grnkw

Conversation

@vercel

@vercel vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

Vercel Speed Insights Installation Report

Successfully installed and configured Vercel Speed Insights for the SkillBridge project.

Changes Made

1. Package Installation

  • Installed @vercel/speed-insights (v2.0.0) in both:
    • Root directory (for vanilla HTML site)
    • react-app/ directory (for React application)
  • Updated package.json files in both locations
  • Generated package-lock.json files to lock dependencies

2. React App Integration (react-app/)

  • Modified: react-app/src/App.jsx
    • Added import: import { SpeedInsights } from '@vercel/speed-insights/react'
    • Added <SpeedInsights /> component at the end of the JSX tree
    • Follows official Vercel documentation for React/Vite projects

3. Vanilla HTML Site Integration

  • Modified: index.html

    • Added Speed Insights script injection before closing </body> tag
    • Uses ES module import to load injectSpeedInsights() function
  • Modified: auth.html

    • Added Speed Insights script injection before closing </body> tag
  • Modified: dashboard.html

    • Added Speed Insights script injection before closing </body> tag

Implementation Details

React App

The React implementation uses the official @vercel/speed-insights/react package, which provides a React component that automatically tracks Web Vitals and other performance metrics.

Vanilla HTML Sites

For the vanilla HTML pages (index.html, auth.html, dashboard.html), the implementation uses the injectSpeedInsights() function from the main package via ES module imports. This approach:

  • Works without a build step
  • Automatically tracks performance metrics
  • Does not track data in development mode (only in production)

Verification

Build Test: React app builds successfully with no errors
Linter Test: ESLint passes with no warnings or errors
Root Build: Root build script runs successfully
Dependencies: All lockfiles properly updated

Next Steps

  1. Enable in Vercel Dashboard: Navigate to your project's Speed Insights settings in the Vercel dashboard and click "Enable"
  2. Deploy: Deploy the project to Vercel using vercel deploy
  3. Verify: After deployment, check that the Speed Insights script is loaded on your pages
  4. Monitor: Data will appear in the Vercel dashboard after users visit your site

Notes

  • Speed Insights only tracks data in production (not in development mode)
  • No environment variables are required for basic setup
  • The integration follows the latest official Vercel documentation (fetched on 2026-06-14)
  • Both the React app and vanilla HTML sites are now configured for Speed Insights

View Project · Speed Insights

Created by user-rishabh with Vercel Agent

# Vercel Speed Insights Installation Report

Successfully installed and configured Vercel Speed Insights for the SkillBridge project.

## Changes Made

### 1. Package Installation
- Installed `@vercel/speed-insights` (v2.0.0) in both:
  - Root directory (for vanilla HTML site)
  - `react-app/` directory (for React application)
- Updated package.json files in both locations
- Generated package-lock.json files to lock dependencies

### 2. React App Integration (react-app/)
- **Modified**: `react-app/src/App.jsx`
  - Added import: `import { SpeedInsights } from '@vercel/speed-insights/react'`
  - Added `<SpeedInsights />` component at the end of the JSX tree
  - Follows official Vercel documentation for React/Vite projects

### 3. Vanilla HTML Site Integration
- **Modified**: `index.html`
  - Added Speed Insights script injection before closing `</body>` tag
  - Uses ES module import to load `injectSpeedInsights()` function
  
- **Modified**: `auth.html`
  - Added Speed Insights script injection before closing `</body>` tag
  
- **Modified**: `dashboard.html`
  - Added Speed Insights script injection before closing `</body>` tag

## Implementation Details

### React App
The React implementation uses the official `@vercel/speed-insights/react` package, which provides a React component that automatically tracks Web Vitals and other performance metrics.

### Vanilla HTML Sites
For the vanilla HTML pages (index.html, auth.html, dashboard.html), the implementation uses the `injectSpeedInsights()` function from the main package via ES module imports. This approach:
- Works without a build step
- Automatically tracks performance metrics
- Does not track data in development mode (only in production)

## Verification

✅ **Build Test**: React app builds successfully with no errors
✅ **Linter Test**: ESLint passes with no warnings or errors
✅ **Root Build**: Root build script runs successfully
✅ **Dependencies**: All lockfiles properly updated

## Next Steps

1. **Enable in Vercel Dashboard**: Navigate to your project's Speed Insights settings in the Vercel dashboard and click "Enable"
2. **Deploy**: Deploy the project to Vercel using `vercel deploy`
3. **Verify**: After deployment, check that the Speed Insights script is loaded on your pages
4. **Monitor**: Data will appear in the Vercel dashboard after users visit your site

## Notes

- Speed Insights only tracks data in production (not in development mode)
- No environment variables are required for basic setup
- The integration follows the latest official Vercel documentation (fetched on 2026-06-14)
- Both the React app and vanilla HTML sites are now configured for Speed Insights

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

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown
Author

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

Project Deployment Actions Updated (UTC)
s-kill-bridge Ready Ready Preview, Comment Jun 14, 2026 2:19pm

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