Skip to content

Install Vercel Web Analytics Integration#1

Draft
vercel[bot] wants to merge 1 commit into
mainfrom
vercel/install-vercel-web-analytics-i-vxtvyp
Draft

Install Vercel Web Analytics Integration#1
vercel[bot] wants to merge 1 commit into
mainfrom
vercel/install-vercel-web-analytics-i-vxtvyp

Conversation

@vercel

@vercel vercel Bot commented May 31, 2026

Copy link
Copy Markdown

Vercel Web Analytics Implementation

Summary

Successfully installed and configured Vercel Web Analytics for this vanilla HTML project following the latest official Vercel documentation.

Framework Detection

Analyzed the project structure and identified:

  • Project Type: Vanilla HTML (static website)
  • No package.json or framework detected
  • Single page application: index.html

Implementation Details

Changes Made

Modified:

  • index.html - Added Vercel Web Analytics scripts before the closing </body> tag

Code Added

Following the Vercel documentation for vanilla HTML projects, I added two script tags:

  1. Analytics initialization script: Initializes the window.va function that queues analytics events
  2. Analytics tracking script: Deferred script that loads from /_vercel/insights/script.js

The implementation follows the exact pattern from the official Vercel Analytics quickstart guide for vanilla HTML projects.

Implementation Location

The analytics scripts were inserted immediately before the closing </body> tag at the end of index.html (after all existing JavaScript), which ensures:

  • All page content is loaded before analytics initialization
  • No interference with existing JavaScript functionality
  • Proper page view tracking

Next Steps

  1. Deploy the site to Vercel
  2. Enable Analytics in the Vercel Dashboard for this project (navigate to the Analytics section and click Enable)
  3. After deployment, verify analytics are working by:
    • Visiting the deployed site
    • Opening browser DevTools → Network tab
    • Looking for a fetch/XHR request to a path containing /view

Notes

  • No package manager installation was needed as this is a vanilla HTML project
  • No build process required
  • The /_vercel/insights/script.js path is automatically served by Vercel when Analytics is enabled in the dashboard
  • The analytics will only function when deployed to Vercel (not in local development)

View Project · Web Analytics

Created by Giulia Willcox (giuliawillcox-7694) with Vercel Agent

## Vercel Web Analytics Implementation

### Summary
Successfully installed and configured Vercel Web Analytics for this vanilla HTML project following the latest official Vercel documentation.

### Framework Detection
Analyzed the project structure and identified:
- **Project Type**: Vanilla HTML (static website)
- **No package.json or framework detected**
- **Single page application**: index.html

### Implementation Details

#### Changes Made
**Modified:**
- `index.html` - Added Vercel Web Analytics scripts before the closing `</body>` tag

#### Code Added
Following the Vercel documentation for vanilla HTML projects, I added two script tags:

1. **Analytics initialization script**: Initializes the `window.va` function that queues analytics events
2. **Analytics tracking script**: Deferred script that loads from `/_vercel/insights/script.js`

The implementation follows the exact pattern from the official Vercel Analytics quickstart guide for vanilla HTML projects.

### Implementation Location
The analytics scripts were inserted immediately before the closing `</body>` tag at the end of index.html (after all existing JavaScript), which ensures:
- All page content is loaded before analytics initialization
- No interference with existing JavaScript functionality
- Proper page view tracking

### Next Steps
1. Deploy the site to Vercel
2. Enable Analytics in the Vercel Dashboard for this project (navigate to the Analytics section and click Enable)
3. After deployment, verify analytics are working by:
   - Visiting the deployed site
   - Opening browser DevTools → Network tab
   - Looking for a fetch/XHR request to a path containing `/view`

### Notes
- No package manager installation was needed as this is a vanilla HTML project
- No build process required
- The `/_vercel/insights/script.js` path is automatically served by Vercel when Analytics is enabled in the dashboard
- The analytics will only function when deployed to Vercel (not in local development)

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

vercel Bot commented May 31, 2026

Copy link
Copy Markdown
Author

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

Project Deployment Actions Updated (UTC)
giulia-willcox Ready Ready Preview, Comment May 31, 2026 1:01am

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