PostHog is a free, open source web & product analytics project written in Python and released under a custom open-source licence. It has 39,835 GitHub stars, 3,394 forks and 5,637 open issues, and was last pushed 5 hours ago. On this registry it ranks #1 of 25 tracked projects in Web & Product Analytics, and is listed as an open source replacement for 4 paid products, with 5 head-to-head comparisons available. It gained 39,835 stars over the last 5 tracked days.

What is PostHog?

PostHog is an open-source platform for building self-driving products, combining product analytics, web analytics, session replay, feature flags, experiments, error tracking, logs, surveys, a data warehouse, data pipelines, AI observability, and workflows in a single system, aimed at product, engineering, and growth teams that want to own their product data rather than rent it.

What it is

PostHog is an open-source analytics and product-tooling platform written primarily in Python, with JavaScript and React components for client-side instrumentation. It lives in the web and product analytics ecosystem, and it also reaches into session replay, experimentation, error tracking, log ingestion, customer data pipelines, and LLM observability. Rather than stitching together a separate tool for each of those jobs, PostHog captures event data once and lets teams query it alongside data synced from external sources such as Stripe and Hubspot.

The concrete problem it solves is fragmentation. Teams typically run one paid service for event analytics, another for session replay, another for feature flags and experiments, and another for error tracking, none of which share a data model. PostHog replaces that stack with a single self-hostable or cloud-hosted platform where analytics, replays, flags, experiments, errors, logs, and surveys read from the same event stream. The README explicitly positions it as the open alternative to Mixpanel, Amplitude, and FullStory.

Key capabilities

  • Product analytics with autocapture or manual event instrumentation, plus analysis through visualizations or SQL.
  • Web analytics dashboard in the style of Google Analytics, covering conversion, web vitals, and revenue.
  • Session replays of real user sessions for websites and mobile apps, used to diagnose issues and understand behavior.
  • Feature flags for rolling out features to selected users or cohorts, and experiments that measure statistical impact on goal metrics with a no-code setup option.
  • Error tracking with alerts and issue resolution, plus log ingestion, search, and analysis next to the rest of the product data.
  • Data warehouse sync from external tools including Stripe and Hubspot, queryable alongside product data, and data pipelines (CDP) that filter and transform incoming data, send it to 25+ tools or any webhook, or batch export to a warehouse.
  • AI observability for LLM-powered apps, capturing traces, generations, latency, and cost, with control available from Slack, web, PostHog Desktop, or an editor via the MCP.

Who uses it and how

  • Product and growth teams that need event analytics, funnels, and experiments against one shared dataset instead of reconciling exports from separate vendors.
  • Engineering teams using feature flags and error tracking to release changes to cohorts gradually and catch regressions in production.
  • Support and design teams watching session replays to reproduce reported bugs and understand where users get stuck.
  • Data teams syncing Stripe, Hubspot, or warehouse data into PostHog so product events and business metrics can be queried together.
  • Smaller teams starting on PostHog Cloud, where the first 1 million events, 5k recordings, 1M flag requests, 100k exceptions, and 1500 survey responses are free every month.

Getting started

The README recommends signing up for PostHog Cloud US or PostHog Cloud EU as the fastest and most reliable route. For self-hosting, it documents an advanced one-line Docker hobby deploy on Linux, with 4GB of memory recommended.

How it compares

PostHog is presented as the open-source alternative to Mixpanel, Amplitude, and FullStory, which are closed hosted products. PostHog offers both a hosted option and a self-hosted Docker hobby deploy, so teams can keep analytics, replay, and flag data inside their own infrastructure rather than sending it to a vendor. On cost, the free tier applies to every tool with usage-based pricing beyond it, whereas the products it replaces are subscription services with their own per-event or per-seat pricing.

When to use it — and when not to

Self-hosters take on operating a Docker deployment with roughly 4GB of memory, and the README itself labels the open-source hobby deploy advanced and recommends cloud instead, so a team without container operations experience should start hosted. The repository metadata carries a NOASSERTION licence value, which means the exact licence terms are not machine-readable here and should be checked before any commercial redistribution. Teams wanting a small, single-purpose analytics library rather than a broad platform, or those unwilling to accept a fast-moving project with thousands of open issues, should look elsewhere.

project readme (upstream, from github) — read inline

posthoglogo

GitHub contributors PRs Welcome Docker Pulls GitHub commit activity GitHub closed issues

Docs - Community - Roadmap - Why PostHog? - Changelog - Bug reports

PostHog Demonstration

PostHog is the open source platform for building self-driving products

PostHog provides every tool you need to build a successful product, and captures all the context agents need to proactively diagnose problems, uncover opportunities, and ship fixes:

  • Self-driving mode: Turn signals in your product data (errors, rage clicks, failed queries, and more) into researched reports and pull requests you review and merge.
  • Product analytics: Autocapture or manually instrument event-based analytics to understand user behavior and analyze data with visualization or SQL.
  • Web analytics: Monitor web traffic and user sessions with a GA-like dashboard. Easily monitor conversion, web vitals, and revenue.
  • Session replays: Watch real user sessions of interactions with your website or mobile app to diagnose issues and understand user behavior.
  • Feature flags: Safely roll out features to select users or cohorts with feature flags.
  • Experiments: Test changes and measure their statistical impact on goal metrics. Set up experiments with no-code too.
  • Error tracking: Track errors, get alerts, and resolve issues to improve your product.
  • Logs: Ingest, search, and analyze log data alongside the rest of your product data.
  • Surveys: Ask anything with our collection of no-code survey templates, or build custom surveys with our survey builder.
  • Data warehouse: Sync data from external tools like Stripe, Hubspot, your data warehouse, and more. Query it alongside your product data.
  • Data pipelines: Run custom filters and transformations on your incoming data. Send it to 25+ tools or any webhook in real time or batch export large amounts to your warehouse.
  • AI observability: Capture traces, generations, latency, and cost for your LLM-powered app.
  • Workflows: Create workflows that automate actions or send messages to your users.

You can steer it all from Slack, web, desktop (PostHog Desktop), or your own editor via the MCP.

Best of all, all of this is free to use with a generous monthly free tier for each tool. Get started by signing up for PostHog Cloud US or PostHog Cloud EU.

Table of Contents

Getting started with PostHog

PostHog Cloud (Recommended)

The fastest and most reliable way to get started with PostHog is signing up for free to PostHog Cloud or PostHog Cloud EU. Your first 1 million events, 5k recordings, 1M flag requests, 100k exceptions, and 1500 survey responses are free every month, after which you pay based on usage.

Self-hosting the open-source hobby deploy (Advanced)

If you want to self-host PostHog, you can deploy a hobby instance in one line on Linux with Docker (recommended 4GB memory):

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/posthog/posthog/HEAD/bin/deploy-hobby)"

Open source deployments should scale to approximately 100k events per month, after which we recommend migrating to a PostHog Cloud.

We do not provide customer support or offer guarantees for open source deployments. See our self-hosting docs, troubleshooting guide, and disclaimer for more info.

Setting up PostHog

Once you've got a PostHog instance, you can set it up by installing our JavaScript web snippet, one of our SDKs, or by using our API. You can also connect the MCP to bring PostHog into Claude Code, Cursor, or any MCP-compatible agent.

We have SDKs and libraries for popular languages and frameworks like:

Beyond this, we have docs and guides for Go, .NET/C#, Django, Angular, WordPress, Webflow, and more.

Once you've installed PostHog, see our product docs for more information on how to set up product analytics, web analytics, session replays, feature flags, experiments, error tracking, surveys, data warehouse, and mo

readme truncated — read the full docs on github

Frequently asked questions

Is PostHog free to use?

PostHog is open source. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does PostHog do?

Unlock Product Insights with Open-Source Analytics

What is PostHog written in?

PostHog is primarily written in Python. Its source is publicly available at https://github.com/PostHog/posthog, and it has 39,835 GitHub stars.

What is a good open source alternative to Amplitude?

PostHog is one of the open source options listed as an alternative to Amplitude, FullStory, Mixpanel. Compare licences, stars and activity side by side on the PostHog profile.