PostHog
AnalyticsAll-in-one open source product analytics — events, session replay, feature flags and A/B tests.
About this project
PostHog is an all-in-one, open-source product analytics platform that combines everything a product team needs in a single self-hostable tool: event tracking, funnels, retention charts, session recording, heatmaps, feature flags, A/B testing, and a data warehouse — with no need to stitch together Mixpanel, FullStory, LaunchDarkly, and Optimizely.
Market opportunity
The product analytics market exceeds $12B annually and is deeply fragmented. A typical growth-stage startup pays $500–$2,000/month for Mixpanel or Amplitude (analytics), $200–$500/month for FullStory or Hotjar (session replay), $150–$500/month for LaunchDarkly (feature flags), and another $500–$2,000/month for an A/B testing tool. PostHog consolidates all four categories into one self-hostable platform — the savings are $10,000–$60,000/year for a mid-size team. As companies increasingly want to own their user data (privacy regulations, AI training implications), self-hosted product analytics is a market that's actively growing.
Technical overview
- Stack: Python/Django backend, ClickHouse for analytics queries, PostgreSQL for metadata, Redis for queues; deploys on Docker or Kubernetes.
- Event capture: JavaScript, React, React Native, iOS, Android, Python, Go, Ruby, and Node.js SDKs.
- Analytics: funnels, retention, user paths, cohorts, dashboards, and SQL access to raw events.
- Session replay: full session recordings with console logs, network activity, and rage-click detection.
- Feature flags: multi-variate flags with gradual rollouts, user targeting, and local evaluation for zero-latency.
- A/B testing: experiment framework with statistical significance tracking tied directly to your analytics events.
Who's it for
Product teams who want all their tools in one place and their data on their own infrastructure, startups replacing 4 expensive SaaS tools with one open-source platform, and companies with GDPR or data-residency requirements for user behavioral data.
How to use it
Get started
PostHog Cloud (generous free tier — 1M events/month free): Sign up at app.posthog.com, create a project, and add the snippet to your app:
posthog.init('your-api-key', { api_host: 'https://app.posthog.com' })
Events start flowing immediately. Enable session recording in Project Settings → Session Recording.
Self-host (Docker — for larger teams):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/posthog/posthog/HEAD/bin/deploy-hobby)"
This one-line script provisions a self-hosted PostHog on your server with ClickHouse, PostgreSQL, and all services. Recommended: 4 vCPU, 8 GB RAM minimum for production use. Point your SDK at your own hostname.
💡 How to make a business with it
How to make money with it
1. Self-hosted PostHog setup and management for startups. Growth-stage startups are the heaviest users of analytics tools — and the most cost-sensitive. You set up, configure, and maintain PostHog for them, letting them access all four product tools for a fraction of what they'd pay SaaS vendors.
- Target: Series A–B startups paying $3,000–$8,000/month across separate analytics, replay, and flag tools
- Pricing: $500–$1,500/month managed PostHog service
- Example: 8 clients × $800/month = $76,800/year — you save each client $2k–$6k/month
- Difficulty: Advanced — requires infrastructure knowledge (ClickHouse, Kubernetes), but sticky recurring revenue
2. Embedded product analytics for SaaS. If you're building a SaaS tool, embed PostHog self-hosted so your customers can see their own usage data inside your product — without paying Mixpanel or building a custom analytics engine.
- Target: Your existing SaaS user base
- Pricing: "Analytics" tier add-on at $30–$100/month
- Example: 150 users upgrade at $59/month = $106,200 ARR
- Difficulty: Complex — multi-tenancy with PostHog requires careful architecture
3. Analytics consolidation consulting. Companies paying for 4–5 separate analytics tools but getting limited value from each are a strong market. You audit their current stack, migrate everything to PostHog, and train their team — then maintain a retainer.
- Target: Product teams at B2B SaaS companies with bloated tooling budgets
- Pricing: $5,000–$15,000 consolidation project + $500/month retainer
- Example: 2 projects/month = $10k–$30k/month in project revenue
- Difficulty: Advanced — requires knowing the full analytics landscape and event schema design
Need technical help?
Want help setting up PostHog, customizing it, or building your product on top of it? Knock me — let's talk.