fix: restore Vercel Web Analytics (<Analytics /> dropped from layout) - #28
Merged
Conversation
Vercel Analytics recorded no traffic since Jul 18. Root cause: PR #7 (1213307, 'Snapshot UX Improvements') removed the import and <Analytics /> render from app/layout.tsx during the layout rework, so the Web Analytics script stopped loading — no page views, and track() custom events no-op'd. The @vercel/analytics dep was still installed; just re-render the component (from @vercel/analytics/next) in the body. typecheck/build pass.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
🟡 Heimdall Review Status
|
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.
Symptom
Vercel Web Analytics has shown no traffic since Jul 18.
Root cause
<Analytics />was accidentally removed fromapp/layout.tsx:import { Analytics } from '@vercel/analytics/next'+<Analytics />— analytics worked.1213307, Jul 18 02:00) removed both during the layout rework.Without the component, the Web Analytics script never loads, so no page views are sent — and
track()custom events silently no-op too. The@vercel/analyticsdependency was still installed; it just wasn't rendered.Fix
Re-add the import and render
<Analytics />in<body>. typecheck/build pass.Notes
SITE_PASSWORDset), gated visitors never load the app, so analytics would still read ~zero regardless of this fix. If you're seeing the gate, that would compound it — worth confirming the gate is off in prod (or expected).