Back to stack index

Analytics

PostHog

Product analytics paired with shipped AI features.

Short answer

PostHog is an open-source product platform that combines product analytics, web analytics, session replay, feature flags, experiments, surveys, error tracking, a data warehouse and LLM analytics in one tool. AI product teams use it to see how people use their app, which AI features they return to, and what model calls cost per user. PostHog Cloud is usage-based with a generous free allowance each month, including 1 million analytics events, 5,000 session recordings and 1,500 survey responses. The self-hosted version is MIT-licensed, apart from the separately licensed ee directory, and free, but PostHog recommends it only for small volumes, offers no support for it, publishes no tagged releases and advises always running the latest image; paid features are Cloud-only. In our directory, Plausible and Umami are lighter, privacy-focused alternatives for website analytics, and Langfuse is a specialized alternative for tracing model calls.

Cloud free allowance
1M events, 5k recordings, 1.5k survey responses per month
posthog.com/pricing
Self-hosted license
MIT (ee directory licensed separately)
PostHog GitHub
Self-hosted releases
No tagged releases; use the latest image
PostHog self-host docs
Directory projects
PostHog, Plausible, Umami, Langfuse
Project repositories

Updated October 21, 2026How we evaluate tools

Official site

Directory projects (4)

  • PostHog

    PostHog measures product usage with analytics data that never leaves servers you operate.

  • Plausible

    Plausible measures product usage with analytics data that never leaves servers you operate.

  • Umami

    Umami measures product usage with analytics data that never leaves servers you operate.

  • Langfuse

    Open LLM engineering hub for traces, prompts, scores, and datasets.

PostHog for AI products: product analytics, LLM analytics and open-source alternatives Plausible, Umami and Langfuse in 2026

What PostHog includes

PostHog started in 2020 as an open-source alternative to Mixpanel and Amplitude and has grown into a suite of tools that share one event store:

ProductWhat it does
Product analyticsTrends, funnels, retention, paths and user cohorts
Web analyticsTraffic, sources and pages, similar to Google Analytics
Session replayRecordings of user sessions with console and network logs
Feature flagsRoll out features to some users; kill switches
ExperimentsA/B tests with statistical results
SurveysIn-app questions and feedback
Error trackingExceptions linked to users and replays
Data warehouseImport data from Stripe, databases and other sources; query with SQL
LLM analyticsModel call tracking with cost, latency and content

Having everything in one place means you can, for example, filter session replays to users who saw an AI feature flag and then gave a low survey score.

Which directory projects fit here

ProjectFocusLicense
PostHogAll-in-one product analytics platformMIT (ee directory separate)
PlausibleSimple, cookie-free website analyticsAGPLv3
UmamiLightweight, privacy-focused website analyticsMIT
LangfuseLLM tracing, evaluation and prompt managementMIT core

Pricing

PostHog Cloud bills each product separately by usage, with a free allowance every month:

ProductFree each month
Product analytics1,000,000 events
Session replay5,000 recordings
Surveys1,500 responses
Other productsTheir own free allowances

Above the free tier, per-unit prices fall as volume grows. Use PostHog's pricing calculator for estimates, and set a billing limit per product. Paid add-ons, such as group analytics for B2B products and extra data retention, are priced separately.

Self-hosting PostHog

PostHog offers a hobby Docker Compose deployment:

  • License. MIT, except the ee directory, which has its own license.
  • Releases. None tagged. Changes and security fixes ship continuously, and PostHog recommends always running the latest image.
  • Features. Paid-plan features are available only on Cloud.
  • Support. None for self-hosted installs.
  • Components. ClickHouse, Kafka, PostgreSQL, Redis, object storage and several PostHog services.
  • Scale. Recommended for low volumes; PostHog suggests Cloud for production scale.

For teams that need data in Europe, PostHog's EU Cloud region is the usual answer.

Tracking AI features with PostHog

Product events

Capture an event when a user starts an AI action, accepts or edits a suggestion, regenerates, or gives feedback. Add properties for the feature name, model, prompt version and latency. Then build:

  • A funnel from "opened AI panel" to "accepted suggestion".
  • Retention of users who used AI features compared with those who did not.
  • Cohorts of heavy AI users for interviews or pricing tests.

LLM analytics

PostHog's SDK wrappers for OpenAI, Anthropic and frameworks such as LangChain and the Vercel AI SDK capture each generation automatically with model, token counts, cost, latency, and optionally inputs and outputs. Because generations are tied to the same person and session as other events, you can calculate model cost per customer and compare it with revenue, a key number for pricing AI features.

Feature flags and experiments for prompts

Use a feature flag to send a share of users to a new prompt or model, then compare acceptance rate, retention and cost in an experiment. Flags with payloads can carry the prompt version or model name directly, so you can change them without a deploy.

Session replay for AI interfaces

Watching replays of sessions where users regenerated an answer several times or abandoned the chat shows problems that metrics miss, such as confusing loading states or answers rendered off-screen. Mask inputs in replays, since chat boxes often contain personal data.

Plausible and Umami

For a marketing site or documentation, a full product analytics suite is more than needed. Plausible and Umami collect page views, referrers, countries, devices and custom goals with a small script and no cookies, which often removes the need for a cookie banner under EU rules. Umami is MIT-licensed and easy to self-host with Node.js and PostgreSQL or MySQL; Plausible offers a hosted service and an AGPL Community Edition.

Langfuse alongside PostHog

PostHog's LLM analytics covers cost and usage in product context. Langfuse goes deeper on engineering: nested traces of agent steps, prompt management, datasets and evaluations. A common split is Langfuse for the AI engineering team and PostHog for product and growth, linked by a shared user ID.

Choosing an analytics setup for an AI product

StageSetup
Landing page onlyPlausible or Umami
Early productPostHog Cloud free tier with product analytics and replay
AI features in productionAdd PostHog LLM analytics or Langfuse for traces
Growing team testing promptsPostHog experiments plus Langfuse evaluations
Strict data residencyPostHog EU Cloud, or self-hosted Plausible or Umami for web analytics

AI apps handle sensitive text. Do not send full prompts to analytics unless you need them, mask chat inputs in session replay, honor opt-outs, and document analytics in your privacy policy. PostHog can run cookieless by keeping identifiers in memory, which reduces consent requirements for anonymous traffic, though identified users and replays still need care under GDPR.

Metrics worth tracking for AI features

MetricHow to compute in PostHog
AI feature adoptionShare of weekly active users who triggered an AI event
Acceptance rateAccepted suggestions divided by shown suggestions
Regeneration rateRegenerate clicks per answer; high values signal poor first answers
Time to valueTime from signup to first accepted AI output
Cost per active userSum of generation cost from LLM analytics divided by active users
Retention liftRetention curve of AI users compared with non-AI users

Implementation checklist

  1. Install the PostHog snippet or SDK, and route it through a reverse proxy on your own domain so ad blockers do not drop events.
  2. Call identify after login with a stable user ID, and set company with group analytics if you sell to businesses.
  3. Define a short event naming scheme, such as ai_suggestion_shown and ai_suggestion_accepted, and document it.
  4. Wrap your model client with PostHog's LLM analytics integration and pass the same user ID.
  5. Build one dashboard for AI feature adoption and one for AI cost per customer.
  6. Set billing limits on every product before traffic grows.

Related: Plausible stack, Langfuse stack, Django stack, Stripe stack, OpenTelemetry stack, Stack index.

Frequently asked questions

Is PostHog free?

PostHog Cloud is free up to monthly allowances, including 1 million analytics events, 5,000 session recordings and 1,500 survey responses, with similar allowances for other products. Beyond that, each product is billed by volume with decreasing per-unit prices. You can set billing limits so you are never charged more than you choose.

Should I self-host PostHog?

Only for small volumes or strict data rules, and with the trade-offs in mind. The self-hosted Docker Compose deployment is free and MIT-licensed, but it has no support, no paid features, no versioned releases and needs ClickHouse, Kafka, PostgreSQL and Redis to run. Most teams with data residency needs choose PostHog's EU Cloud instead.

What are PostHog LLM analytics?

A PostHog product that records model calls, called generations, with model, tokens, cost, latency and inputs and outputs, and links them to the user and session. It integrates with OpenAI, Anthropic, LangChain, the Vercel AI SDK and other libraries, and lets you analyze AI usage with the same tools as other product data.

Should I use PostHog or Langfuse for an AI app?

PostHog answers product questions: which users use AI features, whether they convert, and cost per customer alongside revenue and retention. Langfuse answers engineering questions: why a specific trace failed, how prompt versions compare on evaluations. Many AI teams use both.

PostHog or Plausible for a website?

Plausible for a simple, cookie-free view of traffic, sources and goals on a marketing site. PostHog when you also need product analytics inside your app, session replay, feature flags or experiments.

Sources

  1. PostHog pricing
  2. PostHog self-hosting
  3. PostHog LLM analytics
  4. PostHog on GitHub