Skip to content

[Gap-Audit] 019 Google Analytics: wire NEXT_PUBLIC_GA_MEASUREMENT_ID + theme-change tracking #31

@TortoiseWolfe

Description

@TortoiseWolfe

Summary

src/lib/analytics/GoogleAnalytics/ ships with the full 5-file pattern, consent-gated via ConsentContext. Awaits per-fork GA4 property setup.

What's shipped

  • 5-file GoogleAnalytics module
  • Consent-gating via ConsentContext
  • Page view + Web Vitals + custom event tracking
  • Graceful degradation for ad blockers
  • tests/analytics/ga4-integration.spec.ts (4 live + 8 stubs)

Gaps

  • .env NEXT_PUBLIC_GA_MEASUREMENT_ID is empty (per-fork config required)
  • Theme change event tracking incomplete (8 test stubs await this work)

Effort

~5 minutes once a GA4 property ID is obtained.

Reference

  • Spec: features/enhancements/019-google-analytics/spec.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgap-auditIdentified during 2026-04-25 planned-vs-shipped auditpriority:p1High — fix soon (stability hotspot, low-hanging fruit, single-decision unlocks)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions