← CYH Brain

Mixpanel to PostHog: how it went for Choose Your Horizon

Short version: we moved product and marketing analytics from Mixpanel to PostHog over July and August 2026, kept Segment as the instrumentation hub so the switch was low-risk, and we now get native experiments, feature flags, dashboards, session replay, and ad-spend attribution out of one tool. The surprise favorite: a Claude Code integration that lets us build reports against our code and our analytics at the same time.

Why we're glad we did it

The transition, mechanically

Gotchas worth knowing up front (so you skip our stumbles): budget for the BAA and security-baseline lead time before prod ingestion; plan the Mixpanel backfill so "last 30 days" is not silently short during the gap; and lock an event taxonomy and naming convention early (we had a mid-flight snake_case to Title Case cutover that split some event names).

Experiments and feature flags

The HIPAA-safe pattern is the important part for a health company: the feature flag is evaluated server-side, exposure is logged through Segment, and the browser never talks to PostHog directly. So we get real randomized experiments with PostHog's stats engine (Bayesian win probability) without any PHI, or even a PostHog snippet, touching the patient's browser.

What we've run:

Feature flags do double duty: the same flag gates the experiment and the rollout, sticky per user, so shipping the winner is just widening the flag.

Reports and dashboards, and the Claude Code superpower

This is the part we are most excited about. We drive PostHog from Claude Code via the PostHog MCP, and because Claude Code also has our codebases open, it can query our product analytics and read the code that emits those events at the same time. In practice:

Standing dashboards we lean on: landing-page insights (visits, CTA rate, form-start), a mobile-onboarding funnel, and a marketing attribution board (below).

Ad-platform spend and attribution

PostHog's marketing analytics pulls spend straight from the ad platforms (Meta, Google, Bing) and joins it to on-site conversions, so CAC and ROAS by channel live in the same tool as the funnels. We wired UTMs plus first/last-touch attribution and click-ID inference onto our conversion events (UTM coverage on purchases went from ~0% to ~44% after that work), so we can finally see channel-level funnel performance and per-channel value. Multi-touch is our next step. This replaced a pile of spreadsheet reconciliation and gives marketing a self-serve spend-to-conversion view.

Other things we got largely for free

Net

For a health company specifically, the combination of a signed BAA, a PHI-safe server-side experiment pattern, and the Claude-Code-plus-MCP workflow is what makes PostHog more than a Mixpanel swap. Happy to walk through the HIPAA setup or the Claude skills if that would help.