Open-source all-in-one product platform: analytics, replays, flags, experiments, surveys, and AI observability
★ 35.4kPythonPostHog/posthog

What it is: PostHog is an open-source, all-in-one product platform — product analytics, web analytics, session replay, feature flags, A/B experiments, surveys, error tracking, a data warehouse, and LLM/AI observability, all in one tool with one generous free tier — so a solo founder installs a single thing instead of wiring together five separate SaaS accounts.

Here's the trap it saves you from. You ship v1. You want to know what users do, so you add an analytics tool. Then you want to watch a confused user, so you add session replay. Then you want to dark-launch a feature, so you add a feature-flag service. Then you want to A/B test the pricing page, so you add an experiments tool. Now you're paying four bills, holding four SDKs, and stitching four sources of truth that all define "a user" slightly differently. PostHog's pitch is that these were never really separate problems — they're all "understand and steer your product" — so they live in one platform, on one data model, behind one free tier.

Who it's for#

Founders and small teams who want product intelligence without assembling a stack:

If your product is early and you'd rather learn one platform deeply than integrate five shallowly, this is the default.

Getting started#

The fastest path is the JavaScript web SDK. Install it, initialize with your project token, and PostHog starts autocapturing pageviews and clicks — no manual event wiring required to see your first data.

npm install posthog-js
import posthog from 'posthog-js'

posthog.init('<ph_project_token>', { api_host: 'https://us.i.posthog.com' })

That's the whole first step. From there, custom events are one call (posthog.capture('signup_completed')), and feature flags, surveys, and experiments are all driven from the same initialized client — you don't install anything new to turn them on. If you'd rather not touch a build step, PostHog also gives you an HTML <script> snippet you paste into your <head> (it loads array.js from their CDN), which is handy for no-code and tag-manager setups.

The AI angle. This is what makes PostHog interesting for readers building AI products. If you're weighing a dedicated tracing stack, see our highlight of Langfuse — PostHog's pitch is that you get a lighter version of that inside the same tool you already use for product analytics. Its AI observability (the product formerly called LLM analytics) captures your model calls as $ai_generation events. The lightest-touch integration is PostHog's drop-in provider wrapper — for example its OpenAI client (from posthog.ai.openai import OpenAI) — which you initialize with your PostHog project key and then use exactly like the normal client. Every completion then lands in PostHog with cost, latency, token counts, the prompt, and the response attached. Because it's the same project as your product analytics, you can answer questions no standalone LLM tool can — like "which users are burning the most tokens," or "did the model change actually move retention." The free tier includes 100,000 of these AI events per month.

Pricing#

PostHog's model is the reason it became a default for early-path builders: each product is free up to a standing monthly limit, and you only pay for volume past it. No trial clock, no card to start, all products unlocked. As verified on posthog.com/pricing, the current free allowances per month are:

PostHog says more than 90% of its customers never leave the free tier. When you do exceed a limit, it's usage-based with step-down rates — analytics events from $0.00005 each, session recordings from $0.005, feature-flag requests from $0.0001, AI observability events from $0.00006 — and the per-unit price drops as your volume climbs. Optional flat platform packages (Boost at $250/mo, Scale at $750/mo, Enterprise at $2,000/mo) add higher limits, support, and enterprise controls, but they're additive, not a gate on the core products. Because these figures do move, treat posthog.com/pricing as the source of truth before you budget.

The catch / where it fits#

Two honest notes.

First, breadth is the point, and breadth has a learning curve. PostHog is not a single-purpose tool you master in an afternoon; it's a platform with a dozen surfaces, and it takes a beat to learn where replays, flags, and insights each live. The upside is that once you know the platform, adding the next capability is free and instant instead of another procurement decision. For a solo founder, that trade — one thing to learn, then everything's already there — is usually the right one.

Second, "open-source" has an asterisk worth reading. The main repo is under the MIT (expat) license except the ee/ directory, which carries its own enterprise license; if you want a strictly free-and-open deployment, PostHog maintains a separate posthog-foss repo that excludes that code. Most small teams never touch self-hosting — PostHog Cloud is free up to the same limits and there's nothing to run — but the option is genuinely there if data residency or control ever demands it.

Where it fits: you're early, you want to actually understand your product (and, increasingly, your AI), and you'd rather grow into one platform than graduate from a pile of point tools. Start on the free tier, wire up the JS snippet, and turn on the next product the day you need it — you're already paying for it, which is to say, nothing.