
PostHog Has a Free API — Product Analytics You Can Self-Host
PostHog is an open-source product analytics platform. Event tracking, session replays, feature flags, A/B testing, surveys — all self-hostable, all in one tool. Why PostHog? All-in-one — analytics, replays, feature flags, experiments, surveys Self-hostable — Docker or Kubernetes, data stays on your servers Free tier — 1M events, 5K sessions, unlimited feature flags Open source — MIT license, no vendor lock-in Quick Start npm install posthog-js import posthog from ' posthog-js ' ; posthog . init ( ' YOUR_API_KEY ' , { api_host : ' https://app.posthog.com ' , person_profiles : ' identified_only ' , }); Event Tracking // Track custom events posthog . capture ( ' button_clicked ' , { button_name : ' signup ' , page : ' /pricing ' , }); // Track page views (auto or manual) posthog . capture ( ' $pageview ' ); // Identify users posthog . identify ( ' user_123 ' , { email : ' alice@example.com ' , plan : ' pro ' , company : ' Acme Corp ' , }); // Group analytics posthog . group ( ' company '
Continue reading on Dev.to Webdev
Opens in a new tab



