Flow analysis shows exactly how users move through your product—which steps they take, where they drop off, and what drives conversions. Without proper event tracking, you're just guessing at user behavior. Mixpanel's flow reports turn your event data into a visual map of real user journeys.
Set up the foundation: Initialize and identify users
Flows are built on events tied to individual users. You need Mixpanel initialized, users identified, and actions tracked consistently.
Initialize Mixpanel and identify your users
Load the Mixpanel SDK and set a stable user identifier. This connects all events to a single user profile so Mixpanel can build accurate flows.
// Initialize Mixpanel on page load
mixpanel.init('YOUR_PROJECT_TOKEN');
// Identify the current user
mixpanel.identify('user-123');
// Optional: Set user properties that persist
mixpanel.people.set({
'$email': '[email protected]',
'$name': 'Jane Doe',
'plan_type': 'pro'
});Track key events as users move through your product
Fire events for meaningful user actions—button clicks, form submissions, feature usage. Use descriptive event names that represent decisions or progression, not page views.
// Track user actions with context
mixpanel.track('Viewed Product', {
'product_id': 'prod-789',
'category': 'analytics',
'price': 299
});
mixpanel.track('Added to Cart', {
'product_id': 'prod-789',
'quantity': 1,
'cart_total': 299
});
mixpanel.track('Started Checkout', {
'cart_value': 299,
'items': 1
});
mixpanel.track('Completed Purchase', {
'order_value': 299,
'payment_method': 'stripe'
});Use super properties for consistent tracking
Register properties once with mixpanel.register() and they'll attach to every event automatically. Use this for campaign source, feature flags, or environment data.
// Set super properties at session start
mixpanel.register({
'utm_source': 'google',
'utm_campaign': 'q1-launch',
'device_type': 'mobile',
'app_version': '3.2.1'
});
// These properties automatically attach to all subsequent events
mixpanel.track('Signup Clicked');
// Automatically includes: utm_source, utm_campaign, device_type, app_versionVisualize flows in the Mixpanel UI
With events flowing in, use Mixpanel's reports to see where users convert and where they abandon.
Build a funnel to measure conversion drop-off
Go to Funnels in the left sidebar, create a new funnel, and add your tracked events in the sequence users should follow. Mixpanel calculates drop-off rates and conversion between steps.
// Create a funnel in Mixpanel UI:
// 1. Click Funnels → + New Funnel
// 2. Name it 'Purchase Flow'
// 3. Add steps in order:
// - Viewed Product
// - Added to Cart
// - Started Checkout
// - Completed Purchase
// 4. Set time window: '30 days' (or your expected conversion window)
// 5. Click Apply — Mixpanel shows conversion rates between each step
// To filter by cohort:
// 6. Click Segment by and select a property: 'plan_type', 'device_type', 'utm_source'
// 7. Compare conversion rates across segmentsReview individual user flows with User Timeline
Go to People in the left sidebar, search for a specific user, and click their profile to see their event timeline. This shows the exact sequence of actions they took—invaluable for debugging and understanding real user behavior.
// View a user's flow history:
// 1. Click People in the left sidebar
// 2. Search for a user ID: 'user-123'
// 3. Click the user to open their profile
// 4. View Events tab — see chronological list of all tracked events
// 5. Hover over events to see properties for each action
// This shows you the *actual* path a user took, not the expected pathAdd depth with event properties and segmentation
Raw event sequences are a start. Properties let you analyze which user cohorts flow differently and why.
Include context properties on every flow event
Attach properties that matter for your analysis—user segment, experiment variant, feature flag state. This lets you compare flows across cohorts in Mixpanel's reports.
// Track events with context properties for analysis
const userTier = getUserTier(userId); // 'free', 'pro', 'enterprise'
const experimentVariant = getVariant(userId); // 'control' or 'new_onboarding'
mixpanel.track('Feature Viewed', {
'feature_name': 'custom_dashboards',
'user_tier': userTier,
'experiment_variant': experimentVariant,
'session_duration_sec': elapsedSeconds,
'is_returning_user': userDaysOld > 7
});
// Now you can filter flows by tier, experiment group, or user type in reportsidentify()). Stick to categorical properties like plan, region, feature_flag. High cardinality properties create too many segments and make reports unreadable.Common Pitfalls
- Not calling
mixpanel.identify()consistently—Mixpanel treats unidentified sessions as anonymous users, so you won't see real flows, just fragmented event sequences. - Tracking page views instead of user actions—flows need distinct events like 'Clicked Button' or 'Submitted Form', not just 'Page Loaded'. Page views don't show intent.
- Setting funnel step timeout too short—if your users take 5 days to convert but you set a 48-hour window, they drop out of the funnel artificially.
- Using different property names across events—if one event sends 'user_plan' and another sends 'plan_type', segmentation filters won't work correctly.
Wrapping Up
You now have Mixpanel tracking user flows, funnels visualizing drop-off, and properties segmenting by cohort. Flow analysis exposes friction points and shows which user groups convert. If you want to track this automatically across tools, Product Analyst can help.