Skip to content

Mixpanel or PostHog

The kit sends the same events to either, from the API, the web app and the mobile app, with people identified and grouped by workspace the same way. ANALYTICS_PROVIDER picks one; how to turn it on is on Product analytics.

You want Pick
The most polished funnels, retention and flows for product work Mixpanel
Data kept in India Mixpanel
To host analytics yourself, on your own servers PostHog
Session replay, feature flags, experiments and surveys, one bill PostHog
To query your events with SQL PostHog
Data kept in the EU Either

Both have a free tier that covers a new product, and both charge for group analytics, which is what shows workspaces as accounts. The kit turns on only events: replay, flags and surveys stay off in PostHog until you turn them on in apps/web/src/lib/posthog.ts and apps/mobile/src/lib/posthog.ts.

POSTHOG_HOST is the address the API and the apps send to:

Where POSTHOG_HOST
US cloud (default) https://us.i.posthog.com
EU cloud https://eu.i.posthog.com
Your own PostHog Its address, such as https://posthog.example.com

A reverse proxy in front of PostHog’s cloud, so ad blockers let events through, is set the same way: its address.

Set ANALYTICS_PROVIDER and the new provider’s key, and empty the old one’s: the API refuses to start with the key of the provider it is not using. Events from then on go to the new provider; the old one keeps what it had, and neither copies history to the other. People who were signed in are identified again the next time they open the app.