Skip to content

Enable Vercel Speed Insights setup guide#1

Draft
vercel[bot] wants to merge 1 commit intomainfrom
vercel/enable-vercel-speed-insights-s-d7rfuv
Draft

Enable Vercel Speed Insights setup guide#1
vercel[bot] wants to merge 1 commit intomainfrom
vercel/enable-vercel-speed-insights-s-d7rfuv

Conversation

@vercel
Copy link
Copy Markdown

@vercel vercel Bot commented Mar 11, 2026

Vercel Speed Insights Implementation Report

Summary

Successfully implemented Vercel Speed Insights on the ProScholarsTools website following the official Vercel Speed Insights guide for HTML-based projects.

Changes Made

1. Added Speed Insights Script to All HTML Files (46 files total)

Added the required Speed Insights tracking scripts before the closing </body> tag in all HTML files:

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

Files Modified:

  • /public/index.html - Main landing page
  • /public/*.html - 38 tool and information pages
  • /public/blog/*.html - 7 blog posts

All 46 HTML files in the project now include the Speed Insights tracking scripts.

2. Updated Content Security Policy in vercel.json

Modified the Content-Security-Policy header to allow Speed Insights scripts and connections:

Added to script-src:

  • https://va.vercel-scripts.com - For Speed Insights script loading

Added to connect-src:

  • https://vitals.vercel-insights.com - For Speed Insights data transmission

This ensures the Speed Insights scripts can load and send performance data without being blocked by CSP.

Implementation Details

Approach

  • Used Python script to reliably inject the Speed Insights code before </body> tags
  • Preserved all existing functionality and scripts
  • Maintained consistent formatting across all files

Framework

This is an HTML-based static website, so the HTML implementation method was used (no npm package installation required).

Next Steps for Deployment

According to the Vercel Speed Insights guide:

  1. Enable Speed Insights in Vercel Dashboard:

    • Go to Project â�� Speed Insights tab
    • Click "Enable" to activate the feature
    • This will add routes at /_vercel/speed-insights/* on next deployment
  2. Deploy to Vercel:

    vercel deploy
  3. Verify Installation:

    • After deployment, check the page source for /_vercel/speed-insights/script.js in the body tag
    • Visit the Speed Insights tab in the Vercel dashboard to view performance metrics
  4. View Data:

    • Data will appear in the dashboard after users visit the site
    • Metrics include Core Web Vitals (LCP, FID, CLS) and other performance indicators

Files Staged

  • vercel.json - Updated CSP headers
  • All 46 HTML files in public/ directory with Speed Insights scripts

Verification

� All 46 HTML files contain the Speed Insights script
� CSP headers updated to allow Speed Insights domains
� No existing functionality disrupted
� Changes follow official Vercel documentation


View Project · Speed Insights

Created by rogaareef with Vercel Agent

# Vercel Speed Insights Implementation Report

## Summary
Successfully implemented Vercel Speed Insights on the ProScholarsTools website following the official Vercel Speed Insights guide for HTML-based projects.

## Changes Made

### 1. Added Speed Insights Script to All HTML Files (46 files total)
Added the required Speed Insights tracking scripts before the closing `</body>` tag in all HTML files:

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

**Files Modified:**
- `/public/index.html` - Main landing page
- `/public/*.html` - 38 tool and information pages
- `/public/blog/*.html` - 7 blog posts

All 46 HTML files in the project now include the Speed Insights tracking scripts.

### 2. Updated Content Security Policy in vercel.json
Modified the Content-Security-Policy header to allow Speed Insights scripts and connections:

**Added to script-src:**
- `https://va.vercel-scripts.com` - For Speed Insights script loading

**Added to connect-src:**
- `https://vitals.vercel-insights.com` - For Speed Insights data transmission

This ensures the Speed Insights scripts can load and send performance data without being blocked by CSP.

## Implementation Details

### Approach
- Used Python script to reliably inject the Speed Insights code before `</body>` tags
- Preserved all existing functionality and scripts
- Maintained consistent formatting across all files

### Framework
This is an HTML-based static website, so the HTML implementation method was used (no npm package installation required).

### Next Steps for Deployment
According to the Vercel Speed Insights guide:

1. **Enable Speed Insights in Vercel Dashboard:**
   - Go to Project � Speed Insights tab
   - Click "Enable" to activate the feature
   - This will add routes at `/_vercel/speed-insights/*` on next deployment

2. **Deploy to Vercel:**
   ```bash
   vercel deploy
   ```

3. **Verify Installation:**
   - After deployment, check the page source for `/_vercel/speed-insights/script.js` in the body tag
   - Visit the Speed Insights tab in the Vercel dashboard to view performance metrics

4. **View Data:**
   - Data will appear in the dashboard after users visit the site
   - Metrics include Core Web Vitals (LCP, FID, CLS) and other performance indicators

## Files Staged
- `vercel.json` - Updated CSP headers
- All 46 HTML files in `public/` directory with Speed Insights scripts

## Verification
� All 46 HTML files contain the Speed Insights script
� CSP headers updated to allow Speed Insights domains
� No existing functionality disrupted
� Changes follow official Vercel documentation

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

vercel Bot commented Mar 11, 2026

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

Project Deployment Actions Updated (UTC)
new-pro Ready Ready Preview, Comment Mar 11, 2026 2:31pm

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