Getting Mixpanel Set Up Correctly
Mixpanel is one of the most powerful product analytics tools available, but its value depends entirely on the quality of your event tracking implementation. A poorly designed tracking plan produces confusing, unreliable data. This guide covers the setup decisions that matter most. Our product analytics service handles Mixpanel implementation for teams that want it done right from the start.
Installing the Mixpanel SDK
For web apps: install via npm (npm install mixpanel-browser) or load the snippet from Mixpanel's CDN. Initialize with your project token: mixpanel.init('YOUR_TOKEN'). For mobile, use the iOS or Android SDKs.
For server-side tracking (recommended for sensitive events like purchases or subscription changes), use the server-side library for your language (Node.js, Python, Ruby, etc.) and send events from your backend rather than from the browser.
User Identification
The most critical Mixpanel implementation decision is user identification. Before a user logs in, they are anonymous (tracked by a random distinct_id). When they log in, call mixpanel.identify(user_id) with your internal user ID. Call mixpanel.alias(user_id) once at signup to link the anonymous pre-signup events to the logged-in user profile.
Getting this wrong means your new user events and logged-in user events appear as separate anonymous people — breaking funnel and retention analysis. Test this thoroughly before going to production.
Designing Your Event Taxonomy
Use a consistent naming convention: Verb + Object in title case. Examples: "Button Clicked", "Form Submitted", "Report Viewed", "Subscription Upgraded". Avoid platform-specific names ("iOS Button Tap") — use the same event name across platforms so cross-platform funnels work.
Every event should have at minimum these properties: plan (user's current subscription tier), feature or section (which part of the product), and any event-specific properties relevant to that action.
Super Properties
Super properties are set once and automatically attached to every subsequent event — without you having to include them in each individual track call. Use super properties for user-level attributes that should appear on all events: account plan, user role, signup date, company size. Set them with mixpanel.register({'plan': 'pro', 'role': 'admin'}).
This is the difference between consistent, queryable data and data where half the events are missing critical attributes.
Need expert tracking setup?
Our Google Tag Manager experts have delivered 500+ tracking setups with a 98% success rate.
Get a Free Consultation →