Skip to content

Install Vercel Web Analytics - #29

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

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

Conversation

@vercel

@vercel vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

Vercel Web Analytics Integration

Successfully installed and configured Vercel Web Analytics for this Docusaurus project.

Changes Made

Modified Files:

  1. package.json

    • Added @docusaurus/plugin-vercel-analytics (version 3.9.2) to dependencies
    • This is the official Docusaurus plugin for Vercel Analytics
  2. package-lock.json

    • Updated to include the Vercel Analytics plugin and its dependencies
    • Ensures consistent dependency resolution across environments
  3. docusaurus.config.js

    • Added Vercel Analytics plugin to the plugins array
    • Configured with options:
      • debug: false - Disables console logging of analytics events in production
      • mode: 'auto' - Automatic environment detection

Implementation Details

Following the official Docusaurus documentation for Vercel Analytics integration, I used the dedicated @docusaurus/plugin-vercel-analytics plugin rather than the generic React implementation. This is the recommended approach for Docusaurus sites.

The plugin was added as the first plugin in the configuration array, before the existing client-redirects plugin. It operates exclusively in production builds and remains inactive during development to prevent skewing analytics data.

Configuration

[
  '@docusaurus/plugin-vercel-analytics',
  {
    debug: false,
    mode: 'auto',
  },
]

Next Steps

  1. Deploy the site to Vercel
  2. Enable Web Analytics in the Vercel dashboard:
    • Navigate to the project settings
    • Go to Analytics section
    • Click "Enable" button
  3. After deployment, verify analytics are working by checking the browser's Network tab for requests to /_vercel/insights/*

Verification

  • ✓ Configuration file loads successfully without syntax errors
  • ✓ Plugin is properly registered and configured
  • ✓ Package dependencies are installed correctly
  • ✓ Lock file is updated
  • ✓ No vulnerabilities detected

The analytics will automatically start tracking page views and Web Vitals metrics once the site is deployed to Vercel and analytics are enabled in the dashboard.


View Project · Web Analytics

Created by contact-1127 with Vercel Agent

## Vercel Web Analytics Integration

Successfully installed and configured Vercel Web Analytics for this Docusaurus project.

### Changes Made

**Modified Files:**

1. **package.json**
   - Added `@docusaurus/plugin-vercel-analytics` (version 3.9.2) to dependencies
   - This is the official Docusaurus plugin for Vercel Analytics

2. **package-lock.json**
   - Updated to include the Vercel Analytics plugin and its dependencies
   - Ensures consistent dependency resolution across environments

3. **docusaurus.config.js**
   - Added Vercel Analytics plugin to the plugins array
   - Configured with options:
     - `debug: false` - Disables console logging of analytics events in production
     - `mode: 'auto'` - Automatic environment detection

### Implementation Details

Following the official Docusaurus documentation for Vercel Analytics integration, I used the dedicated `@docusaurus/plugin-vercel-analytics` plugin rather than the generic React implementation. This is the recommended approach for Docusaurus sites.

The plugin was added as the first plugin in the configuration array, before the existing client-redirects plugin. It operates exclusively in production builds and remains inactive during development to prevent skewing analytics data.

### Configuration

```javascript
[
  '@docusaurus/plugin-vercel-analytics',
  {
    debug: false,
    mode: 'auto',
  },
]
```

### Next Steps

1. Deploy the site to Vercel
2. Enable Web Analytics in the Vercel dashboard:
   - Navigate to the project settings
   - Go to Analytics section
   - Click "Enable" button
3. After deployment, verify analytics are working by checking the browser's Network tab for requests to `/_vercel/insights/*`

### Verification

- ✓ Configuration file loads successfully without syntax errors
- ✓ Plugin is properly registered and configured
- ✓ Package dependencies are installed correctly
- ✓ Lock file is updated
- ✓ No vulnerabilities detected

The analytics will automatically start tracking page views and Web Vitals metrics once the site is deployed to Vercel and analytics are enabled in the dashboard.

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

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown
Author

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jul 15, 2026 2:38pm

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​docusaurus/​plugin-vercel-analytics@​3.9.2801006998100

View full report

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