Skip to content

posthog

Use when integrating PostHog for product analytics, feature flags, A/B testing, or session replay. Also use when choosing between analytics tools or implementing event tracking in a web application.

ModelSource
sonnetpack: monitoring
Full Reference

┏━ πŸ”§ posthog ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Use when integrating PostHog for product analy… ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

PostHog is an all-in-one product platform covering analytics, session replay, feature flags, A/B testing, surveys, error tracking, and a data warehouse. Usage-based pricing β€” most teams pay $0–$900/month.

ItemValue
JS SDKnpm install posthog-js
Node SDKnpm install posthog-node
US cloud hosthttps://us.i.posthog.com
EU cloud hosthttps://eu.i.posthog.com
Project API key formatphc_... (public β€” ingestion)
Personal API key formatphx_... (private β€” management)
Free tier1M events, 5K recordings, 1M flag requests/mo
Docshttps://posthog.com/docs
I want to…File
Install and initialize the SDKreference/setup.md
Capture events and track funnelsreference/event-tracking.md
Create and evaluate feature flagsreference/feature-flags.md
Configure session replay and heatmapsreference/session-replay.md
Identify users, manage persons, and handle GDPR deletionreference/user-identification.md
Run A/B experiments and build analytics insightsreference/a-b-testing.md

Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.