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.
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.
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-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-ruby
PostHog/skills · PostHog
### PostHog Ruby Integration - Install the posthog-ruby gem and initialize the client using environment variables for API keys and host configuration. - Use client.capture and client.identify with hash arguments, but use positional arguments for client.capture_exception. - Ensure client.shutdown is called before script exit to prevent event loss, ideally within an ensure block for proper cleanup.
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.
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.
integration-nuxt-4
PostHog/skills · PostHog
### PostHog Integration for Nuxt 4 - Follow the four-step setup workflow to integrate PostHog analytics into your Nuxt 4 application. - Use environment variables for all PostHog keys and follow the provided example project patterns for implementation. - Identify users during authentication and use specific headers to maintain session correlation between frontend and backend.