Skip to content

Enable Vercel Web Analytics in Your Project#1

Draft
vercel[bot] wants to merge 1 commit intomainfrom
vercel/enable-vercel-web-analytics-in-oaf81s
Draft

Enable Vercel Web Analytics in Your Project#1
vercel[bot] wants to merge 1 commit intomainfrom
vercel/enable-vercel-web-analytics-in-oaf81s

Conversation

@vercel
Copy link

@vercel vercel bot commented Mar 11, 2026

Vercel Web Analytics Implementation

I have successfully implemented Vercel Web Analytics across the entire hire-web-developer.com website.

What Was Implemented

Added Vercel Web Analytics tracking script to all HTML files in the project. Since this is a static HTML website (not a Next.js, React, or other framework-based application), I used the HTML implementation method as specified in the Vercel Web Analytics documentation.

Changes Made

Modified Files: 65 HTML files

All HTML files across the website now include the Vercel Analytics tracking script in the <head> section, placed just before the closing </head> tag:

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

Files Modified

  1. Root Level HTML Files:

    • index.html
    • about.html
    • 404.html
    • hire-flex-developer.html
    • hire-wordpress-developer.html
  2. Directory-Based HTML Files (60 files):

    • All index.html files in subdirectories including:
      • Developer skills pages (bootstrap-developer, docker, figma-developer, etc.)
      • Regional hire pages (hire-laravel-developer-, hire-php-developer-, etc.)
      • Specialized pages (contact, pricing, reviews, etc.)

Implementation Details

  • Method Used: Plain HTML script tag implementation (as per Vercel documentation for HTML sites)
  • Placement: Scripts added immediately before </head> tag in all files
  • Script Purpose:
    • First script initializes the window.va function for analytics
    • Second script loads the Vercel Insights tracking script with defer attribute for optimal performance

What Happens Next

Once the website is deployed to Vercel with these changes:

  1. The /_vercel/insights/* routes will be automatically created after the next deployment
  2. Visitor tracking will begin automatically
  3. Page views will be recorded for all 65 pages across the site
  4. Analytics data will be available in the Vercel dashboard under the Analytics tab

Notes

  • No package.json or dependencies needed for HTML implementation
  • No build step required
  • The analytics script loads asynchronously (deferred) to avoid blocking page rendering
  • Each page view will generate a Fetch/XHR request to /_vercel/insights/view (visible in browser Network tab)
  • This implementation provides basic page view tracking; route support is not available for plain HTML sites

Testing Recommendation

After deployment, verify the implementation by:

  1. Visiting any page on the site
  2. Opening browser DevTools > Network tab
  3. Looking for a request to /_vercel/insights/view
  4. Checking the Vercel dashboard Analytics tab for incoming data

View Project · Web Analytics

Created by matviyroman2 with Vercel Agent

## Vercel Web Analytics Implementation

I have successfully implemented Vercel Web Analytics across the entire hire-web-developer.com website.

### What Was Implemented

Added Vercel Web Analytics tracking script to all HTML files in the project. Since this is a static HTML website (not a Next.js, React, or other framework-based application), I used the HTML implementation method as specified in the Vercel Web Analytics documentation.

### Changes Made

**Modified Files:** 65 HTML files

All HTML files across the website now include the Vercel Analytics tracking script in the `<head>` section, placed just before the closing `</head>` tag:

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

### Files Modified

1. **Root Level HTML Files:**
   - index.html
   - about.html
   - 404.html
   - hire-flex-developer.html
   - hire-wordpress-developer.html

2. **Directory-Based HTML Files (60 files):**
   - All index.html files in subdirectories including:
     - Developer skills pages (bootstrap-developer, docker, figma-developer, etc.)
     - Regional hire pages (hire-laravel-developer-*, hire-php-developer-*, etc.)
     - Specialized pages (contact, pricing, reviews, etc.)

### Implementation Details

- **Method Used:** Plain HTML script tag implementation (as per Vercel documentation for HTML sites)
- **Placement:** Scripts added immediately before `</head>` tag in all files
- **Script Purpose:** 
  - First script initializes the `window.va` function for analytics
  - Second script loads the Vercel Insights tracking script with defer attribute for optimal performance

### What Happens Next

Once the website is deployed to Vercel with these changes:

1. The `/_vercel/insights/*` routes will be automatically created after the next deployment
2. Visitor tracking will begin automatically
3. Page views will be recorded for all 65 pages across the site
4. Analytics data will be available in the Vercel dashboard under the Analytics tab

### Notes

- No package.json or dependencies needed for HTML implementation
- No build step required
- The analytics script loads asynchronously (deferred) to avoid blocking page rendering
- Each page view will generate a Fetch/XHR request to `/_vercel/insights/view` (visible in browser Network tab)
- This implementation provides basic page view tracking; route support is not available for plain HTML sites

### Testing Recommendation

After deployment, verify the implementation by:
1. Visiting any page on the site
2. Opening browser DevTools > Network tab
3. Looking for a request to `/_vercel/insights/view`
4. Checking the Vercel dashboard Analytics tab for incoming data

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

vercel bot commented Mar 11, 2026

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

Project Deployment Actions Updated (UTC)
hire-web-developer-com Ready Ready Preview, Comment Mar 11, 2026 2:40pm

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