posthog-reference-architecture

Featured

Production PostHog architecture: event taxonomy, SDK layering, feature flag strategy, analytics module layout, and data pipeline integration patterns. Trigger: "posthog architecture", "posthog best practices", "posthog project structure", "how to organize posthog", "posthog design".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

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

Skill Content

# PostHog Reference Architecture ## Overview Production-grade architecture for PostHog analytics in a web application. Covers file structure, event taxonomy design, SDK initialization layers, feature flag management, group analytics for B2B, and data pipeline integration. ## Prerequisites - PostHog Cloud or self-hosted instance - `posthog-js` and `posthog-node` SDKs - Next.js or React application (patterns adapt to other frameworks) ## Architecture ``` ┌─────────────────────────────────────────────────────┐ │ Browser (posthog-js) │ │ $pageview, $autocapture, custom events, identify │ │ Feature flag evaluation, session recordings │ └────────────┬────────────────────────────────────────┘ │ HTTPS (direct or reverse proxy) ▼ ┌─────────────────────────────────────────────────────┐ │ PostHog Cloud (us.i.posthog.com) │ │ ┌──────────┐ ┌──────────┐ ┌───────────────────┐ │ │ │ Events │ │ Feature │ │ Session Replay │ │ │ │ Pipeline │ │ Flags │ │ & Recordings │ │ │ └────┬─────┘ └────┬─────┘ └───────────────────┘ │ │ │ │ │ │ ┌────┴──────────────┴────────────────────────────┐ │ │ │ Analytics: Trends, Funnels, Retention, Paths │ │ │ │ HogQL (SQL), Dashboards, Cohorts │ │ │ └────────────────────────────────────────────────┘ │ │ ┌────────────────────────────────────────────────┐ │ │ │ CDP: De...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

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
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 Listed

posthog-analytics

Raw PostHog data queries via MCP — event catalog, query recipes, dashboards, funnels, experiments. Use for specific data questions. For CEO-level metric interpretation and frameworks, use metrics-briefing instead.

0 Updated today
Layneformalized225
AI & Automation Featured

posthog-performance-tuning

Optimize PostHog performance: local flag evaluation, client batching config, event sampling, efficient HogQL queries, and serverless flush patterns. Trigger: "posthog performance", "optimize posthog", "posthog latency", "posthog caching", "posthog slow", "posthog batch", "posthog fast".

2,266 Updated today
jeremylongshore