Skip to content

feat(APP-974): Integrate Vercel Speed Insights and Analytics#1207

Merged
tyhonchik merged 1 commit into
mainfrom
app-974-integrate-vercel-speed-insights-and-analytics
Jul 6, 2026
Merged

feat(APP-974): Integrate Vercel Speed Insights and Analytics#1207
tyhonchik merged 1 commit into
mainfrom
app-974-integrate-vercel-speed-insights-and-analytics

Conversation

@tyhonchik

Copy link
Copy Markdown
Contributor

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

  • Added dependencies@vercel/analytics@2.0.1 and @vercel/speed-insights@2.0.0.
  • Mounted collectors<Analytics /> and <SpeedInsights /> (App Router variants) rendered inside <body> of the root layout (layoutRoot.tsx), after <Providers>. They run in auto mode and no-op outside Vercel/dev, so no env gating is needed.
  • Test isolation — mocked both Vercel modules in layoutRoot.test.tsx (same pattern as the existing Providers mock) 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 by connect-src *.

Verification

  • pnpm type-check — clean
  • pnpm test:changed — 4 passed
  • ultracite/lint-staged — clean

Post-deploy, confirm data lands on the Vercel dashboards (needs real traffic).

Closes APP-974

🤖 Generated with Claude Code

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.
@tyhonchik tyhonchik requested a review from a team as a code owner July 3, 2026 19:32
@linear-code

linear-code Bot commented Jul 3, 2026

Copy link
Copy Markdown

APP-974

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

🚀 Preview Deployment: View Here

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

E2E results (preview)

Smoke

Base URL https://app-next-g6wg68v72-aragon-app.vercel.app
Suite smoke
Playwright result ✅ passed
Summary 79 passed, 1 skipped
HTML report View report
GitHub job ✅ completed

View run #4415

@milosh86 milosh86 changed the title feat(APP-974): integrate Vercel Speed Insights and Analytics feat(APP-974): Integrate Vercel Speed Insights and Analytics Jul 6, 2026

@milosh86 milosh86 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@tyhonchik tyhonchik merged commit 4479568 into main Jul 6, 2026
17 checks passed
@tyhonchik tyhonchik deleted the app-974-integrate-vercel-speed-insights-and-analytics branch July 6, 2026 14:21
@arabot-1 arabot-1 mentioned this pull request Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants