feature-flags▌
79 indexed skills · max 10 per page
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.
logs-java
PostHog/skills · PostHog
### PostHog Java Log Ingestion - Integrate PostHog log ingestion into Java applications using the OpenTelemetry protocol and OTLP exporters. - Use environment variables for PostHog keys and endpoints instead of hardcoding sensitive configuration data. - Implement structured logging with key-value properties and add log export alongside existing logging infrastructure.
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-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.
feature-flags-ruby
PostHog/skills · PostHog
### PostHog Feature Flags for Ruby - Install the posthog-ruby gem and initialize the client using environment variables for API keys to ensure secure configuration. - Implement server-side flag evaluation to prevent UI flickering and use boolean flags as the default for simple feature toggling. - Always call client.shutdown in an ensure block for scripts and CLIs to prevent data loss and ensure proper event flushing.
feature-flags-api
PostHog/skills · PostHog
### feature-flags-api Overview - PostHog feature flags for API applications - This skill helps you add PostHog feature flags to API applications. - `references/api.md` - API feature flags installation - docs
error-tracking-web
PostHog/skills · PostHog
### PostHog Web Error Tracking - Initialize posthog-js before other methods and enable exception autocapture to monitor browser errors automatically. - Upload source maps to ensure stack traces are readable and use captureException() within catch blocks for manual error reporting. - Protect user privacy by excluding PII from capture() event properties, using identify() for user-specific data instead.
feature-flags-react-native
PostHog/skills · PostHog
### PostHog Feature Flags for React Native - Use useFeatureFlagEnabled or useFeatureFlagPayload hooks to manage flags while handling loading states and external synchronization. - Securely load POSTHOG_PROJECT_TOKEN and POSTHOG_HOST via environment variables using react-native-config to avoid hardcoding credentials. - Install react-native-svg as a peer dependency and wrap your application with PostHogProvider inside the NavigationContainer.
feature-flags-web
PostHog/skills · PostHog
### PostHog Web Feature Flags - Integrate PostHog flags into JavaScript apps using environment variables for keys and avoiding hardcoded credentials. - Implement boolean flag checks alongside existing logic to minimize code restructuring and maintain clean application flow. - Prioritize server-side flag evaluation to prevent UI flickering and utilize MCP tools for direct flag management within PostHog.