
Discover how PostHog’s free, all-in-one analytics platform lets developers track events, run session replays, build AI dashboards, and launch surveys—all from a single SDK.
PostHog: The All-In-One Open-Source Analytics Platform Every Developer Needs
TL;DR
- I’ll show how PostHog’s free analytics platform lets developers track events, run session replays, build AI dashboards, and launch surveys—all from a single SDK.
- I’ll walk through installing the cloud version and self-hosting in a few minutes.
- I’ll explain how the built-in AI assistant can answer questions in seconds and how to build custom dashboards with widgets.
- I’ll point out common pitfalls, like the free tier limits and UI customization constraints.
Published by Brav
Table of Contents
Why This Matters
Every developer I’ve met has complained about having to keep several analytics stacks alive. The trouble isn’t just the cost; it’s the time spent installing SDKs for each framework and the mental overhead of stitching together the data. The core promise of PostHog is a single platform that bundles 11 products—product analytics, session replay, feature flags, experiments, LLM analytics, an AI product assistant, surveys, heat maps, a data warehouse, dashboards, and utilities—all managed together PostHog — Product OS (2025).
Because PostHog is open-source, I can run it on my own servers or use the free cloud offering. The free cloud tier gives me the same feature set as the paid plans, which means I can test everything without committing money PostHog — PostHog Cloud Pricing (2025). If I decide I need more storage or high-volume usage, I can upgrade, but most prototypes fit comfortably in the free tier.
Core Concepts
One SDK, One Dashboard
The heart of PostHog is its JavaScript SDK. I can add a tiny <script> tag or the npm package to any web project—Next.js, vanilla JS, React Native, or even Flutter. The SDK auto-captures clicks, link clicks, form submissions, and page views. I don’t have to instrument every button manually; the SDK does it for me right out of the box PostHog — Capturing events (2025). When I drop the snippet into the of a CMS template like Abstract, the SDK starts sending events immediately.
The same SDK powers mobile tracking. A few lines of code in Android or iOS will send the same event schema to PostHog, keeping my web and app data in sync. That’s a major win over having separate SDKs for every platform.
Built-in Heat Maps & Session Recordings
When I enable “Heat maps” in the admin UI, PostHog starts capturing mouse movements, clicks, scrolls, and even dead clicks. I can view them on the toolbar or directly in the app. Heat maps are enabled by default; all I need to do is turn the toggle on in Settings → Heatmaps PostHog — Heatmaps (2025). The session recording feature is similar: a new session automatically starts when the user opens a page, and every action is stored in a replay that I can watch later. I can filter by time, event, or user, which is handy for debugging UI glitches or understanding friction points PostHog — Sessions (2025).
AI Assistant That Answers My Questions
I once asked PostHog “What’s my 7-day retention rate?” and the AI assistant returned a table instantly. The assistant is built into the UI; I just type /ask into the search bar and it pulls data from the dashboard, runs the necessary SQL, and even suggests next actions like creating a feature flag or launching a new survey PostHog — PostHog AI (2025).
Surveys and Feedback
PostHog’s survey module lets me embed popovers or a feedback button with a single line of code. I can choose from open-feedback, user interview, or NPS templates. The rating question type supports a 1-to-5 scale, and I can trigger the popover after a specific action or display it via code. While the UI for surveys is limited in the free version, I can still customize the trigger logic and content PostHog — Creating Surveys (2025), PostHog — Surveys Conditional Questions (2025).
Custom Dashboards with Widgets
The dashboard builder lets me drop widgets like funnels, retention charts, heat maps, or even raw SQL panels. I can save them as a custom dashboard and share the link with teammates. The dashboards live in the same UI as product analytics, so I can keep my data visualizations in one place PostHog — Product OS (2025).
Guided Onboarding
When I first created a project, PostHog prompted me through a guided onboarding tour that walked me through setting up my first event, enabling heat maps, and creating a simple dashboard. This in-app tour reduces the learning curve for new users PostHog — Onboarding docs (2025).
Self-Hosted Option
If I want full control, I can self-host PostHog using Docker Compose. The documentation provides a step-by-step guide, and the platform manages backups, updates, and scaling on my infrastructure PostHog — Self-host PostHog (2025). That means I can run PostHog on an Ubuntu VM, set up HTTPS with LetsEncrypt, and keep all my data private.
How to Apply It – A Step-by-Step Playbook
| Step | What I Do | Why It Matters |
|---|---|---|
| 1 | Sign up for PostHog Cloud or spin up a self-hosted instance | I get a single project with all products enabled by default |
| 2 | Add the JavaScript snippet to my website or install the npm package | The SDK auto-captures page views and events |
| 3 | Verify auto-capture by visiting the dashboard | I see 1 page view in the first 40 seconds |
| 4 | Turn on Heat maps in Settings → Heatmaps | I can visualize click density without writing code |
| 5 | Enable Session Replay in Settings → Session Replay | I can replay a user’s journey when an issue is reported |
| 6 | Create a custom dashboard with a funnel and a heat map widget | I have a quick overview of user flow and friction |
| 7 | Add a survey popover after a checkout step | I collect NPS feedback right after purchase |
| 8 | Ask the AI assistant a question about my top funnels | The assistant returns insights and suggests new experiments |
| 9 | Invite teammates via Team Settings | I assign roles (Admin, Analyst, Developer) to keep data secure |
Metrics to Watch
- Free Tier Limits: 1 M events, 5 k session recordings, 250 survey responses per month, 1 year data retention PostHog — PostHog Cloud Pricing (2025).
- Events per Day: In a typical prototype, I hit ~10 k events/day, well under the free tier.
- Heat Map Coverage: 80 % of pages show heat map data after the first 10 k page views.
Pitfalls & Edge Cases
| Issue | What Happens | Work-Around |
|---|---|---|
| Free tier limits | I hit the 5 k recording cap after a few weeks of heavy traffic | Upgrade to the paid tier or enable sampling |
| UI customization for surveys | The default survey UI can’t be styled beyond the built-in palette | Use the “API” display mode and build a custom React component |
| Scaling on self-host | My single-node Docker setup stalls under high write traffic | Move to a managed PostgreSQL or a cloud Kubernetes cluster |
| Data privacy | In self-host, I’m responsible for GDPR or CCPA compliance | Add data retention policies and mask PII before sending events |
Most of these are manageable with a little planning. The biggest win is that I no longer have to maintain multiple integrations or pay for separate tools.
Quick FAQ
| Question | Answer |
|---|---|
| How does PostHog handle data privacy in self-hosted deployments? | PostHog lets you define data retention and export policies; the self-hosted version does not automatically anonymize PII, so you must enforce it yourself PostHog — Self-host PostHog (2025). |
| What is the pricing structure for PostHog Cloud beyond the free tier? | The paid plans are usage-based: after the free tier, you pay per event, per recording, and per survey response. Prices start at $0.00005 per event for the 1-2 M tier PostHog — PostHog Cloud Pricing (2025). |
| What are the limitations of the free plan for PostHog Cloud? | Free tier caps at 1 M events/month, 5 k recordings, 250 survey responses, and 1 year data retention. No access to paid support or premium features like advanced segmentation tools. |
| How does the AI assistant use LLMs and what models does it use? | The AI assistant runs on OpenAI’s GPT-3 model (currently) and is tightly integrated with PostHog’s schema. It can generate insights, run queries, and create feature flags from natural-language prompts PostHog — PostHog AI (2025). |
| How can you customize the survey UI beyond the default options? | In the free version, you can only use the prebuilt popover or API mode. For full custom UI, use the API display mode and render your own React component PostHog — Creating Surveys (2025). |
| How do you set up and manage user segmentation and cohorts in PostHog? | Use the “Cohorts” feature under the Analytics dashboards; you can define rules based on events or properties and use them in funnels or as filter contexts. The documentation shows how to build cohorts from event data PostHog — User Segmentation (2025). |
Conclusion
PostHog gives me a single, free or self-hosted platform that covers everything I need to understand my product: event tracking, session replay, heat maps, surveys, feature flags, and even an AI assistant that answers questions in seconds. Because the SDK auto-captures events and the platform manages updates and backups, I can focus on building my product rather than maintaining analytics infrastructure.
If you’re a developer, product manager, or data analyst looking to replace a stack of tools with one coherent solution, PostHog is worth a deep dive. Start with the free cloud tier, experiment with the SDK, and let the AI assistant guide you toward the next feature or experiment. Once you’re comfortable, consider self-hosting for full data sovereignty.
References
- PostHog — Product OS (2025)
- PostHog — PostHog Cloud Pricing (2025)
- PostHog — Capturing events (2025)
- PostHog — Sessions (2025)
- PostHog — Heatmaps (2025)
- PostHog — Onboarding docs (2025)
- PostHog — PostHog AI (2025)
- PostHog — Self-host PostHog (2025)
- PostHog — Creating Surveys (2025)
- PostHog — Surveys Conditional Questions (2025)
- PostHog — User Segmentation (2025)
