Merged
Conversation
## 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>
Contributor
Author
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
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: |
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Vercel Web Analytics Integration for Nuxt Docs
Successfully implemented Vercel Web Analytics for the Nuxt documentation site.
Changes Made:
Installed @vercel/analytics package
@vercel/analytics@^1.6.1toapps/docs/package.jsonpnpm-lock.yamlwith the new dependencyCreated app.vue file
apps/docs/app/app.vuewith:<NuxtPage />and<Analytics />componentsImplementation Details:
The app.vue file follows Nuxt 3 best practices:
<script setup lang="ts">for TypeScript supportVerification:
pnpm build)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