Add Vercel Speed Insights to project - #2
Draft
vercel[bot] wants to merge 1 commit into
Draft
Conversation
## Vercel Speed Insights Installation
Successfully installed and configured Vercel Speed Insights for the MD-to-DOCX project.
### What Was Implemented
**Modified Files:**
- `index.html` - Added Vercel Speed Insights script tags
### Implementation Details
This project is a vanilla HTML/JavaScript application (no build process or package manager). Following the official Vercel Speed Insights quickstart documentation for non-framework applications, I added the Speed Insights initialization and script loader to the HTML file.
**Changes Made:**
1. Added Speed Insights initialization script in the `<head>` section
2. Added the deferred script loader that points to `/_vercel/speed-insights/script.js`
3. Positioned the scripts right after the existing Vercel Web Analytics scripts for consistency
The implementation follows the exact pattern recommended in the official Vercel documentation:
```html
<!-- Vercel Speed Insights -->
<script>
window.si = window.si || function () { (window.siq = window.siq || []).push(arguments); };
</script>
<script defer src="/_vercel/speed-insights/script.js"></script>
```
### Why This Approach
Since this is a vanilla HTML/JavaScript project without a package.json or build process, the npm package `@vercel/speed-insights` is not applicable. Instead, Vercel automatically serves the Speed Insights script at the `/_vercel/speed-insights/script.js` path when the feature is enabled in the Vercel dashboard.
This is the same approach already used in the project for Vercel Web Analytics, ensuring consistency with the existing architecture.
### Next Steps
To complete the Speed Insights setup:
1. Deploy this change to Vercel
2. Enable Speed Insights in the Vercel dashboard for your project
3. Vercel will automatically inject the Speed Insights functionality at the `/_vercel/speed-insights/script.js` endpoint
### Notes
- No dependencies need to be installed since this is a static HTML site
- No build process required - the changes are ready to deploy as-is
- The Speed Insights will start collecting data once enabled in the Vercel dashboard after deployment
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
Successfully installed and configured Vercel Speed Insights for the MD-to-DOCX project.
What Was Implemented
Modified Files:
index.html- Added Vercel Speed Insights script tagsImplementation Details
This project is a vanilla HTML/JavaScript application (no build process or package manager). Following the official Vercel Speed Insights quickstart documentation for non-framework applications, I added the Speed Insights initialization and script loader to the HTML file.
Changes Made:
<head>section/_vercel/speed-insights/script.jsThe implementation follows the exact pattern recommended in the official Vercel documentation:
Why This Approach
Since this is a vanilla HTML/JavaScript project without a package.json or build process, the npm package
@vercel/speed-insightsis not applicable. Instead, Vercel automatically serves the Speed Insights script at the/_vercel/speed-insights/script.jspath when the feature is enabled in the Vercel dashboard.This is the same approach already used in the project for Vercel Web Analytics, ensuring consistency with the existing architecture.
Next Steps
To complete the Speed Insights setup:
/_vercel/speed-insights/script.jsendpointNotes
View Project · Speed Insights
Created by silvercipherr with Vercel Agent