Mida + PostHog integration

Forward Mida events into PostHog and capture PostHog events as Mida goals for unified product + A/B testing.

Analytics & Data Two-way sync Client-side Works with Mida A/B Testing & Personalization

About PostHog

PostHog is the open-source product analytics, session replay, and feature flag platform built for engineers. Teams use PostHog to understand product usage, replay sessions, and roll out features behind flags — making it a natural complement to Mida's marketing-led A/B testing.

How the PostHog integration works

Mida ↔ PostHog is bidirectional. Outbound, Mida calls posthog.capture() with mida_pageview, mida_execute, and mida_conversion. Inbound, Mida hooks PostHog's capture function so every event you already track in PostHog (page views, button clicks, custom events) becomes selectable as a Mida goal.

Requirements

  • PostHog JavaScript SDK loaded on the page (window.posthog).
  • Mida tracking code installed on the page.

Use cases

Watch session replays of each variant

Filter PostHog session recordings by the mida_execute event and variant property to watch real users interact with each version of your test — invaluable for understanding why a variant won or lost.

Use PostHog autocapture events as Mida goals

PostHog autocaptures clicks, form submits, and pageleaves out of the box. Pick any of them as a Mida goal from a dropdown — no extra instrumentation required.

Combine Mida tests with PostHog feature flags

Use Mida for visual, marketer-led tests on landing pages and use PostHog feature flags for engineer-led product experiments. Both stream to PostHog so you have one dashboard.

Build PostHog cohorts from variant exposure

Define a cohort in PostHog like 'Users who saw variant B of pricing test'. Use it to filter funnels, retention, and dashboards — or feed it back into PostHog feature flags for follow-up rollouts.

Shared data

Mida and PostHog exchange the following events:

Event Direction Description
mida_pageview Data out posthog.capture() called on every page after variant assignment.
mida_execute Data out posthog.capture() called when a test executes on the current page.
mida_conversion Data out posthog.capture() called when a Mida conversion goal is reached.
* Data in Every PostHog capture event is mirrored to Mida and selectable as a goal.

Frequently asked questions

Does this work with PostHog Cloud and self-hosted?

Yes. The integration uses the standard PostHog JavaScript SDK, so it works against PostHog Cloud (US/EU) and any self-hosted instance.

Why use Mida if PostHog already has experiments?

PostHog's experiments are engineer-driven (feature flags). Mida adds a no-code visual editor, AI variant generation, and a sub-15KB script — ideal for marketing teams iterating on landing pages without engineering bandwidth.

Will autocapture events flood my Mida goal dropdown?

Mida groups events by name and surfaces the most frequent ones first, so the dropdown stays usable even on busy sites.

Ship A/B tests 10x faster — connected to your stack

Mida is the lightweight A/B testing and personalization platform that integrates with the tools you already pay for.