feature-flags▌
80 indexed skills · max 10 per page
integration-android
PostHog/skills · PostHog
### PostHog Android Integration - Initialize PostHog in the Application class onCreate method using environment variables for keys to ensure secure, early configuration. - Follow the provided example project patterns and ensure every activity includes an android:label for accurate screen view tracking. - Identify users during login and signup, passing session and distinct ID headers to maintain correlation across frontend and backend.
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-nextjs-app-router
PostHog/skills · PostHog
### PostHog Integration for Next.js App Router - Initialize PostHog using instrumentation-client.ts and secure all API keys using environment variables. - Trigger analytics events directly within user action handlers rather than using useEffect hooks. - Identify users during authentication and maintain session correlation by passing distinct IDs via custom request headers.
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.
integration-nextjs-pages-router
PostHog/skills · PostHog
### PostHog Integration for Next.js Pages Router - Initialize PostHog using environment variables and follow the provided example project patterns for consistent implementation. - Capture analytics events directly within user-triggered event handlers rather than using useEffect hooks for state-driven logic. - Identify users during login and signup, using specific headers to maintain correlation between frontend and backend sessions.
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.
integration-javascript_web
PostHog/skills · PostHog
### PostHog JavaScript Web Integration - Initialize posthog-js in client-side browser environments only, ensuring posthog.init() is called before any other SDK methods. - Use posthog.identify() for PII like emails and names, while keeping posthog.capture() event properties free of sensitive user data. - Follow the four-step integration workflow and use environment variables for keys to maintain security and implementation consistency.