Skip to content

feat(docs): add Vercel Web Analytics#9

Merged
HugoRCD merged 2 commits intomainfrom
vercel/vercel-web-analytics-to-nuxt-gaz2ni
Feb 22, 2026
Merged

feat(docs): add Vercel Web Analytics#9
HugoRCD merged 2 commits intomainfrom
vercel/vercel-web-analytics-to-nuxt-gaz2ni

Conversation

@vercel
Copy link
Copy Markdown
Contributor

@vercel vercel Bot commented Feb 22, 2026

Vercel Web Analytics Integration for Nuxt Docs

Successfully implemented Vercel Web Analytics for the Nuxt documentation site.

Changes Made:

  1. Installed @vercel/analytics package

    • Added @vercel/analytics@^1.6.1 to apps/docs/package.json
    • Updated pnpm-lock.yaml with the new dependency
  2. Created app.vue file

    • Created apps/docs/app/app.vue with:
      • Script setup section importing Analytics from '@vercel/analytics/nuxt'
      • Template containing both <NuxtPage /> and <Analytics /> components
    • Placed alongside existing root components as required

Implementation Details:

The app.vue file follows Nuxt 3 best practices:

  • Uses <script setup lang="ts"> for TypeScript support
  • Imports the Analytics component from the Nuxt-specific package
  • Places the Analytics component in the template alongside NuxtPage
  • Preserves the existing Docus theme structure (which extends the Nuxt config)

Verification:

  • ✅ Build completed successfully (pnpm build)
  • ✅ No TypeScript errors
  • ✅ Lock file updated correctly
  • ✅ All changes follow existing project patterns

The Vercel Web Analytics will now automatically track page views and web vitals when deployed to Vercel.


View Project · Web Analytics

Created by Hugo Richard (hugorcd) with Vercel Agent

## Vercel Web Analytics Integration for Nuxt Docs

Successfully implemented Vercel Web Analytics for the Nuxt documentation site.

### Changes Made:

1. **Installed @vercel/analytics package**
   - Added `@vercel/analytics@^1.6.1` to `apps/docs/package.json`
   - Updated `pnpm-lock.yaml` with the new dependency

2. **Created app.vue file**
   - Created `apps/docs/app/app.vue` with:
     - Script setup section importing Analytics from '@vercel/analytics/nuxt'
     - Template containing both `<NuxtPage />` and `<Analytics />` components
   - Placed alongside existing root components as required

### Implementation Details:

The app.vue file follows Nuxt 3 best practices:
- Uses `<script setup lang="ts">` for TypeScript support
- Imports the Analytics component from the Nuxt-specific package
- Places the Analytics component in the template alongside NuxtPage
- Preserves the existing Docus theme structure (which extends the Nuxt config)

### Verification:

- ✅ Build completed successfully (`pnpm build`)
- ✅ No TypeScript errors
- ✅ Lock file updated correctly
- ✅ All changes follow existing project patterns

The Vercel Web Analytics will now automatically track page views and web vitals when deployed to Vercel.

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

vercel Bot commented Feb 22, 2026

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

Project Deployment Actions Updated (UTC)
github-tools-docs Ready Ready Preview, Comment Feb 22, 2026 1:33pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 22, 2026

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Details:

Unknown scope "docs" found in pull request title "feat(docs): add Vercel Web Analytics". Scope must match one of: sdk, chat, deps.

@HugoRCD HugoRCD changed the title Add Vercel Web Analytics to Nuxt feat(docs): add Vercel Web Analytics Feb 22, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Feb 22, 2026

npm i https://pkg.pr.new/@github-tools/sdk@9

commit: c8f698b

@HugoRCD HugoRCD marked this pull request as ready for review February 22, 2026 13:31
@HugoRCD HugoRCD merged commit eb189a8 into main Feb 22, 2026
7 of 9 checks passed
@HugoRCD HugoRCD deleted the vercel/vercel-web-analytics-to-nuxt-gaz2ni branch February 22, 2026 13:31
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.

1 participant