Build Your Tracking Strategy
It's important to first understand Mixpanel's Data Model and then create a Tracking Plan using this model to define the actions or behaviours that you want to track in order to measure your metrics and KPIs. This ensures that your data is structured to maximise Mixpanel's analytics capabilities. If you have not thought about your metrics and KPIs, now is a good time to read up on Analytics Framework.
Mixpanel's data model is composed of Events, User Profiles, and Properties that provide more details about the events and profiles they belong to.
Events are the foundation of Mixpanel's Data Model. In order to conduct meaningful analysis and gather insights using Mixpanel reports, you should understand and intentionally design your events and event properties based on your business objectives, specific use cases, and key metrics.
Events represent interactions between the user and your product and are fundamentally immutable (eg for historical snapshot):
All events should have an Event Name, a Timestamp of when that event has occured, and a Distinct ID to tie all events belonging to the same user
Events have event properties that provide additional context or details about the event
It's important to only track events that align to the metrics you want to measure, and always include relevant event properties that will enable you to drill deeper into the analysis.
For more details and examples refer to our documentation on Events and Properties.
While events capture behaviours or user actions, user profiles capture demographic attributes which help in cohorting users based on their latest characteristics such as users' details (e-mail, phone), device information (brand, model), users' geographical locations (country, region, city), product related details (current subscriptions, customer type) etc.
User profiles are in a separate object from events and are mutable (eg for current snapshot):
All user profiles should have a Distinct ID that can be used to tie to events belonging to the same user
User profiles have user properties that capture these demographical attributes
A user that has events, can exist in Mixpanel without having a user profile, especially when they are anonymous (eg not logged in)
As a best practice, think of event properties that you track under events which might also be useful as user properties. This would allow you to analyse a user property which provides the latest state or value against the same event property that records a value in the past. Example: I want to analyze users who are currently in country = "Singapore" (user property), did these same users also use my product in another country (event property).
For more details and examples refer to our documentation on User Profiles.
These are event properties that you track with almost every (typically >80%) distinct event that you send. Unlike regular event properties, which only provide specific information to the event its associated to, global / super properties provide an overarching context on information about the user or their environment that you plan to analyze across different events. The value of a global / super property typical persists for a prolonged period and changes only due to certain user action or product functionality
App User ID - useful to have in all events where user is logged in for identity management troubleshooting
Subscription / User Type - useful for tracking change in subscriptions or user types over time in different events
Favorite Genre - useful in comparing a user's favorite genre against other music genres they played, and how they change their favorite
App Source - useful when you are tracking mulitple apps into one single Mixpanel project, which can be used for data segregation (see Data Views)
Mixpanel's client-side SDKs provide a method that allows you to register / save the property in a cookie or local storage and auto-appends it in subsequent event tracking calls.
For more details and examples refer to our documentation on Super Properties.
These are event or user properties that Mixpanel auto-populate with a value if available, either through using our client-side SDKs or through information received when data is being ingested into our servers. These properties are typically useful when you are interested in general locations (Country, Region, City), device level information (OS, Browser, Model, App Version), or Marketing Attribution Parameters (UTM tags, Google / Facebook Click ID) but you do not wish to instrument code to manually track them.
Mixpanel reserves certain property names for special use cases and system processing. Unlike default Mixpanel properties, which are auto-populated with a value, reserved properties may or may not be auto-populated. You would need to ensure that these properties are populated for the specific Mixpanel functions to work.
time - event property used to denote the timestamp of events, auto-populated by client-side SDKs
mp_original_distinct_id - event property used in hot shard detection
$email - user property containing user's e-mail exported as part of cohort exports, manually-populated as part of your codes
Note: Both default and reserved Mixpanel properties are typically prefixed with
sign. It is a best practice to avoid naming your own properties with such prefixes to avoid confusion.
Mixpanel supports five data types for properties: String, Numeric, Boolean, Date and List. You should choose the most suitable data type for your properties, since each type has a specific set of operations that enables richer analysis (eg numeric data types allows for aggregated).
String - useful in capturing textual values (suppports double-byte characters)
Numeric - meant for whole numbers or decimals where numeric calculations are expected to be performed (supports up to 16 decimals)
Boolean - used when a property is always a true
state, avoid using when you expect your property to have other states in the future
Date - used to capture both date and/or timestamp, example: Jun 20, 2009 14:20:30
List - meant for capturing an array / collection of similar or related values, example: ["Shoes", "Clothing", "Cosmetics"]
A property's default data type can be typecasted to another data type in Mixpanel reports. However, it's always an important best practice that you keep a property's data type consistent during implementation to avoid any confusion.
Mixpanel also supports object and list of objects data types for specific use cases like in e-commerce. It is highly encourage that you use the five primary data types as they are fully supported in the Mixpanel UI.
For more details and examples refer to our documentation on Supported Dta Types.
Note: read this section only if you have Group Analytics add-on.
Mixpanel's core behavioural data analysis is at the individual user level; there are however, use cases where behavioral data needs to be analysed at a customized group level (eg company, subscription, account). An add-on Group Analytics package available to customers on Growth (opens in a new tab) and Enterprise plans (opens in a new tab) enables this functionality.
Similar to how each individual user's event must have a Distinct ID; each group would require a Group ID (eg company_id, subscription_id, account_id) that will allow Mixpanel to group events across users belong to the same group to enable group level analysis.
Additionally, just like each user can have a user profile; each group can also have a group profile that captures demographical group attributes to enable cohorting of groups based on their latest characteristics such as industry, company size, subscription information, account type.
Keep in mind that not every business necessarily has use cases that may require group level analysis; refer to our documentation on Group Analytics for more information.
For more information about Mixpanel's Data Model:
Checkout our Mixpanel Data Model Board (opens in a new tab) in the demo project for a hands-on experience with how it works
Read about Mixpanel Infrastructure
Now that you have an understanding of Mixpanel's Data Model, let's walk you through the steps and best practices on building your own Tracking Plan to define the events, profiles, and properties to help you track and measure your metrics and KPIs.
Link to User Journey Figma (opens in a new tab) shown in video.
Prioritize on the key user journeys that are pertinent to the metrics and KPIs you want to measure.
For example, a sign up journey will be important when measuring metrics related to newly acquired user (part of Reach). If you used the RAE Framework, make sure you cover the journeys that will help you track and measure your (R)each, (A)ctivation, and (E)ngagement.
Map the key actions within these journeys into events and capture event properties to provide additional information about the action. As you define your events, think about whether certain event properties should be global / super properties and user properties.
If you have screenflows in tools like Figjam (opens in a new tab) or Miro (opens in a new tab), use them to visualise the steps and actions in a user's journey to define the events and properties. Here is an example of a User Journey in Figma (opens in a new tab).
As you determine what user actions to track, you'll want to strike the right balance to make sure events are not too broad nor too specific.
It is important to adhere to best practices when managing personal information (PI) that you might potentially capture in the properties you define. Refer to our Privacy (opens in a new tab) documentation for details on how Mixpanel respects and protects people’s fundamental online privacy and data rights.
Having specific questions (eg hypothesis, influencing factors, current / target numbers) around the metrics you're measuring also helps you decide on the events and properties to include. Think of the answers you want to arrived at, and how an action (event), an information of an action (event properties), or a recent state (user property) can help lead you to that answer.
As you map your events and properties, it's also important to ensure that you have factored identifying users in your product (eg website, app, devices).
For instance, when a user goes from being anonymous, to completing the sign-up or registration process or simply logging in with a valid user account, you would want to properly identify the user with their user ID as the Distinct ID. This would ensure that events triggered across devices, while the user is anonymous, are tied to their events when they are logged in.
If you are not specifically tracking a sign-up journey or login event, make sure you work with your developers to have them understand how identity management works in Mixpanel.
Define and document your naming standards, approaches to data types and values in your properties, and how you should deal with nullable or not-applicable values; this will help ensure data quality and data trust over time.
Here are guidelines to help you think through:
Mixpanel is case-sensitive (eg sign_up_completed
vsSign Up Completed
are considered two separate events), Mixpanel generally recommends keeping a consistent snake_case naming convention
When naming events and properties, avoid abbreviations or specific jargons that may not be immediately or easily understandable, also avoid prefixes mp_
Use the appropriate property data types and ensure that values within properties are consistent *(eg subscription_type
= "Premium" vs "premium" vs "Paid" are considered different values)
If certain property values (eg null, N/A, "" - empty string) are essentially considered unavailable, Mixpanel generally recommends that for those instances the property should not be sent with the event or user profile.
Mixpanel is case-sensitive (eg
Document your events and properties in a tracking plan, access and make a copy of the blank Tracking Plan template here (opens in a new tab). Keep your tracking plan as a living and shared document that is continuously updated with any implementation or product changes.
Mixpanel provides the following templates for vertical-specific tracking plans:
Retail and E-commerce (opens in a new tab)
Media and Entertainment (opens in a new tab)
SaaS (opens in a new tab)
Financial Services (opens in a new tab)
Was this page useful?