analytics▌
99 indexed skills · max 10 per page
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-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-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-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.
logs-other
PostHog/skills · PostHog
### PostHog Log Ingestion for Other Languages - Configure OTLP exporters to send logs directly to PostHog's ingestion endpoint using the OpenTelemetry protocol. - Use environment variables for all sensitive configuration, including PostHog project keys and OTLP endpoints. - Implement structured logging with key-value pairs to enhance searchability without replacing existing application logging logic.
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.
llm-analytics-setup
PostHog/skills · PostHog
### PostHog LLM Analytics Integration - Integrate PostHog analytics into any LLM application using provider-specific guides or the manual capture fallback for custom setups. - Capture essential metrics including input/output tokens, model names, latency, and costs while ensuring PII is never sent in events. - Use the instance-based Posthog() constructor, enable exception autocapture, and call shutdown() to ensure all events are flushed.
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.
integration-react-react-router-7-declarative
PostHog/skills · PostHog
### PostHog Integration for React Router v7 - Implement PostHog analytics using the declarative pattern by following the four-step setup workflow and referencing the example project. - Use environment variables for API keys and trigger analytics capture directly within event handlers rather than inside useEffect hooks. - Identify users during authentication and maintain session correlation by passing distinct IDs via headers for backend-integrated flows.