This article assumes that you have a foundational understanding of the Mixpanel data model and the Implementation process. If you haven’t already done so, please take time to review the Guide to Mixpanel Basics and Guide to Mixpanel Implementation before proceeding with this article.
How your data is defined is as important as deciding what data to collect. During the planning phase of your Implementation, your team decided what events to track, however a step that often gets overlooked is how important the naming convention plays into your analysis.
It’s important to set the standard to keep your data clean, concise, and consistent. This will bring convenience, clarity, and reliability to your data across all teams that have access to your Mixpanel project.
With multiple teams relying on the same data it’s important that everyone understands what the data collected means. Having clean, concise, and consistent data enables the rest of your company to query reports, understand analyses and launch experiments, ultimately helping your company make data driven decisions.
- Clean: clean data is readable and easily understood, with consistent casing and spacing
- Concise: short yet distinct event names make data easy to find. Most importantly, event names and or properties that are too long will get truncated in the Mixpanel UI
- Consistent: consistent data prevents confusion and promotes smooth understanding as you scale and add new data and tracking.
When thinking of how to name your events, think of all the different ways users interact with your platform. Let’s look at an example page below.
On this example page, there are four ways a user interacts with this platform: they can Play a song, Buy a song, Downgrade their plan, or Logout from the site.
To keep the event names clean, describe the action as it happens. To keep event names consistent, a decision should be made on the casing and even spacing of these events. While it is ultimately up to you and your team on how to collect and name your data, we suggest that you use proper title casing and spaces instead of other styles such as camelCase or snake_case.
The following property name limitations apply in Mixpanel:
- Your property names should not begin with $ or mp_. These properties are reserved for special properties sent by Mixpanel.
- Your property names cannot begin or end with a space as they will automatically be trimmed.
- Your property names and values cannot be longer than 255 characters. In practice they should be much shorter than that. Property names get cut off by our user interface at about 20 characters.
This is how it would look in Mixpanel:
A rule we have at Mixpanel is to have concise events and let all of the properties provide all the details tied to that event do the explaining for you. It’s important to capture as much detail of events as possible because it allows you to dig deeper in your analysis.
Take the event Sign Up, for example. Mixpanel can tell you how many times that event was triggered, but with properties we can see how many users signed up under the Free or Premium Plan.
It’s common for companies to implement Mixpanel on a small part of their ecosystem and scale their analytics as they grow, which means that there will be various roles that are looking at the data over time. Setting naming conventions at the very beginning prevents developers that implement more data later from labeling data in a way that’s hard to understand. Properties and events should follow the same naming and spacing conventions to keep your data clear, clean, and consistent.
Now that you've set standards, the next step is to outline all the events and properties that connect with your goals and metrics on an Implementation Plan. Creating a Tracking Plan has specifics on what should be in your spec as well as a blank sheet for you to start.