Adds opt-in, metadata-only PostHog product analytics to the backend. - New core/analytics.py singleton: env-driven Posthog client, stable per-installation UUID as distinct_id, best-effort capture() no-op when disabled/uninitialized. - Wires setup_posthog()/teardown_posthog() into the FastAPI lifespan. - Instruments ten events across the user journey (speech_generated, generation_failed, voice_profile_created/deleted/locked, model_installed, engine_selected, dub_project_started, batch_job_submitted, setup_completed). - Adds posthog>=7.22.1 to dependencies (pyproject.toml + uv.lock). Analytics stay disabled unless POSTHOG_PROJECT_TOKEN is set, preserving the local-first, no-telemetry-by-default guarantee. Generated-By: PostHog Code Task-Id: a74d5ec7-ac98-4069-9fa0-1b8be460d8a9
897 B
897 B
title, description
| title | description |
|---|---|
| PostHog Setup - Revise | Review and fix any errors in the PostHog integration implementation |
Check the project for errors. Read the package.json file for any type checking or build scripts that may provide input about what to fix. Remember that you can find the source code for any dependency in the node_modules directory. Do not spawn subagents.
Ensure that any components created were actually used.
Once all other tasks are complete, run any linter or prettier-like scripts found in the package.json, but ONLY on the files you have edited or created during this session. Do not run formatting or linting across the entire project's codebase.
Status
Status to report in this phase:
- Finding and correcting errors
- Report details of any errors you fix
- Linting, building and prettying
Upon completion, continue with: 4-conclude.md