Configures PostHog for comprehensive product analytics and feature flag management across client and server environments.
This skill automates the integration of PostHog into modern web applications, providing a unified solution for tracking user behavior and managing feature toggles. It handles the complex nuances of client-side initialization versus server-side execution, ensures proper event flushing in serverless contexts, and implements best practices for user identification and environment variable management. By following strict project conventions, it helps developers establish a robust observability foundation with PostHog's generous free tier and unified platform approach.
主要功能
01Client-side PostHogProvider and initialization for web frameworks
02Server-side singleton setup using posthog-node with reliable event flushing
03Secure environment variable mapping for client and server-side keys
04Automatic SPA page tracking configuration using the latest recommended defaults
050 GitHub stars
06Standardized patterns for user identification and session resets
使用场景
01Initial setup of product analytics in a new React, Next.js, or Node.js project
02Capturing server-side API telemetry and events in serverless environments
03Implementing feature flags for controlled rollouts and A/B testing