feat(APP-974): Integrate Vercel Speed Insights and Analytics#1207
Merged
tyhonchik merged 1 commit intoJul 6, 2026
Merged
Conversation
Install @vercel/speed-insights and @vercel/analytics and mount their App Router components in the root layout to collect Web Vitals and page-view metrics on Vercel deployments.
|
🚀 Preview Deployment: View Here |
|
E2E results (preview) Smoke
|
Merged
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.
Installs and mounts Vercel's official App Router components so the Speed Insights and Web Analytics dashboards start receiving data on deployments. Previously both were empty because the collection packages were not wired into the app.
Changes
@vercel/analytics@2.0.1and@vercel/speed-insights@2.0.0.<Analytics />and<SpeedInsights />(App Router variants) rendered inside<body>of the root layout (layoutRoot.tsx), after<Providers>. They run inautomode and no-op outside Vercel/dev, so no env gating is needed.layoutRoot.test.tsx(same pattern as the existingProvidersmock) to avoid Jest ESM transform errors.CSP
No CSP changes required. In production/staging
'strict-dynamic'propagates trust to the script the (nonce'd) app bundle injects; in preview/local'self'/https:cover the same-origin/_vercel/.../script.js; beacons hit same-origin/_vercel/*and are also allowed byconnect-src *.Verification
pnpm type-check— cleanpnpm test:changed— 4 passedultracite/lint-staged — cleanPost-deploy, confirm data lands on the Vercel dashboards (needs real traffic).
Closes APP-974
🤖 Generated with Claude Code