PostHog
Open-source product analytics with session recording, feature flags, and A/B testing — self-hostable. Replaces Google Analytics, Mixpanel, and Amplitude.
Open source alternative to:
PostHog is an all-in-one, open-source product analytics platform that combines event tracking, session replay, feature flags, and A/B testing into a single product. It is designed to replace the typical stack of multiple SaaS tools — web analytics, session recording, feature flag services, and experimentation platforms — with one self-hostable system. PostHog can be deployed via Docker or used as a managed cloud offering, and supports event capture from web, mobile, and server-side sources.
Key features include autocapture, custom event tracking, funnels, user paths, heatmaps, feature flags with targeting rules, and experimentation tools. The platform integrates with developer workflows through API access, webhooks, and SDKs for JavaScript, Python, Go, and most major languages.
PostHog is built for product teams that want full ownership of their usage data without stitching together five separate tools. With 37k+ stars on GitHub and an active contributor community, it is one of the most mature open-source alternatives to Google Analytics, Mixpanel, and Amplitude.
Frequently Asked Questions
How is PostHog different from Google Analytics or Mixpanel?
PostHog is a complete product-analytics platform that combines event tracking, session replay, feature flags, and A/B testing in one self-hostable product — replacing what would normally be several separate SaaS tools. It is built around autocapture and custom events for product teams rather than marketing page views. Data ownership is a core difference: you can run it on your own infrastructure instead of sending usage data to a vendor.
What does it take to self-host PostHog?
PostHog can be deployed with Docker and uses ClickHouse for analytics storage alongside Postgres and Redis, so self-hosting means running a fairly substantial stack. It captures events from web, mobile, and server-side sources via SDKs for JavaScript, Python, Go, and most major languages, and exposes a full API and webhooks. If you prefer not to run it yourself, PostHog also offers a managed cloud option.
How much tracking code do I need to write to use PostHog?
Very little to start — PostHog's autocapture records clicks, pageviews, and input events out of the box, so you can begin collecting product data with minimal setup. When you need more, you add custom event tracking, build funnels and user paths, run experiments, and control feature rollouts with targeted flags. With 37k+ GitHub stars and an active contributor community, it is one of the most mature open-source product-analytics stacks.
Repository details
Updated 8/12/2026, 10:00:16 PM
View RepositoryRepository activity
Compare PostHog with
Similar open source alternatives
Open Web Analytics
Self-hosted web analytics platform for tracking website traffic without compromising user privacy.
Google Analytics
Vemetric
Simple, yet powerful Web- & Product Analytics.
Google Analytics
Swetrix
Privacy-first, cookie-less web analytics with speed monitoring and error tracking.
Google Analytics
OpenPanel
Openpanel is an open-source web and product analytics platform that combines the power of Mixpanel with the ease of Plausible and one of the best Google Analytics replacements.
Mixpanel
Umami
Umami is a modern, privacy-focused alternative to Google Analytics.
Google Analytics
Matomo
Open-source web analytics platform with SEO keyword and search performance reporting.
Google Search Console