Opencccx - #45587
Closed
503badrr wants to merge 3 commits into
Closed
Conversation
Implemented Vercel Web Analytics for this Next.js Pages Router project.
Changes Made:
=============
1. Installed @vercel/analytics package (v1.4.2)
- Added to package.json dependencies
- Updated package-lock.json with the new package and its dependencies
2. Modified src/frame/pages/app.tsx
- Added import: `import { Analytics } from '@vercel/analytics/next'`
- Added the Analytics component inside the root JSX fragment, after the closing ThemeProvider tag
- This placement ensures analytics tracking is active across all pages while respecting the existing component structure
Implementation Details:
=======================
The installation followed the official Vercel Web Analytics quickstart guide for Next.js Pages Router:
- Used the correct import path: '@vercel/analytics/next'
- Placed the Analytics component in the _app equivalent (src/frame/pages/app.tsx)
- The component is positioned at the root level to track all page views
The Analytics component:
- Is self-contained and requires no additional configuration
- Will automatically track page views once deployed to Vercel
- Needs to be enabled in the Vercel dashboard under Analytics after deployment
Testing:
========
✓ Linter passed with no errors
✓ Build completed successfully (npm run build)
✓ TypeScript compilation successful
✓ No breaking changes to existing functionality
Next Steps:
===========
After deploying this change to Vercel:
1. Enable Web Analytics in the Vercel dashboard under Analytics
2. Verify tracking by checking browser Network tab for requests to `/<unique-path>/view`
3. View collected analytics data in the Vercel dashboard
Note: Analytics data will only be collected in production deployments on Vercel.
Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
…el-w-02yzwx Install and Configure Vercel Web Analytics
|
Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines. |
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.
Why:
Closes:
What's being changed (if available, include any code snippets, screenshots, or gifs):
Check off the following: