analytics▌
99 indexed skills · max 10 per page
integration-react-react-router-6
PostHog/skills · PostHog
### PostHog Integration for React Router v6 - Follow the four-step setup workflow to integrate PostHog analytics into your React Router v6 application. - Use environment variables for API keys and implement analytics capture directly within event handlers rather than useEffect. - Identify users during login and signup, using specific headers to maintain session correlation between frontend and backend.
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
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.
feature-flags-java
PostHog/skills · PostHog
### PostHog Java Feature Flags - Install the PostHog Java library and integrate flag checks directly into existing application logic using the provided documentation. - Securely manage PostHog API keys using environment variables and prioritize server-side evaluation to prevent UI flickering. - Utilize available PostHog MCP tools to programmatically create, list, and update feature flags directly from your development environment.
integration-javascript_node
PostHog/skills · PostHog
### PostHog Node.js Integration - Install the posthog-node SDK and initialize it with environment variables, ensuring exception autocapture is enabled. - Instrument route handlers with posthog.capture() for user actions and integrate posthog.captureException() into error middleware. - Identify users during authentication and pass session headers from the frontend to maintain event correlation across the stack.
integration-astro-hybrid
PostHog/skills · PostHog
### PostHog Integration for Astro Hybrid - Initialize PostHog using a reusable component in src/components/ and include it in your main layout for consistent tracking. - Use the posthog-node library with a singleton pattern in src/lib/ for server-side event tracking in API routes. - Securely manage keys via environment variables and use the is:inline directive to prevent Astro from processing script tags.
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-astro-ssr
PostHog/skills · PostHog
### PostHog Astro SSR Integration - Initialize PostHog using a reusable component in your Astro layout and store the server-side client in a singleton pattern. - Use environment variables with the PUBLIC_ prefix for client-side keys and keep all PostHog script tags marked as is:inline. - Maintain session correlation by passing distinct IDs and session IDs via headers when tracking events across frontend and API routes.
error-tracking-svelte
PostHog/skills · PostHog
### PostHog Error Tracking for Svelte - Initialize PostHog with exception autocapture enabled and use environment variables for all sensitive configuration keys. - Upload source maps to ensure stack traces resolve to original source code rather than minified production bundles. - Set paths.relative to false in svelte.config.js to ensure session replay compatibility with SvelteKit server-side rendering.