Mixpanel
Mixpanel is an event-based product analytics tool used to answer questions such as "where do new users drop out of onboarding?", "which features do retained customers use?", and "did the redesigned checkout increase conversion?". Applications send events with properties; Mixpanel builds reports — Insights, Funnels, Flows, Retention, and Cohorts — over them in seconds, along with session replay and experiment analysis.
As with any analytics tool, the reports are only as accurate as the implementation. Mixpanel projects commonly suffer from events tracked twice, identity that splits one person into several users, properties that change meaning between releases, and personal data sent where it should not be. Designing events carefully, handling identity correctly, and testing tracking like code keep the data trustworthy.
TL;DR
- Track a focused set of events named for outcomes, with consistent properties.
- Use super properties for context sent with every event, and user profiles for user attributes.
- Call
identifywith a stable user ID at login andresetat logout; use group analytics for accounts. - Analyze with Insights, Funnels, Flows, Retention, and Cohorts, and validate surprising findings.
- Test tracking in development and CI; govern events and properties with Lexicon.
- Choose data residency, restrict access, avoid PII, and honor deletion requests.
Quick Example
Initializing the browser SDK with EU data residency, identifying users, and tracking an event:
A unit test asserting the tracking contract, so refactors cannot silently break analytics:
Core Concepts
Events, Properties, and Profiles
Name events for outcomes, use a consistent naming convention, and keep property types stable — a property that is sometimes a number and sometimes a string breaks breakdowns and filters.
Identity Management
Before login, Mixpanel assigns a device-based anonymous ID. Calling identify(userId) at login links the anonymous history to that user, and the same user ID on other devices merges into one profile. Calling reset() at logout prevents the next person on a shared device from being merged into the previous user. Use immutable internal IDs, not emails, and send server-side events with the same user ID.
Group Analytics
For B2B products, group analytics attributes events to accounts as well as users, enabling account-level funnels and retention — essential when the customer is the company rather than the individual.
Reports
Data Quality and Governance
- Lexicon documents events and properties with descriptions and owners, hides or drops unwanted events, and marks sensitive properties.
- Separate projects for development, staging, and production keep test data out of reports.
- Debug mode and live event views let developers confirm events and properties while building.
- Automated tests — unit tests on tracking helpers, end-to-end tests intercepting analytics requests (for example with Playwright) — catch regressions before release.
- Reconciliation with backend data reveals lost or duplicated events.
See Event Tracking.
Privacy, Residency, and Access
- Consent: start tracking only with consent where required, using opt-out APIs (
opt_out_tracking) to honor choices. See Consent Management. - Data residency: EU and other regional data centers keep data in-region; set the matching API host.
- Minimize personal data: avoid names, emails, and free text in events; control IP-based geolocation.
- Deletion: process deletion requests through Mixpanel's GDPR and CCPA APIs.
- Access control: project roles and data views limit which teams see which data.
Best Practices
Start From Questions
List the decisions analytics must support and track the events needed to answer them, instead of tracking everything.
Track Critical Events Server-Side
Send purchases, subscription changes, and other business-critical events from the backend, where ad blockers and network issues cannot drop them.
Version Your Tracking Plan
Keep event definitions in version control alongside code, review changes, and announce breaking changes to analysts.
Test Before Release
Treat tracking as part of the feature's acceptance criteria and test it automatically.
Common Mistakes
Never Calling reset
Duplicate Tracking
Changing Property Meaning
FAQ
What is Mixpanel used for?
Event-based product analytics: analyzing how users adopt features, convert through funnels, and retain over time, with cohorts, flows, session replay, and experiment analysis.
How does Mixpanel identity work?
Users start with an anonymous device ID. Calling identify with your user ID at login links that history to the user and merges activity across devices; reset at logout starts a new anonymous identity.
What are super properties?
Properties registered once on a client and automatically sent with every subsequent event, such as app version or experiment variant, so every event carries that context.
How do I test Mixpanel tracking?
Use debug mode and live views during development, separate projects for test environments, unit tests that assert tracking helper calls, and end-to-end tests that intercept analytics requests.
Mixpanel or Amplitude?
Both are event-based product analytics platforms with similar core reports. Differences lie in pricing, governance features, experimentation, warehouse integration, and team preference. See Amplitude.
Related Topics
- Product Analytics — Measuring product usage
- Event Tracking — Designing analytics events
- Amplitude — A comparable analytics platform
- Consent Management — Privacy choices and tracking
- Playwright — Testing tracking end to end
- A/B Testing — Measuring causal impact