posthog

Implement PostHog product analytics for React and Next.js applications.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/gil00pita/lanify --skill posthog-gil00pita
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: posthog
Source: https://github.com/gil00pita/lanify/tree/main/.agents/skills/posthog
Command: npx skills add https://github.com/gil00pita/lanify --skill posthog-gil00pita

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides self-hosted product analytics including event tracking, feature flags, session replay, and A/B testing for React and Next.js apps.

Core Features & Use Cases

  • Autocapture and event tracking for user interactions across client and server
  • Feature flags and A/B testing to experiment safely and iteratively
  • Session replay for debugging and gaining user insight

Quick Start

Install the PostHog libraries and initialize the client in your app to start capturing events.

Frequently Asked Questions about posthog

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add event tracking to a Next.js application?

Event tracking in Next.js is added by installing PostHog libraries and initializing the client with public keys and hosts to capture user interactions across client and server components.

Can I evaluate feature flags on the server side in React?

Server-side feature flag evaluation is supported in React applications through PostHog libraries, allowing safe and iterative A/B testing experiments directly within server components.

What's the best way to capture session replays for debugging user interactions?

Session replay for debugging and user insight is implemented by integrating PostHog libraries into your React or Next.js app, capturing user sessions for analysis.

Does self-hosted product analytics work with both client and server components?

Self-hosted product analytics supports both client and server components in modern web apps, applying autocapture, event tracking, and user identification across the entire stack.

How do I identify users for product analytics in a React app?

User identification for product analytics in React is configured via PostHog libraries, linking tracked events and session replays to specific users across client and server environments.