Skip to content

Install and configure Vercel Web Analytics#1

Draft
vercel[bot] wants to merge 1 commit into
mainfrom
vercel/install-and-configure-vercel-w-f8cb7t
Draft

Install and configure Vercel Web Analytics#1
vercel[bot] wants to merge 1 commit into
mainfrom
vercel/install-and-configure-vercel-w-f8cb7t

Conversation

@vercel

@vercel vercel Bot commented May 10, 2026

Copy link
Copy Markdown

Vercel Web Analytics Installation - Implementation Report

Successfully installed and configured Vercel Web Analytics for the Baseflow static HTML website.

What Was Implemented

This project is a static HTML website without a JavaScript framework or package manager. Following the official Vercel Analytics documentation (https://vercel.com/docs/analytics/quickstart and https://vercel.com/docs/analytics/package), I implemented the HTML5/vanilla JavaScript approach.

Changes Made

Added Vercel Web Analytics script to all HTML files:

  1. index.html - Main landing page
  2. battery.html - Battery technology page
  3. presale.html - Waitlist/presale page
  4. tokenomics.html - Tokenomics details
  5. roadmap.html - Development roadmap
  6. solar.html - Solar procurement page
  7. vision.html - Vision and installations
  8. poc.html - Proof of concept page
  9. website/thai-solar-market.html - Thai solar market analysis

Script Added:

<!-- Vercel Web Analytics -->
<script defer src="https://cdn.vercel-insights.com/v1/script.js"></script>

Implementation Details

For static HTML projects, Vercel Web Analytics uses a CDN-hosted script that is loaded via a <script> tag with the defer attribute. This approach:

  • Loads the analytics script asynchronously without blocking page rendering
  • Automatically tracks page views when visitors navigate to any page
  • Integrates with Vercel's platform to collect analytics data
  • Requires no additional configuration or package installation

The script was placed in the <head> section of each HTML file, just before the <style> tag, following best practices for analytics integration.

Next Steps

To complete the setup:

  1. Enable Analytics in Vercel Dashboard: Navigate to your project in the Vercel dashboard and enable Web Analytics by clicking the "Enable" button in the Analytics section
  2. Deploy the Changes: Push these changes to your repository and deploy to Vercel
  3. Verify Installation: After deployment, visit your website and check the browser's Network tab for requests to the Vercel analytics endpoints to confirm proper tracking
  4. View Analytics: Return to the Vercel dashboard after some traffic to view visitor data, page views, and other metrics

Technical Notes

  • No Package Manager Required: Since this is a pure HTML/CSS/JavaScript project without build tools, there's no package.json or package manager to use. The @vercel/analytics npm package is only needed for framework-based projects (Next.js, React, Vue, etc.)
  • CDN-Based Approach: The script is loaded from https://cdn.vercel-insights.com/v1/script.js, which is Vercel's official CDN for Web Analytics
  • Automatic Tracking: No additional JavaScript code is required - the script automatically tracks page views and navigation events
  • Privacy-Friendly: Vercel Web Analytics is GDPR-compliant and doesn't use cookies

Files Modified

All modifications were source code changes to HTML files. No build artifacts, dependencies, or lock files needed updating since this is a static site.


View Project · Web Analytics

Created by runeov-5973 with Vercel Agent

## Vercel Web Analytics Installation - Implementation Report

Successfully installed and configured Vercel Web Analytics for the Baseflow static HTML website.

### What Was Implemented

This project is a static HTML website without a JavaScript framework or package manager. Following the official Vercel Analytics documentation (https://vercel.com/docs/analytics/quickstart and https://vercel.com/docs/analytics/package), I implemented the HTML5/vanilla JavaScript approach.

### Changes Made

**Added Vercel Web Analytics script to all HTML files:**

1. `index.html` - Main landing page
2. `battery.html` - Battery technology page
3. `presale.html` - Waitlist/presale page
4. `tokenomics.html` - Tokenomics details
5. `roadmap.html` - Development roadmap
6. `solar.html` - Solar procurement page
7. `vision.html` - Vision and installations
8. `poc.html` - Proof of concept page
9. `website/thai-solar-market.html` - Thai solar market analysis

**Script Added:**
```html
<!-- Vercel Web Analytics -->
<script defer src="https://cdn.vercel-insights.com/v1/script.js"></script>
```

### Implementation Details

For static HTML projects, Vercel Web Analytics uses a CDN-hosted script that is loaded via a `<script>` tag with the `defer` attribute. This approach:

- Loads the analytics script asynchronously without blocking page rendering
- Automatically tracks page views when visitors navigate to any page
- Integrates with Vercel's platform to collect analytics data
- Requires no additional configuration or package installation

The script was placed in the `<head>` section of each HTML file, just before the `<style>` tag, following best practices for analytics integration.

### Next Steps

To complete the setup:

1. **Enable Analytics in Vercel Dashboard**: Navigate to your project in the Vercel dashboard and enable Web Analytics by clicking the "Enable" button in the Analytics section
2. **Deploy the Changes**: Push these changes to your repository and deploy to Vercel
3. **Verify Installation**: After deployment, visit your website and check the browser's Network tab for requests to the Vercel analytics endpoints to confirm proper tracking
4. **View Analytics**: Return to the Vercel dashboard after some traffic to view visitor data, page views, and other metrics

### Technical Notes

- **No Package Manager Required**: Since this is a pure HTML/CSS/JavaScript project without build tools, there's no `package.json` or package manager to use. The `@vercel/analytics` npm package is only needed for framework-based projects (Next.js, React, Vue, etc.)
- **CDN-Based Approach**: The script is loaded from `https://cdn.vercel-insights.com/v1/script.js`, which is Vercel's official CDN for Web Analytics
- **Automatic Tracking**: No additional JavaScript code is required - the script automatically tracks page views and navigation events
- **Privacy-Friendly**: Vercel Web Analytics is GDPR-compliant and doesn't use cookies

### Files Modified

All modifications were source code changes to HTML files. No build artifacts, dependencies, or lock files needed updating since this is a static site.

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

vercel Bot commented May 10, 2026

Copy link
Copy Markdown
Author

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

Project Deployment Actions Updated (UTC)
baseflow Ready Ready Preview, Comment May 10, 2026 8:05pm

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