TL;DR: PostHog is an open-source product analytics platform that shows you exactly how people use your app. It includes product analytics (what users click, where they drop off), session replays (actual video recordings of user sessions), feature flags (turn features on/off without redeploying), A/B testing (test which version converts better), and surveys. The free tier is absurdly generous: 1 million events/month and 5,000 session recordings. No credit card required. If you're shipping an app and flying blind on how people use it, PostHog is how you get eyes on the ground.

Why AI Coders Need This

Here's the thing about building software with AI: you can ship fast. Really fast. You can go from idea to deployed app in an afternoon using tools like Cursor, Lovable, or Bolt. But shipping fast creates a new problem — you have no idea what happens after someone starts using your app.

Think of it like this. In construction, you build a house, then you walk through it. You check every door, every outlet, every faucet. You watch the homeowner do a walkthrough. You see exactly where they pause, what confuses them, what doesn't work the way they expected.

When you ship a web app, you get none of that. Users land on your page, click around, maybe hit a bug, and leave. You see nothing. You might check Google Analytics and see "47 visits today" — but that tells you almost nothing about what those 47 people actually experienced.

PostHog is your walkthrough camera. It records what users do, where they get stuck, what features they ignore, and where your app breaks. A viral r/vibecoding post about building a $10K/month app put it perfectly: "You need PostHog + Google Analytics, you need to understand what's going on with your app — session replays are honestly invaluable."

That's the key insight. Google Analytics tells you how many people showed up. PostHog tells you what they did when they got there. For vibe coders building real products, the second one matters more.

What It Does

PostHog isn't one tool — it's a suite of products that all work together. Here's what each piece actually does for you:

Product Analytics

This is the core. Product analytics tracks events — things users do inside your app. A click on "Sign Up," a purchase, completing a form, visiting a specific page — each of these is an event. PostHog collects them automatically and lets you analyze patterns.

The killer feature here is autocapture. Most analytics tools require you to manually add tracking code for every button, link, and interaction you care about. PostHog's autocapture tracks every click and pageview automatically — no extra code needed. This is massive for vibe coders because it means you don't have to predict in advance what you'll want to track. You add PostHog once, and it captures everything. Later, when you wonder "how many people actually clicked the pricing page?" — the data is already there.

You can also define events retroactively. PostHog calls these "actions." If you realize next month that you should have been tracking clicks on a specific button, you can create an action that matches those clicks — and PostHog will show you the historical data it already captured. No code changes. No redeployment.

This ties directly into monitoring your application — analytics is one layer of understanding what your app is doing in the real world.

Session Replays

This is the feature that changes everything for vibe coders.

Session replays are literal video recordings of your users' sessions. You watch them navigate your app in real time — where they click, where they scroll, where they hesitate, where they rage-click a button that isn't working. It's like standing behind someone while they use your app, except they don't know you're there.

Why is this so valuable for AI-enabled builders? Because you catch bugs you didn't know existed. When AI generates your code, there are inevitably edge cases and broken flows that you never tested because you didn't think to test them. Session replays show you real users hitting those exact problems. You don't need to reproduce the bug — you can just watch it happen.

Why Session Replays Are a Game-Changer

Imagine you asked Claude to build a checkout flow. It works perfectly when you test it. But when a real user fills in an address with an apartment number, the form breaks. You'd never know — the user just leaves. With session replays, you watch them hit the error, see exactly what happened, and fix it. This single feature has saved indie builders countless hours of debugging. You can even share the replay link with your AI coding tool and say "fix what broke in this session."

PostHog gives you 5,000 session recordings per month on the free tier. For most indie apps, that's more than enough. Recordings capture mouse movements, clicks, scrolls, page transitions, console errors, and network requests. You can filter replays by users who encountered errors, visited specific pages, or completed (or failed to complete) specific actions.

Feature Flags

Feature flags let you turn features on or off without deploying new code. Think of it like a light switch for your app features. Built a new pricing page but not sure if it's ready? Put it behind a feature flag. Turn it on for just your test users. If it works, flip the switch for everyone. If it breaks, turn it off instantly — no deployment, no rollback, no stress.

For vibe coders, feature flags solve a specific anxiety: the fear of deploying something that breaks your live app. When AI generates a new feature and you're not 100% sure it works perfectly, wrap it in a feature flag. Ship it to production but only enable it for yourself first. Test it with real data. Then gradually roll it out to more users.

PostHog's feature flags include local evaluation (under 50ms response time), so your app doesn't slow down checking flags. The free tier includes 1 million feature flag requests per month.

A/B Testing (Experiments)

Experiments let you test two versions of something and see which one performs better. Should the call-to-action button say "Get Started" or "Try It Free"? Does a shorter signup form convert better than a longer one? Instead of guessing, you run an experiment.

PostHog splits your users into groups, shows each group a different version, and measures the results with statistical rigor. It uses both Bayesian and frequentist analysis — but you don't need to know what those words mean. The dashboard tells you in plain language: "Version B converted 23% better with 95% confidence." That's all you need.

Experiments are billed through feature flags (same free tier), so there's no additional cost to run A/B tests.

Surveys

Surveys let you ask users questions right inside your app. "How did you hear about us?" "What feature do you wish we had?" "Would you recommend this to a friend?" You design the survey in PostHog's dashboard (no code required for simple surveys), and it appears as a popup or embedded widget.

What makes PostHog surveys different from standalone survey tools is integration. You can see who answered what, watch their session recordings, and run analytics on the responses — all in the same platform. The free tier includes 1,500 survey responses per month.

How It Compares

There are dozens of analytics tools out there. Here's how PostHog stacks up against the ones vibe coders actually encounter:

PostHog

Open source. Product analytics + session replays + feature flags + A/B testing + surveys in one platform. Generous free tier (1M events/mo). Developer-focused, transparent pricing, no sales calls required.

Google Analytics

Free and ubiquitous. Tracks traffic sources, pageviews, demographics. Great for marketing — terrible for understanding product behavior. No session replays, no feature flags. Use it alongside PostHog, not instead of it.

Mixpanel

Strong product analytics with good funnel and retention analysis. No session replays, no feature flags, no A/B testing built in. Free tier is 20M events/mo but fewer features. Enterprise-focused pricing that gets expensive fast.

Amplitude

Enterprise product analytics with advanced behavioral analysis. Powerful but complex — built for data teams, not indie developers. Free tier available but the learning curve is steep. Overkill for most vibe coder projects.

Plausible

Privacy-focused, lightweight web analytics. Beautiful dashboard, GDPR-compliant, no cookies. But it's a Google Analytics alternative — traffic and pageview analytics only. No product analytics, no session replays, no feature flags. Starts at $9/mo.

PostHog vs. Google Analytics — The Real Story

This is the comparison that trips people up because they seem like they do the same thing. They don't.

Google Analytics answers marketing questions: Where do visitors come from? Which campaigns drive traffic? What's my bounce rate? It's a traffic tool — it tells you about people arriving at your front door.

PostHog answers product questions: What do users do after they sign up? Which features do they use? Where do they get stuck? It's a behavior tool — it tells you what happens inside the house.

Most successful builders use both. Google Analytics for acquisition (how people find you), PostHog for activation and retention (what they do once they're in). The viral r/vibecoding post got it exactly right: you need both.

PostHog vs. Mixpanel

Mixpanel is the closest direct competitor for product analytics. It has excellent funnel analysis and retention charts. But Mixpanel is only analytics. No session replays. No feature flags. No A/B testing. No surveys. You'd need to add Hotjar for replays, LaunchDarkly for flags, and Optimizely for experiments — each with its own pricing, SDK, and dashboard.

PostHog bundles everything together. For indie builders, that simplicity is worth a lot. One script to install, one dashboard to check, one free tier to stay under.

PostHog vs. Amplitude

Amplitude is built for enterprise data teams with dedicated analysts. It's extremely powerful for behavioral cohort analysis and complex queries. It's also complex to set up, complex to use, and priced for companies with budgets to match. If you don't have a data team, Amplitude will overwhelm you. PostHog gives you 80% of the insights with 20% of the complexity.

When to Use It

PostHog fits perfectly into these scenarios:

  • You shipped an app and want to know if anyone's actually using it: You deployed your AI-built app and you're getting signups. But are people coming back? Are they using the features you built? PostHog answers these questions in your first week.
  • You're getting bug reports you can't reproduce: "The checkout page didn't work." Okay, but what did the user actually do? Session replays show you exactly what happened, step by step. This is dramatically faster than trying to reproduce bugs from vague descriptions. Check our guide on debugging AI-generated code for more strategies.
  • You're building a product that needs to grow: Once you have users, you need to understand retention, activation, and conversion. PostHog gives you funnels (where do users drop off?), retention charts (do they come back?), and path analysis (what journey do they take through your app?).
  • You want to ship new features safely: Feature flags let you deploy to production without risk. Turn features on for 10% of users. Watch the session replays. Check if error rates spike. Then roll out to everyone — or roll back instantly. This connects directly to understanding deployment as a concept.
  • You're an indie builder on a budget: PostHog's free tier (1M events, 5K replays) is enough for most indie apps making their first few hundred dollars. You get enterprise-grade analytics without enterprise-grade pricing.

Vibe Coder Pro Tip

Add PostHog to your app before you launch. Not after. The autocapture feature means it starts collecting data from day one — clicks, pageviews, everything. When you look at your first week's data, you'll have the complete picture instead of wishing you'd installed it earlier.

When NOT to Use It

PostHog isn't the right tool for every situation. Here's where you should look elsewhere:

  • You only need traffic analytics: If all you want to know is "how many visitors did I get today" and "which blog post gets the most views," Google Analytics (free) or Plausible (~$9/mo) is simpler and sufficient. PostHog is built for product behavior, not traffic reporting.
  • You're building a static website or blog: A portfolio site, a landing page, a blog — these don't need product analytics. There's no "product behavior" to track. Simple web analytics is all you need.
  • You need marketing attribution: Which ad campaign drove the most conversions? Which UTM parameters convert best? Google Analytics is purpose-built for this. PostHog can track UTM parameters, but marketing attribution isn't its strength.
  • You're concerned about GDPR and want zero cookies: PostHog uses cookies by default for session tracking. You can configure it to be cookieless, but if privacy-first web analytics is your primary concern, Plausible or Fathom are simpler choices.
  • Your app is server-side only (no frontend): PostHog's strongest features (session replays, autocapture) require a frontend. If you're building a pure API or CLI tool, PostHog's analytics still works but you lose the most valuable features. Logging and server-side monitoring tools are better fits for backend-only apps.

What AI Gets Wrong About PostHog

When you ask AI tools about PostHog, they tend to get a few things wrong or outdated. Here's what to watch for:

"PostHog Is Just an Analytics Tool"

AI models often describe PostHog as a product analytics platform — full stop. That's like saying a Swiss Army knife is just a blade. PostHog includes analytics, session replays, feature flags, A/B testing, surveys, a data warehouse, error tracking, and more. It's a product operating system, not a single tool. AI descriptions tend to be 2–3 years behind on PostHog's product expansion.

"You Need to Self-Host PostHog"

Older AI training data frequently emphasizes PostHog's self-hosted option, sometimes implying it's the primary way to use it. In 2026, PostHog Cloud is the recommended option for most users. The free tier is generous, the managed infrastructure is reliable, and you skip the operational complexity of running your own analytics server. Self-hosting is still available and fully supported — it's just not the default path anymore.

"PostHog Is Hard to Set Up"

Early versions of PostHog had a reputation for complex setup, especially self-hosted. The current reality: adding PostHog Cloud to a web app is a single JavaScript snippet — less than 10 lines of code. Autocapture means you don't need to instrument individual events. For most vibe coder projects, setup takes under 5 minutes.

"It's Only for Large Companies"

PostHog's feature set looks enterprise-grade — because it is. But the pricing is indie-friendly. Over 90% of PostHog customers use it for free. The free tier (1M events, 5K replays, 1M feature flag requests) is designed for exactly the kind of projects vibe coders are building. You don't need a team of 50 to get value from PostHog. A solo builder with 100 users will find session replays invaluable.

The PostHog Setup for Vibe Coders

Here's the practical workflow to get PostHog running in your AI-built app:

  1. Create a free PostHog Cloud account: Go to posthog.com and sign up. No credit card required. You'll get a project with an API key — this is a unique identifier that tells PostHog which project the data belongs to.
  2. Add the snippet to your app: PostHog gives you a JavaScript snippet to add to your site. If you're using plain HTML, it goes in your <head> tag. If you're using React or Next.js, ask your AI coding tool: "Add PostHog tracking to my app using this API key: [your key]." The AI will install the PostHog library and initialize it correctly.
  3. Enable session replays: In your PostHog project settings, make sure session recording is turned on. It's enabled by default on new projects. Once active, you'll start seeing user session recordings within minutes of your first visitor.
  4. Set up your first funnel: Go to PostHog's analytics section and create a funnel. A funnel tracks users through a sequence of steps — for example: visited homepage → clicked signup → completed registration → used core feature. This immediately shows you where users drop off.
  5. Watch your first session replay: This is the "aha moment." Go to the Session Replay tab, click on a recording, and watch a real user navigate your app. You will immediately spot things you want to fix. This is where PostHog earns its place in your stack.

What to Tell Your AI Coding Tool

"Add PostHog analytics to my app. Here's my PostHog API key: [paste your key]. Initialize PostHog in the app entry point. Enable autocapture and session recording. Make sure it loads on every page."

→ Your AI tool (Cursor, Claude, etc.) will install the posthog-js library, add the initialization code, and configure autocapture + session recording. The whole process takes a few minutes. Use browser dev tools to verify PostHog is loading correctly — check the Network tab for requests to posthog.com.

What to Track Beyond Autocapture

Autocapture handles clicks and pageviews automatically. But for your most important user actions, you want custom events. These are explicit tracking calls you add to your code for the moments that matter most to your business:

  • Signups: posthog.capture('user_signed_up')
  • Purchases: posthog.capture('purchase_completed', { amount: 29.99 })
  • Key feature usage: posthog.capture('report_generated')
  • Errors: posthog.capture('checkout_error', { error: 'payment_failed' })

Ask your AI tool to add these at the critical points in your app. Custom events with properties (like the amount above) let you filter and segment your analytics — "show me all users who made a purchase over $50" — which is incredibly powerful for understanding what's working.

What to Learn Next

PostHog is one piece of the puzzle. Understanding your app in production means learning about the broader ecosystem of tools that keep your software running smoothly:

  • What Is Monitoring? — PostHog shows you user behavior. Monitoring shows you server health — is your app up? Is it slow? Is it running out of memory? You need both.
  • What Is Logging? — When PostHog shows a user hitting an error, logs tell you exactly what went wrong on the server side. Analytics and logging are two sides of the same debugging coin.
  • What Is Deployment? — Understanding how your app gets from code to production helps you appreciate why feature flags are so powerful — they decouple "deploying code" from "releasing features."
  • Browser DevTools Guide — When you're verifying PostHog is working correctly, browser dev tools let you inspect network requests, check for JavaScript errors, and confirm events are being captured.
  • How to Debug AI-Generated Code — Session replays show you bugs. This guide shows you how to fix them — the complete debugging workflow for code you didn't write yourself.

Next Step

Go to posthog.com and create a free account. Add the snippet to whatever app you're currently building — it takes 5 minutes. Then wait for your first few visitors and watch the session replays. That first recording — watching a real human use the thing you built — will change how you think about building software. You'll never want to ship without analytics again.

FAQ

PostHog is an open-source product analytics platform that helps you understand how people actually use your app. It includes product analytics (tracking events like clicks, signups, and purchases), session replays (video recordings of real user sessions), feature flags (turning features on/off without redeploying), A/B testing (experiments to see which version performs better), and surveys. It offers a generous free tier with 1 million events per month and 5,000 session recordings.

Yes — PostHog has a generous free tier that includes 1 million analytics events per month, 5,000 session recordings, 1 million feature flag requests, and 1,500 survey responses. No credit card required. Over 90% of PostHog users stay on the free plan. If you exceed the free tier, usage-based pricing kicks in at very low per-event rates, and you can set billing limits so you never get a surprise bill.

Google Analytics tells you where your traffic comes from and how many pageviews you get — it's a marketing analytics tool. PostHog tells you what users actually do inside your app — which buttons they click, where they get stuck, which features they use. PostHog also includes session replays (video recordings of user sessions), feature flags, A/B testing, and surveys. Most builders use both: Google Analytics for traffic and marketing, PostHog for product behavior and debugging.

Absolutely. PostHog works with any web app regardless of how it was built. You add a small JavaScript snippet to your app (just a few lines in your HTML or a React component), and PostHog automatically starts tracking pageviews and clicks via autocapture. You can ask your AI coding tool to add the PostHog snippet for you — just give it your PostHog project API key and tell it to initialize PostHog in your app.

Yes, PostHog is open source (MIT licensed) and you can self-host it. However, for most vibe coders, PostHog Cloud (the hosted version) is the better choice. The free tier is generous enough for most indie projects, and you skip the complexity of managing your own analytics infrastructure. Self-hosting is mainly useful for enterprises with strict data residency requirements or very high event volumes where hosting costs become significant.