posthog-common-errors

Featured

Diagnose and fix common PostHog errors: events not appearing, flags returning undefined, 401/429 errors, SDK initialization failures, and identity issues. Trigger: "posthog error", "fix posthog", "posthog not working", "debug posthog", "posthog events missing", "posthog broken".

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 Common Errors ## Overview Diagnosis and solutions for the most common PostHog integration errors. Covers event capture failures, authentication issues, feature flag problems, identity fragmentation, and SDK initialization errors. ## Prerequisites - PostHog SDK installed (`posthog-js` or `posthog-node`) - Access to browser console or server logs - PostHog project API key (`phc_...`) available ## Instructions ### Error 1: Events Not Appearing in Dashboard **Symptoms:** `posthog.capture()` calls execute without error but events never show in PostHog Activity tab. **Diagnoses and fixes:** ```typescript // Problem A: Not flushing in serverless/scripts // posthog-node queues events — they're lost if process exits before flush const posthog = new PostHog('phc_...'); posthog.capture({ distinctId: 'user-1', event: 'test' }); // FIX: Always flush before exit await posthog.shutdown(); // or await posthog.flush() // Problem B: Wrong API host posthog.init('phc_...', { api_host: 'https://app.posthog.com', // WRONG — this is the UI }); // FIX: Use the ingest endpoint posthog.init('phc_...', { api_host: 'https://us.i.posthog.com', // CORRECT for US Cloud // api_host: 'https://eu.i.posthog.com', // For EU Cloud }); // Problem C: Ad blocker blocking posthog-js requests // FIX: Set up a reverse proxy (see posthog-sdk-patterns) // next.config.js rewrites: /ingest/* → us.i.posthog.com/* // Then: posthog.init('phc_...', { api_host: '/ingest' }); ``` ### Error 2: Feature...

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

Monitor PostHog integration health: event ingestion rates, feature flag evaluation latency, billing volume tracking, and Prometheus/Grafana alerting. Trigger: "posthog monitoring", "posthog metrics", "posthog observability", "monitor posthog", "posthog alerts", "posthog dashboard".

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