Skip to content

Add Vercel Analytics and Speed Insights #8

@socialawy

Description

@socialawy

Problem

No visibility into app usage or performance metrics. We need basic monitoring to understand how the app is being used and identify performance bottlenecks.

Solution

Integrate Vercel's built-in Analytics and Speed Insights packages.

Tasks

  • Install @vercel/analytics and @vercel/speed-insights
  • Add <Analytics /> component to the root layout (app/layout.tsx)
  • Add <SpeedInsights /> component to the root layout (app/layout.tsx)
  • Only load in production (check NODE_ENV or use Vercel's built-in environment detection)
  • No additional user tracking or cookies beyond what Vercel provides by default
  • Verify no impact on dev mode performance or console warnings

Acceptance Criteria

  • @vercel/analytics and @vercel/speed-insights are installed as dependencies
  • Both components are rendered in the root layout
  • Analytics data appears in the Vercel dashboard after a production deploy
  • Speed Insights data appears in the Vercel dashboard after a production deploy
  • No analytics scripts loaded in development mode
  • No impact on dev mode performance or build size concerns
  • No new cookies or tracking beyond Vercel defaults

Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions