Main features
- Event-based product analytics with autocapture and SQL queries
- Web analytics dashboard with sources, sessions, bounce rate and web vitals
- Session replay for web and mobile apps
- Heatmaps, clickmaps and scrollmaps
- Feature flags and A/B experiments
- In-app surveys
- Error tracking, logs and tracing
- Group analytics for company accounts
- Data warehouse with external sources and a SQL editor
- Data pipelines to other tools and webhooks
- Optional cookieless tracking mode
What PostHog does
PostHog is much broader than a web analytics tool. It combines event-based product analytics, a web analytics dashboard, session replay, heatmaps, feature flags, experiments, surveys, error tracking and a data warehouse in one product, with SDKs for web, mobile and server languages. It is built for software teams that want to see how people use their product and act on it in the same place.
That breadth is why it appears as an alternative to Google Analytics, Mixpanel, Amplitude and Hotjar at once. For a simple content site it can be more than you need; for a SaaS product it can replace several separate subscriptions.
Privacy and cookies
By default the JavaScript SDK keeps identity and session details in a first-party cookie that lasts 365 days and stores other state in local storage. You can keep everything in memory until a visitor gives consent. There is also an optional cookieless mode, which must be enabled in the project settings: it stores nothing in the browser and counts users with a hash computed on PostHog’s servers. PostHog says that in its “always” cookieless mode no cookie banner is needed unless something else on the site uses cookies, and that you still have to configure data collection and storage to comply with the law.
Session replay records what users do, so review the masking settings before you turn it on.
Self-hosting PostHog
PostHog can be self-hosted with a one-command Docker Compose “hobby” deployment, but the project is clear about its limits. It is officially unsupported, has no tagged releases because it follows the latest build from the main branch, and is expected to handle roughly 100,000 events a month. Only free-plan features are available; paid features are Cloud-only. New Kubernetes deployments are no longer supported.
The stack is heavy: PostgreSQL, ClickHouse, Kafka, Redis, Zookeeper, MinIO and Caddy. The README recommends 4 GB of memory, while the self-hosting documentation suggests about 4 vCPUs, 16 GB of RAM and more than 30 GB of storage. In practice most teams use PostHog Cloud.
Hosted version
PostHog Cloud is available in US and EU regions. Each product has a monthly free allowance, and usage above it is billed per product.
Limitations
The open source code is real, but self-hosting is meant for small volumes and hobby use rather than production at scale. The ee/ directory is under a proprietary license; if you need fully open code, the separate posthog-foss repository removes it. Cookies are on by default, and the many products take time to learn.
Who it suits
PostHog suits product and engineering teams at software companies who want product analytics, replays and feature flags together, usually on the hosted service. If you only need traffic reports for a website, a lighter tool in this category will be easier to run.
License details
MIT. Except the ee/ directory, which is under the proprietary PostHog Enterprise license. A separate posthog-foss repository has that code removed.
Technical details
Self-hosting needs
- PostgreSQL
- ClickHouse
- Kafka
- Redis
- Zookeeper
- MinIO
Built with
- Python
- Django
- TypeScript
- React
- Rust
GitHub topics
- ab-testing
- ai-analytics
- analytics
- cdp
- data-warehouse
- experiments
- feature-flags
- javascript
- product-analytics
- python
- react
- session-replay
- surveys
- typescript
Reviewed by the OpenSourcePicks editors from the project's repository and documentation. Something out of date? Tell us.