6 min read

How to Track Flow Analysis in Mixpanel

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.

javascript
// 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'
});
Replace YOUR_PROJECT_TOKEN with your token from Project Settings

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.

javascript
// 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'
});
Each event is a node in the flow graph. Properties give context for segmentation.

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.

javascript
// 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_version
Super properties ensure consistent context across your flow without duplication
Watch out: Don't track every keystroke or hover. Focus on actions that represent meaningful steps—'Added Item', 'Viewed Pricing', 'Opened Settings'. Noise muddies flow analysis.

Visualize 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.

javascript
// 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 segments
Funnels reveal where users drop off and which segments convert best

Review 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.

javascript
// 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 path
User Timeline is your microscope—see real behavior, not hypothetical flows
Tip: Always segment your funnel by key properties. A 50% overall conversion rate might hide that free users convert at 10% while pro users convert at 80%. Segmentation reveals what actually drives flow.

Add 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.

javascript
// 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 reports
Properties transform raw events into analyzable cohorts
Watch out: Avoid high-cardinality properties like timestamps, UUIDs, or user IDs in event properties (user ID is already set via identify()). 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.

Track these metrics automatically

Product Analyst connects to your stack and surfaces the insights that matter.

Try Product Analyst — Free