posthog▌
93 indexed skills · max 10 per page
integration-angular
PostHog/skills · PostHog
### PostHog Integration for Angular - Create a singleton PosthogService using inject() to wrap the SDK and manage analytics across standalone components. - Store PostHog credentials in environment.ts files and avoid hardcoding keys directly into the application source code. - Identify users during authentication and pass session headers to maintain data correlation between frontend and backend services.
logs-nodejs
PostHog/skills · PostHog
### PostHog Node.js Log Integration - Configure OpenTelemetry OTLP exporters to send log data directly to the PostHog ingestion endpoint. - Use environment variables for all sensitive configuration, including PostHog keys and OTLP endpoints. - Implement structured logging with key-value properties to enhance searchability and analysis within the PostHog platform.
integration-python
PostHog/skills · PostHog
### PostHog Python Integration - Install the posthog package and initialize the Posthog() class with enable_exception_autocapture=True for automatic error tracking. - Use environment variables for API keys and register posthog_client.shutdown with atexit to ensure all events are flushed on exit. - Identify users via set() for person properties and never include PII like emails or names within capture() event properties.
analyzing-experiment-session-replays
PostHog/skills · PostHog
### Analyzing Experiment Session Replays - Retrieve experiment metadata and variant keys from the feature flag to ensure accurate filtering for each test group. - Construct session recording filters using the $feature_flag_called event and the specific $feature/<flag_key> property for each variant. - Compare session duration, activity metrics, and navigation paths across variants to provide qualitative insights on user behavior.
query-examples
PostHog/skills · PostHog
### PostHog HogQL Query Reference - Access comprehensive schema documentation for core system models including cohorts, feature flags, error tracking, and data warehouse. - Utilize a library of optimized analytical query templates for trends, funnels, retention, user paths, and LLM trace analysis. - Reference HogQL-specific syntax, available functions, and extensions for advanced data manipulation and session replay analysis.
integration-react-react-router-7-data
PostHog/skills · PostHog
### PostHog Integration for React Router v7 - Follow the four-step setup workflow to integrate PostHog analytics into Data mode applications. - Use environment variables for keys and mirror the implementation patterns found in the provided example project. - Trigger analytics in event handlers, avoid useEffect for state logic, and use specific headers to maintain user identification.
integration-react-vite
PostHog/skills · PostHog
### PostHog Integration for React and Vite - Follow the four-step workflow to initialize, configure, and finalize PostHog analytics within your React application. - Use environment variables for API keys and implement analytics capture directly within event handlers rather than useEffect hooks. - Identify users during authentication and maintain session correlation by passing distinct IDs via headers in API requests.
feature-flags-php
PostHog/skills · PostHog
### PostHog PHP Feature Flags - Install the posthog/posthog-php SDK and initialize it once using PostHog::init() with environment variables for API keys. - Implement server-side flag checks to prevent UI flickering, defaulting to boolean flags unless multivariate logic is required. - Use PostHog MCP tools to manage flags directly and ensure all SDK methods utilize associative arrays for distinct IDs and properties.
integration-ruby-on-rails
PostHog/skills · PostHog
### PostHog Ruby on Rails Integration - Install the posthog-rails gem and use PostHog.init in an initializer to manage the client lifecycle automatically. - Securely store API keys using environment variables or Rails credentials instead of hardcoding them in your application. - Use class-level PostHog.capture and PostHog.identify methods to track events and associate users across backend and background jobs.
integration-react-tanstack-router-code-based
PostHog/skills · PostHog
### PostHog Integration for TanStack Router - Initialize PostHogProvider in the root route to ensure global access to the analytics client across all child routes. - Track pageviews using TanStack Router navigation events and capture user actions directly within event handlers, avoiding useEffect. - Identify users during authentication and maintain session correlation by passing distinct IDs via headers in API requests.