# ADR-0006: Analytics are opt-in - Status: Accepted, one open item (PostHog project) - Date: 2026-10-14 ## Context The web UI initializes PostHog on startup when a project key was present at build time, and only an opt-out marker in local storage stops it. Local telemetry (`packages/core/src/telemetry.ts`) stays on the machine. ## Decision - Analytics are opt-in. On first launch a dialog asks for consent. Until the user chooses "Allow", PostHog is not initialized and nothing is sent. - Settings have a toggle to change the choice later. - The PostHog project key is injected at build time (`VITE_POSTHOG_KEY`) from the build environment and is never committed. Builds from source without the key send nothing. ## Consequences - P1.3a adds the consent dialog and the settings toggle and moves PostHog initialization behind consent. - Open item, proposed and awaiting the owner: a separate PostHog project for the community edition, so its events never mix with the commercial product.