1.5 KiB
1.5 KiB
ADR 0007: Analytics Stack & Privacy
Status: ✅ Approved
Date: 2025-12-11
Owner: Delivery Lead (Analytics)
Context
spec-kit/checklist.md:13 requires analytics/tracking on the marketing site. We are implementing a dual stack (Plausible + Google Analytics) because Plausible covers privacy and lightweight event tracking while GA provides deeper signal analysis. Both are active without interfering with the privacy promise.
Implementation
- Plausible
- Script loaded from
https://plausible.io/js/plausible.jsviaapp/layout.tsx. - Configured with the
NEXT_PUBLIC_PLAUSIBLE_DOMAINenvironment variable (default1000planets.cloud). - No cookies unless the visitor opts in; complies with privacy-first mandates.
- Script loaded from
- Google Analytics (GA4)
- Loaded via
gtag.jswhenNEXT_PUBLIC_GA_MEASUREMENT_IDis provided. - Basic page view tracking configured at load time.
- Additional events (e.g., CTA clicks, form submissions) can be wired in later via
gtag('event', ...).
- Loaded via
Deployment Notes
- Add API keys to the server environment (or
.envfor local development) before building. - Ensure Plausible domain matches the deployed hostname to avoid data loss.
- GA measurement ID should be created in Google Analytics with site ownership verified.
Monitoring & Governance
- Monitor the Plausible dashboard for spikes and GA for conversion funnels.
- Document any additional events in this ADR as new measurement needs arise.