Skip to content

Install Vercel Speed Insights#22

Merged
feispla merged 1 commit into
mainfrom
vercel/install-vercel-speed-insights-01nw3k
May 15, 2026
Merged

Install Vercel Speed Insights#22
feispla merged 1 commit into
mainfrom
vercel/install-vercel-speed-insights-01nw3k

Conversation

@vercel
Copy link
Copy Markdown
Contributor

@vercel vercel Bot commented May 15, 2026

Vercel Speed Insights Installation

Successfully installed and configured Vercel Speed Insights for this project.

What was implemented:

  1. Package Installation

    • Installed @vercel/speed-insights@2.0.0 package via npm
    • Updated package.json to include the dependency
    • Updated package-lock.json with the new package and its dependencies
  2. Code Integration

    • Added Speed Insights initialization script to index.html
    • Used the vanilla JavaScript/static site approach as documented in the official Vercel Speed Insights quickstart guide
    • Added the tracking script reference to /_vercel/speed-insights/script.js which will be automatically served by Vercel when deployed

Implementation Details:

Framework Identified: Static HTML/Vanilla JavaScript

Following the official Vercel documentation for vanilla JavaScript/static sites, I added two script tags to the <head> section of index.html:

  1. An inline script that initializes the Speed Insights queue (window.si and window.siq)
  2. A deferred script tag that loads the Speed Insights tracking script from /_vercel/speed-insights/script.js

This approach allows the Speed Insights library to track Web Vitals and other performance metrics once the site is deployed to Vercel.

Files Modified:

  • index.html - Added Speed Insights initialization and script loading
  • package.json - Added @vercel/speed-insights dependency
  • package-lock.json - Updated with new dependency information

Testing Performed:

  • ✅ Ran npm run verify:files - Passed (80 required files verified)
  • ✅ Ran npm run smoke:static - Passed (4 local asset references and 17 storefront markers verified)
  • ✅ Verified Speed Insights script tag is present in served HTML
  • ✅ Confirmed no syntax errors in JavaScript assets

Next Steps:

Once deployed to Vercel with Speed Insights enabled in the dashboard:

  1. The /_vercel/speed-insights/script.js route will be automatically available
  2. Performance metrics will start being collected from real user visits
  3. Data will be visible in the Vercel Speed Insights dashboard

Notes:

  • Speed Insights does not track data in development mode (when running locally)
  • The tracking script is loaded with defer to not block page rendering
  • No additional configuration is required for basic functionality
  • The implementation follows the official Vercel documentation fetched from https://vercel.com/docs/speed-insights/quickstart

View Project · Speed Insights

Created by geimerpedroza-8977 with Vercel Agent

## Vercel Speed Insights Installation

Successfully installed and configured Vercel Speed Insights for this project.

### What was implemented:

1. **Package Installation**
   - Installed `@vercel/speed-insights@2.0.0` package via npm
   - Updated `package.json` to include the dependency
   - Updated `package-lock.json` with the new package and its dependencies

2. **Code Integration**
   - Added Speed Insights initialization script to `index.html`
   - Used the vanilla JavaScript/static site approach as documented in the official Vercel Speed Insights quickstart guide
   - Added the tracking script reference to `/_vercel/speed-insights/script.js` which will be automatically served by Vercel when deployed

### Implementation Details:

**Framework Identified:** Static HTML/Vanilla JavaScript

Following the official Vercel documentation for vanilla JavaScript/static sites, I added two script tags to the `<head>` section of `index.html`:

1. An inline script that initializes the Speed Insights queue (`window.si` and `window.siq`)
2. A deferred script tag that loads the Speed Insights tracking script from `/_vercel/speed-insights/script.js`

This approach allows the Speed Insights library to track Web Vitals and other performance metrics once the site is deployed to Vercel.

### Files Modified:

- `index.html` - Added Speed Insights initialization and script loading
- `package.json` - Added `@vercel/speed-insights` dependency
- `package-lock.json` - Updated with new dependency information

### Testing Performed:

- ✅ Ran `npm run verify:files` - Passed (80 required files verified)
- ✅ Ran `npm run smoke:static` - Passed (4 local asset references and 17 storefront markers verified)
- ✅ Verified Speed Insights script tag is present in served HTML
- ✅ Confirmed no syntax errors in JavaScript assets

### Next Steps:

Once deployed to Vercel with Speed Insights enabled in the dashboard:
1. The `/_vercel/speed-insights/script.js` route will be automatically available
2. Performance metrics will start being collected from real user visits
3. Data will be visible in the Vercel Speed Insights dashboard

### Notes:

- Speed Insights does not track data in development mode (when running locally)
- The tracking script is loaded with `defer` to not block page rendering
- No additional configuration is required for basic functionality
- The implementation follows the official Vercel documentation fetched from https://vercel.com/docs/speed-insights/quickstart

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
@vercel
Copy link
Copy Markdown
Contributor Author

vercel Bot commented May 15, 2026

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

Project Deployment Actions Updated (UTC)
feishtml Ready Ready Preview, Comment May 15, 2026 9:32am

@supabase
Copy link
Copy Markdown

supabase Bot commented May 15, 2026

This pull request has been ignored for the connected project nejzzerwtgtbqawaizuo because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@feispla feispla marked this pull request as ready for review May 15, 2026 09:33
@feispla feispla merged commit 7e9a6bb into main May 15, 2026
4 checks passed
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.

1 participant