posthog-migration-deep-dive

Featured

Migrate to PostHog from Google Analytics, Mixpanel, Amplitude, or Segment. Covers dual-write strategy, historical data import, event name mapping, identity resolution, and feature flag based traffic shifting. Trigger: "migrate posthog", "posthog migration", "switch to posthog", "posthog from mixpanel", "posthog from GA", "posthog replatform".

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 Migration Deep Dive ## Current State !`npm list posthog-js posthog-node 2>/dev/null | grep posthog || echo 'No PostHog SDK found'` !`npm list @segment/analytics-node mixpanel @google-analytics/data 2>/dev/null | grep -E "segment|mixpanel|google" || echo 'No competitor SDKs found'` ## Overview Migrate from Google Analytics, Mixpanel, Amplitude, or Segment to PostHog using a dual-write strategy (send events to both old and new platforms) followed by gradual traffic shifting. PostHog's capture API accepts events in a format similar to Segment's track/identify calls, making migration straightforward. ## Migration Types | Source | Complexity | Duration | Key Challenge | |--------|-----------|----------|---------------| | Google Analytics (GA4) | Medium | 2-4 weeks | Event model is fundamentally different | | Mixpanel | Low | 1-2 weeks | Very similar event model | | Amplitude | Low | 1-2 weeks | Similar event model | | Segment | Low | 1 week | PostHog has a Segment destination | | Custom analytics | Medium | 2-4 weeks | Depends on current implementation | ## Instructions ### Step 1: Event Name Mapping ```typescript // migration/event-map.ts // Map old event names to PostHog event taxonomy const EVENT_MAP: Record<string, string> = { // Mixpanel → PostHog 'Sign Up': 'user_signed_up', 'Login': 'user_logged_in', 'Page View': '$pageview', 'Button Click': 'button_clicked', 'Purchase': 'payment_completed', 'Subscription Started': 'subscription_started', ...

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

Upgrade posthog-js and posthog-node SDKs with breaking change detection. Covers v4 to v5 posthog-node migration (sendFeatureFlags change), posthog-js autocapture API changes, and version-specific gotchas. Trigger: "upgrade posthog", "posthog breaking changes", "update posthog SDK", "posthog version", "posthog migration".

2,266 Updated today
jeremylongshore
AI & Automation Featured

posthog-reference-architecture

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

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