Skip to content

Install Vercel Speed Insights - #2

Draft
vercel[bot] wants to merge 1 commit into
mainfrom
vercel/install-vercel-speed-insights-c1plqr
Draft

Install Vercel Speed Insights#2
vercel[bot] wants to merge 1 commit into
mainfrom
vercel/install-vercel-speed-insights-c1plqr

Conversation

@vercel

@vercel vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

Implemented Vercel Speed Insights for this project

I successfully installed and configured Vercel Speed Insights following the latest official documentation from https://vercel.com/docs/speed-insights/quickstart

Changes Made:

1. Package Installation

  • Added @vercel/speed-insights v2.0.0 to dependencies in package.json
  • Updated package-lock.json with the new dependency and its subdependencies

2. Speed Insights Integration (public/index.html)

  • Added the Speed Insights script tag: <script defer src="/_vercel/speed-insights/script.js"></script>
  • Placed it alongside the existing Vercel Analytics script for consistency
  • Used defer attribute to ensure non-blocking loading

3. Content Security Policy Update (vercel.json)

  • Updated the CSP connect-src directive to allow connections to:
    • https://vercel-insights.com
    • https://vitals.vercel-insights.com
  • This allows Speed Insights to send performance data to Vercel's servers
  • Maintained all existing security policies

Implementation Notes:

This project uses vanilla HTML/JavaScript (not a framework like Next.js or React), so I followed the "Vanilla/Other Frameworks" approach from the official documentation, which requires adding the script tag directly to the HTML.

The Speed Insights script will be automatically served by Vercel at /_vercel/speed-insights/script.js once Speed Insights is enabled in the Vercel dashboard for this project.

Verification:

  • Build script completed successfully
  • All JavaScript syntax checks passed (npm run check)
  • No linting errors introduced
  • Package lock file properly updated

Next Steps:

To complete the setup, the project maintainer should:

  1. Enable Speed Insights in the Vercel dashboard (Project Settings → Speed Insights → Enable)
  2. Deploy the changes to Vercel
  3. Monitor performance metrics in the Speed Insights dashboard after user visits

View Project · Speed Insights

Created by davidsutrin (davidsutrin) with Vercel Agent

Implemented Vercel Speed Insights for this project

I successfully installed and configured Vercel Speed Insights following the latest official documentation from https://vercel.com/docs/speed-insights/quickstart

## Changes Made:

### 1. Package Installation
- Added `@vercel/speed-insights` v2.0.0 to dependencies in package.json
- Updated package-lock.json with the new dependency and its subdependencies

### 2. Speed Insights Integration (public/index.html)
- Added the Speed Insights script tag: `<script defer src="/_vercel/speed-insights/script.js"></script>`
- Placed it alongside the existing Vercel Analytics script for consistency
- Used `defer` attribute to ensure non-blocking loading

### 3. Content Security Policy Update (vercel.json)
- Updated the CSP `connect-src` directive to allow connections to:
  - `https://vercel-insights.com`
  - `https://vitals.vercel-insights.com`
- This allows Speed Insights to send performance data to Vercel's servers
- Maintained all existing security policies

## Implementation Notes:

This project uses vanilla HTML/JavaScript (not a framework like Next.js or React), so I followed the "Vanilla/Other Frameworks" approach from the official documentation, which requires adding the script tag directly to the HTML.

The Speed Insights script will be automatically served by Vercel at `/_vercel/speed-insights/script.js` once Speed Insights is enabled in the Vercel dashboard for this project.

## Verification:

- Build script completed successfully
- All JavaScript syntax checks passed (npm run check)
- No linting errors introduced
- Package lock file properly updated

## Next Steps:

To complete the setup, the project maintainer should:
1. Enable Speed Insights in the Vercel dashboard (Project Settings → Speed Insights → Enable)
2. Deploy the changes to Vercel
3. Monitor performance metrics in the Speed Insights dashboard after user visits

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

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown
Author

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

Project Deployment Actions Updated (UTC)
receipt Ready Ready Preview, Comment Jul 19, 2026 8:56pm

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