PostHog Documentation
website·Indexed 43 days ago
https://posthog.com/docs/Comprehensive guides and API references for PostHog's product and web analytics platform. Includes documentation on SDK integration for Node.js, Python, Ruby, Go, .NET, iOS, and Android, as well as feature flags, experiments, session replay, error tracking, surveys, AI observability, and data warehouse configuration. Covers advanced setup including reverse proxies via AWS CloudFront, Caddy, and Cloudflare, and the Model Context Protocol (MCP).
What's inside PostHog
- PostHog Session Replay records user interactions in a product and plays them back like a DVR. Each replay is synced with a DevTools panel that displays console logs, network requests, and errors occurring at the exact moment of the action. Because it integrates with PostHog's event capture, replays are enriched with user properties and feature flag data, allowing developers to jump from a funnel drop-off or exception directly to the corresponding session.
Overview of ticket automation with Workflows
PostHog Support integrates with Workflows to automate ticket management. Tickets emit events that trigger Workflows, and Workflow actions can update tickets (e.g., setting SLAs, changing status, or assigning tickets). To prevent infinite loops, updates made by Workflows do not re-emit ticket events.Overview of PostHog Alerts
Alerts allow users to monitor insights and receive notifications when specific data patterns or thresholds are met. They are supported for Trends, Funnels (steps and trends views), and SQL (HogQL) insights.
Plan Limits:
- Free tier: Up to 5 alerts total.
- Paid plans: No limit.
Overview of PostHog Web Analytics dashboard
The PostHog web app serves as the central hub for web analytics. It provides a dashboard to monitor visitors, pageviews, sessions, average session duration, and bounce rate, with comparisons to previous periods. Users can filter the entire dashboard by clicking on specific rows (such as landing pages, referrers, or UTM sources) and jump directly from these metrics into session replays to analyze user behavior.Overview of PostHog Workflows
PostHog Workflows is a no-code, drag-and-drop automation tool used to send messages to users and automate processes. Workflows are triggered by real-time events and person properties already present in PostHog, allowing users to act on actual product behavior. A workflow consists of triggers, delays, audience splits, message sends, and PostHog actions. Additionally, any real-time destination configured in PostHog's CDP can be used as a dispatch step within a workflow.Overview of PostHog Support
PostHog Support provides a unified inbox for customer conversations originating from apps, email, or GitHub issues. It automatically attaches the sender's session replays, events, and errors to each ticket, eliminating the need for manual reproduction of issues. These conversations also serve as a signal source for PostHog's Self-driving feature, which groups recurring issues into reports and generates pull requests for code fixes.Overview of ID-JAG (XAA) authentication
ID-JAG (Identity Assertion JWT Authorization Grant), or XAA, allows an organization's OIDC-compliant Identity Provider (IdP) (e.g., Okta, Microsoft Entra ID) to issue short-lived tokens that are exchanged for PostHog access tokens. This centralizes authorization, policy enforcement, and revocation within the IdP. It is currently in beta and available only on the Enterprise plan.Overview of PostHog MCP server capabilities
The PostHog MCP server enables AI coding agents to perform data warehouse operations without leaving the code editor. It is compatible with MCP clients such as Cursor, Codex, Claude Code, Windsurf, and VS Code. Key capabilities include running ad-hoc HogQL queries, exploring schemas, generating queries from natural language, managing data warehouse views, configuring import sources (Postgres, Stripe, HubSpot), and adding semantic annotations to tables and columns.Overview of PostHog AI Evaluation types
PostHog provides three ways to automatically assess the quality of LLM generations:
- LLM-as-a-judge: Uses an LLM to score generations against a custom prompt. Best for subjective checks (tone, helpfulness, hallucinations). Returns pass/fail with reasoning. Costs LLM API credits.
- Code-based (Hog): Runs deterministic Hog code for rule-based checks (format, keywords, length). Returns pass/fail. Free and fast (milliseconds).
- Sentiment analysis: Uses a local ML model to classify user messages as positive, neutral, or negative. Free and fast.
Overview of PostHog AI features
PostHog provides a suite of AI-powered tools designed to help developers analyze product data, integrate PostHog into their codebase, and monitor LLM usage. All listed AI features are open source under either the MIT License or the PostHog Enterprise License.Overview of PostHog Customer Journeys
Customer journeys are funnel-based flow graphs that visualize how users move through key conversion steps (e.g., Pageview → Sign up → Payment). They combine funnels and paths to show conversion rates, drop-off points, and the specific events users trigger between, before, or after funnel steps. This allows developers and product managers to identify friction and unexpected user behavior.Overview of the PostHog Semantic Layer
The PostHog Semantic Layer is a per-project catalog of governed definitions that ensures AI agents and humans use the same logic for business measures. It prevents AI agents from reinventing definitions (like MRR) in every session by providing a single source of truth. The system follows the principle: 'AI generates, a human owns.' AI agents can propose definitions, but only humans can approve them to make them canonical. The semantic layer is powered by thedata-catalog, which is reflected in MCP tool names and API scopes (e.g.,data_catalog_approval).