Install and Configure Vercel Speed Insights#3
Draft
vercel[bot] wants to merge 1 commit into
Draft
Conversation
# Vercel Speed Insights Configuration
Successfully installed and configured Vercel Speed Insights for this static HTML website.
## Changes Made
### 1. Package Installation
- Installed `@vercel/speed-insights` version 2.0.0 (package was already in package.json dependencies)
- Ran `npm install` to install the package to node_modules
### 2. Added Speed Insights Initialization Script
Added the `window.si` initialization script to all 9 HTML files following the official Vercel Speed Insights documentation for vanilla HTML/static sites.
Modified files:
- `index.html` - Main homepage
- `design/index.html` - Design section homepage
- `design/projects/index.html` - Projects listing page
- `design/projects/airbnb-cards/index.html` - Airbnb Cards project page
- `design/projects/airbnb-pdp/index.html` - Airbnb PDP project page
- `design/projects/lemon-wallet/index.html` - Lemon Wallet project page
- `design/projects/netflix-design-system/index.html` - Netflix Design System project page
- `design/projects/xapo/index.html` - Xapo project page
- `music/index.html` - Music section homepage
### 3. Implementation Details
Each HTML file now includes the proper initialization script before the Speed Insights script tag:
```html
<script>
window.si = window.si || function () { (window.siq = window.siq || []).push(arguments); };
</script>
<script defer src="/_vercel/speed-insights/script.js"></script>
```
This follows the official Vercel documentation retrieved from: https://vercel.com/docs/speed-insights/quickstart
### 4. Framework Detection
- This project is a static HTML site with no build step (as noted in package.json)
- Used the vanilla HTML/static site configuration approach
- The Speed Insights script uses the automatic Vercel path `/_vercel/speed-insights/script.js` which is enabled when Speed Insights is activated in the Vercel dashboard
### 5. Testing & Validation
- Verified package installation: @vercel/speed-insights@2.0.0 is properly installed
- Confirmed all 9 HTML files have the initialization script
- No linting or test scripts are configured for this project (static HTML, no build step)
- All changes preserve existing code structure and only add the necessary Speed Insights configuration
## Next Steps
After deployment to Vercel:
1. Speed Insights data will start appearing in the Vercel dashboard after users visit the site
2. No additional configuration is required - the tracking is automatic once enabled in the Vercel dashboard
3. The `/_vercel/speed-insights/script.js` path is automatically served by Vercel's infrastructure
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Contributor
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 Configuration
Successfully installed and configured Vercel Speed Insights for this static HTML website.
Changes Made
1. Package Installation
@vercel/speed-insightsversion 2.0.0 (package was already in package.json dependencies)npm installto install the package to node_modules2. Added Speed Insights Initialization Script
Added the
window.siinitialization script to all 9 HTML files following the official Vercel Speed Insights documentation for vanilla HTML/static sites.Modified files:
index.html- Main homepagedesign/index.html- Design section homepagedesign/projects/index.html- Projects listing pagedesign/projects/airbnb-cards/index.html- Airbnb Cards project pagedesign/projects/airbnb-pdp/index.html- Airbnb PDP project pagedesign/projects/lemon-wallet/index.html- Lemon Wallet project pagedesign/projects/netflix-design-system/index.html- Netflix Design System project pagedesign/projects/xapo/index.html- Xapo project pagemusic/index.html- Music section homepage3. Implementation Details
Each HTML file now includes the proper initialization script before the Speed Insights script tag:
This follows the official Vercel documentation retrieved from: https://vercel.com/docs/speed-insights/quickstart
4. Framework Detection
/_vercel/speed-insights/script.jswhich is enabled when Speed Insights is activated in the Vercel dashboard5. Testing & Validation
Next Steps
After deployment to Vercel:
/_vercel/speed-insights/script.jspath is automatically served by Vercel's infrastructureView Project · Speed Insights
Created by wikichaves with Vercel Agent