Skip to content

Enable Vercel Speed Insights tracking#26

Draft
vercel[bot] wants to merge 1 commit intoprincipalefrom
vercel/enable-vercel-speed-insights-t-i7ix39
Draft

Enable Vercel Speed Insights tracking#26
vercel[bot] wants to merge 1 commit intoprincipalefrom
vercel/enable-vercel-speed-insights-t-i7ix39

Conversation

@vercel
Copy link

@vercel vercel bot commented Mar 10, 2026

Vercel Speed Insights Implementation

Summary

Successfully implemented Vercel Speed Insights for the HTML-based project following the official Vercel documentation.

Changes Made

Modified Files

  • index.html - Added Vercel Speed Insights script tags

Implementation Details

According to the Vercel Speed Insights guide for HTML projects, I added the required script tags before the closing </body> tag:

  1. Initialization Script: Added the window.si initialization function that queues Speed Insights calls
  2. Tracking Script: Added the deferred loading of the Speed Insights script from /_vercel/speed-insights/script.js

Additional Fixes

The original index.html file was missing closing </body> and </html> tags. These have been added to ensure proper HTML structure along with the Speed Insights implementation.

Code Added

<script>
    window.si = window.si || function () { (window.siq = window.siq || []).push(arguments); };
</script>
<script defer src="/_vercel/speed-insights/script.js"></script>

</body>
</html>

Next Steps

Once deployed to Vercel with Speed Insights enabled:

  1. The /_vercel/speed-insights/* routes will be automatically added
  2. Performance metrics will start being collected
  3. Data can be viewed in the Vercel dashboard under the Speed Insights tab

Notes

  • No package installation was required for the HTML implementation
  • The scripts are loaded with the defer attribute to avoid blocking page rendering
  • Speed Insights will only function when deployed to Vercel with the feature enabled in the project settings

View Project · Speed Insights

Created by TA2MAi (t2mai) with Vercel Agent

# Vercel Speed Insights Implementation

## Summary
Successfully implemented Vercel Speed Insights for the HTML-based project following the official Vercel documentation.

## Changes Made

### Modified Files
- **index.html** - Added Vercel Speed Insights script tags

## Implementation Details

According to the Vercel Speed Insights guide for HTML projects, I added the required script tags before the closing `</body>` tag:

1. **Initialization Script**: Added the `window.si` initialization function that queues Speed Insights calls
2. **Tracking Script**: Added the deferred loading of the Speed Insights script from `/_vercel/speed-insights/script.js`

## Additional Fixes

The original `index.html` file was missing closing `</body>` and `</html>` tags. These have been added to ensure proper HTML structure along with the Speed Insights implementation.

## Code Added

```html
<script>
    window.si = window.si || function () { (window.siq = window.siq || []).push(arguments); };
</script>
<script defer src="/_vercel/speed-insights/script.js"></script>

</body>
</html>
```

## Next Steps

Once deployed to Vercel with Speed Insights enabled:
1. The `/_vercel/speed-insights/*` routes will be automatically added
2. Performance metrics will start being collected
3. Data can be viewed in the Vercel dashboard under the Speed Insights tab

## Notes

- No package installation was required for the HTML implementation
- The scripts are loaded with the `defer` attribute to avoid blocking page rendering
- Speed Insights will only function when deployed to Vercel with the feature enabled in the project settings

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

vercel bot commented Mar 10, 2026

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

Project Deployment Actions Updated (UTC)
repository-dev-t2m Error Error Mar 10, 2026 9:49pm
t2m Error Error Mar 10, 2026 9:49pm

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