integration-nextjs-app-router

Solid

PostHog integration for Next.js App Router applications

Web & Frontend 359 stars 65 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
85
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# PostHog integration for Next.js App Router This skill helps you add PostHog analytics to Next.js App Router applications. ## Workflow Follow these steps in order to complete the integration: 1. `basic-integration-1.0-begin.md` - PostHog Setup - Begin ← **Start here** 2. `basic-integration-1.1-edit.md` - PostHog Setup - Edit 3. `basic-integration-1.2-revise.md` - PostHog Setup - Revise 4. `basic-integration-1.3-conclude.md` - PostHog Setup - Conclusion ## Reference files - `EXAMPLE.md` - Next.js App Router example project code - `next-js.md` - Next.js - docs - `identify-users.md` - Identify users - docs - `basic-integration-1.0-begin.md` - PostHog setup - begin - `basic-integration-1.1-edit.md` - PostHog setup - edit - `basic-integration-1.2-revise.md` - PostHog setup - revise - `basic-integration-1.3-conclude.md` - PostHog setup - conclusion The example project shows the target implementation pattern. Consult the documentation for API details. ## Key principles - **Environment variables**: Always use environment variables for PostHog keys. Never hardcode them. - **Minimal changes**: Add PostHog code alongside existing integrations. Don't replace or restructure existing code. - **Match the example**: Your implementation should follow the example project's patterns as closely as possible. ## Framework guidelines - For Next.js 15.3+, initialize PostHog in instrumentation-client.ts for the simplest setup - For feature flags, use useFeatureFlagEnabled() or useFeatureF...

Details

Author
majiayu000
Repository
majiayu000/claude-skill-registry
Created
5 months ago
Last Updated
today
Language
HTML
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

DevOps & Infrastructure Featured

posthog-deploy-integration

Deploy PostHog to Vercel, Docker (self-hosted), and Cloud Run. Covers Next.js reverse proxy, server-side capture in edge functions, self-hosted PostHog setup, and platform-specific environment configuration. Trigger: "deploy posthog", "posthog Vercel", "posthog production deploy", "posthog Cloud Run", "posthog self-hosted", "posthog Docker".

2,266 Updated today
jeremylongshore
AI & Automation Featured

posthog-install-auth

Install and configure PostHog SDKs with authentication. Use when setting up posthog-js (browser), posthog-node (server), or configuring API keys for a new PostHog integration. Trigger: "install posthog", "setup posthog", "posthog auth", "configure posthog API key", "posthog init".

2,266 Updated today
jeremylongshore
AI & Automation Featured

posthog-hello-world

Create a minimal working PostHog example with event capture, identify, and feature flags. Use when starting a new PostHog integration, testing your setup, or learning basic posthog-js and posthog-node patterns. Trigger: "posthog hello world", "posthog example", "posthog quick start", "simple posthog code", "first posthog event".

2,266 Updated today
jeremylongshore
AI & Automation Featured

posthog-sdk-patterns

Production-ready PostHog SDK patterns: singleton client, typed events, React hooks, Next.js App Router integration, and Python patterns. Trigger: "posthog SDK patterns", "posthog best practices", "posthog React hook", "posthog Next.js", "posthog typescript".

2,266 Updated today
jeremylongshore
AI & Automation Featured

posthog-core-workflow-a

Implement PostHog product analytics: event capture, user identification, group analytics, and property management using posthog-js and posthog-node. Trigger: "posthog analytics", "capture events", "track users posthog", "posthog identify", "posthog group analytics", "product analytics".

2,266 Updated today
jeremylongshore