What problem does it solve?
Integrates PostHog event analytics into a Flask codebase so you can reliably capture product usage, identify users, and track errors without breaking existing architecture.
Core Features & Use Cases
- PostHog setup guide for Flask: Follow a step-by-step workflow to implement initialization and event capture in a Flask application.
- Server-side event tracking patterns: Capture key actions (like signup, login, dashboard view) using PostHog’s Flask-compatible Python SDK patterns.
- User identification & person properties: Use the correct
distinct_id approach to associate backend events with logged-in users, while keeping PII out of event properties.
- Manual error tracking: Capture exceptions intentionally (since Flask error handlers prevent default autocapture) to support actionable error analytics.
- Reference implementations: Use the provided Flask example and framework notes to match the expected implementation style.
Quick Start
Use the integration-flask skill to instrument your Flask app by following the referenced step workflow starting with basic-integration-1.0-begin.md, and then implement the code changes for identification, events, and manual exception capture in the corresponding files.