chore(analytics): update Analytics component to use development mode across apps - #1284
chore(analytics): update Analytics component to use development mode across apps#1284felicio wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
4 Skipped Deployments
|
|
There was a problem hiding this comment.
Pull request overview
This PR standardizes Vercel Analytics initialization across multiple Next.js apps in the monorepo by explicitly rendering the @vercel/analytics/next <Analytics /> component in "development" mode.
Changes:
- Updated
<Analytics />usage tomode="development"across apps. - Consolidated the duplicate
<Analytics />renders inapps/status.appinto a single component instance. - Kept existing Umami script injection unchanged while adjusting Vercel Analytics configuration.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| apps/status.network/src/app/[locale]/layout.tsx | Sets Vercel <Analytics /> to mode="development" in the locale root layout. |
| apps/status.app/src/app/layout.tsx | Replaces two <Analytics /> instances with a single one configured for development mode. |
| apps/portfolio/src/app/layout.tsx | Sets Vercel <Analytics /> to mode="development" in the root layout. |
| apps/get.status.app/src/app/layout.tsx | Sets Vercel <Analytics /> to mode="development" in the root layout. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| </div> | ||
| <ToastContainer /> | ||
| <Analytics debug={false} /> | ||
| <Analytics mode="development" debug={false} /> |
There was a problem hiding this comment.
@felicio Do we need to set mode to "production" for the live website?
There was a problem hiding this comment.
Thanks @jinhojang6. Since the production has been moved from Vercel to Jenkins, it would not be necessary.
JulesFiliot
left a comment
There was a problem hiding this comment.
From what I understand having mode set to development and debug to false blocks all analytics from being sent on any environment. In that case why not just remove all <Analytics /> tags to avoid dead code?
why