Best Practices -Updated-

Our hope here is to provide a more up to date outline of some of the best practices for quickly getting up and running with mixpanel.

The best way to get started

We advise you begin by instrumenting only a small handful of key metrics. We think you'll be amazed how much value you can get out of even just 5 events. By starting your implementation small, you can quickly separate signal from noise, and begin from day one with a manageable reporting environment that you can share with your co-workers. You'll also be able to start making decisions based on your data faster, allowing the tool to demonstrate its value before additional development time and effort are spent on a more elaborate implementation. Furthermore, a small implementation is also easier to fix if, for instance, after chatting on the phone with a Solutions Architect you decide you'd like to adopt a new system of organizing or naming your events and properties.

One easy way to start small is to envision a single funnel, measuring one of the most important processes on your site or in your app (sign-up, or purchase funnels are good choices). Try choosing the steps of that funnel as your first few events.

Make good use of properties

Properties are the place to articulate all the details associated with an event. Properties fall into two camps: event specific (like the revenue associated with a purchase event) and user specific (like demographic information about the user). The user specific data we call "super properties." For example, you might want to send the gender, age, or traffic source of a particular user along with their events. All the user specific data is stored in a cookie (on the web) or in a local object (on native mobile) and appended onto all subsequent events for that user. A rich set of event and user specific properties will allow added agility in reporting, since mixpanel lets you drill down and inspect the intersections of many different properties across all reporting. It's important to keep in mind that properties are entirely defined by you. Do your best to avoid storing details in event names that could be stored in properties. For example, don't do mixpanel.track("Facebook Share"). Do something like this: mixpanel.track("Share", {"Network": "Facebook"}). More on that here.

Employing this strategy makes Mixpanel's UI and reporting significantly more powerful and easier to understand.

Clear event and property naming

We advise always using clear, human readable event and property names. This makes your reports much easier for everyone on your team to understand. There's no reason you can't use spaces as opposed to underscores if you'd like. Naming things nicely makes reporting more navigable for everyone on your team. For example, don't use us a property name "c_id" for the id associated with a video channel if you don't have to. Why not send us a property called "Channel" and use a plain-text representation of the channel name as opposed to a raw numeric id?

As you continue to expand and improve you mixpanel implementation, keep track of the choices you've made about what to track with an implementation specification. You can can find a sample document to get started with here.

Keep your development data separate from your production data

A common question is "how do we delete some old development data we sent while we were instrumenting?" The answer, unfortunately here, is that you cannot. We advise all customers to create at least two projects. If our project was called "Mixpanel" then we would call one project "Mixpanel - Dev." and the other "Mixpanel - Prod." Use logic in your code to swap out the two project tokens for when you're developing and pushing to production. It costs you nothing extra to have multiple projects as we price based only on the amount of data you send us.

How do I track distinct users and what is this "distinct_id" thing?

One of the most important properties in mixpanel is distinct_id. Distinct_id is a property that is sent with every mixpanel event, and it is what we use to determine uniqueness across all reports. In JS or in the iOS/Android SDKs you can let mixpanel handle distinct_id for you, but you can also choose to control it yourself. You can set distinct_id using the identify method. You can grab distinct_id using mixpanel.get_property("distinct_id") in JS (or the equivalent in our mobile SDKs).

A common question is what to do when an anonymous piece of traffic traverses the signup funnel and then finally converts to a user. If you are setting the distinct_id yourself (to say your internal user id) so that if a registered user comes back on a new machine, or after clearing their cookies, you'd like to keep tracking them as the same user. You may then find yourself changing the distinct_id part way through a funnel, which will break your funnel! And unfortunately there is no way to change the distinct_id of an event that has already been sent to mixpanel. Oh no!

The best practice here is to allow mixpanel's JS library (or mobile SDK) to issue its own automatic distinct_id value to a user when they visit your site. Allow the user to send events from that distinct_id as they traverse the signup funnel. At the time of registration (if you are using mixpanel's JavaScript library v. 2.2 or later) then you can fire mixpanel.alias("whatever_you_aliasing_to") to alias that previous id to your newly issued internal id. From then on, when that user returns and authenticates, ensure that they have the id you just aliased by using mixpanel.register({"distinct_id": "whatever_you_aliased_to"}) or mixpanel.identify("whatever_you_aliased_to"). That way you ensure that the signup funnel does not break, and also that you continue to attribute all post authentication activity to that user, using the same id as originally used in the signup funnel. More on aliasing here.

What is the difference between Engagement data and People data?

The Engagement section of reporting pulls and renders event-based data. The People analytics section pulls and renders People data. Right now these two data types are totally separate from one another. That said, often data is sent to both. For instance, when registering a super property marking a user as paid=true, it makes sense to send both people data and event data. The libraries for sending event data can be found here, whereas those for sending people data can be found here.

We recommend Javascript for web integrations

Javascript is the most robust library we have for integrating Mixpanel into your website. You are of course welcome to host the JS library locally, or to modify it if you desire, but unless you have a good reason, we recommend using our snippit that pulls the full library asynchronously from our CDN. Our Javascript has many features to make instrumentation as easy as possible, and if you use our snippit, you will be able to tap into updates that we make to the library without changing your code at all (in most cases).

In some cases, sending events server side makes more sense. For these instances, we offer more functionally limited libraries in many server side languages (python, php, ruby, etc.).

The javascript library works well for mobile applications that consit of html5 views, but for native apps we advise using our native Android and iOS SDKs. Our mobile SDKs are mature, offer the same functional richness as the javascript library, and the strategy for implementation is similar.

Paid customers should be careful who the project owner is

If you're a paid customer, the user who "owns" (is the admin of) the project must also hold the billing information for the project. You can email support@mixpanel.com if you wish to transfer your project or billing info to a different mixpanel account.

Sending data to one project

If you have similar user behavior coming from multiple platforms (perhaps a Facebook game which also has a mobile version), we recommend you send all the data to one project and track the platform the data came from as a super property. That way you can look at one user's behavior across platforms, and choose whether or not to view all user activity on the same set of axes, or filter down to a particular platform. This is of course only recommended when the basic actions taken by users are similar enough to be described with the same set of event names (properties can be different).

Data flexibility

Mixpanel is very flexible and open ended tool. You can use it for anything from measuring how your users fair slaying digital monsters, to QAing a back- end fix, or monitoring and tweaking performance metrics such as how long it takes a UI to render. Anything that can be thought of as an "event" with "properties" can be tracked with mixpanel. Furthermore you can send us data from literally anything that can send an http request. Hacking our data model is not just expected but heartily encouraged. So use your imagination when you send events and properties. Don't let traditional ideas about web analytics limit the questions you can answer in a data driven way. And if you come up with a new or cool use for the tool drop us a line at support@mixpanel.com so we can brag about you!

Why most A/B tests give you bullshit results

By now, anyone in product or marketing knows what A/B testing is. What we don’t know, or at least won’t admit, is that too many A/B tests yield nothing. Too often they measure meaningless variants, produce inconclusive results, and nothing comes from them. Of course, some A/B tests yield real, meaningful, actionable results. Those are the ones you hear about. We've all seen the articles. Company X increases conversions 38% with this simple trick. Hell, I've written some of them. But those success stories have hidden the grey underbelly of testing and experimentation. AppSumo revealed that only 1 out of 8 tests produce results . Kaiser Fung estimates that 80 to 90 percent of the A/B tests he’s run yield statistically insignificant results . Yet many new testers walk into A/B testing thinking it'll be quick and easy to get results. After running a handful of simple tests, ...

Announcing Mobile Dashboards for iPhone

We've launched our Mixpanel mobile app so you can monitor your key metrics in one place, everywhere you go. With our iOS app, you can stay up to date on your company's trends, conversion rates, and retention all in one place. Available free in the App Store. Everywhere we look , the data shows that mobile is taking over . So we're putting the world's most powerful analytics into your pocket with Mixpanel's Mobile Dashboard app. Download our app for free , and log in with your Mixpanel account. Mixpanel's mobile app allows you to create a dashboard of your most important metrics, so you can easily check-in on your business anywhere you go. By easily adding key metrics to your dashboard, your data is available instantly for when you need it on the fly. When you need important stats for your team's daily standup meeting, during drinks with an investor, or wherever ...

Re-engage your users based on what they do, not just who they are

Mixpanel People is a powerful way to connect with your users and drive engagement. Now you can send notifications to your users based on all of the events you already send to Mixpanel. Available now for Push, Email, SMS, and Webhook notifications. Send targeted notifications to your users With Mixpanel’s People platform, you can target users based on the actions they take in your application. Here are some examples of how you can use this: Send a push if a user exercised 5 times in their first 30 days Send an email if a user has only logged in 1 time in the last 7 days Send a SMS if a user hasn’t chatted with another user yet Easy to Use It is extremely easy to use this functionality: you can retroactively use all the events that you send to Mixpanel. Start by going to the Notifications tab , then selecting your notification type and notification message. Now i...

Downtime: Ingestion API post-mortem

On January 20th, 4:05pm PST, Mixpanel’s ingestion API was intermittently unavailable until approximately 8:55pm PST. This incident was caused by two main factors: insufficient capacity in our backend queuing system and a bug in our Android SDK that produced a thundering herd . At 2:30pm, we rerouted traffic away from one of our datacenters due to planned network maintenance, placing double the load on our Washington, DC datacenter. At 4:00pm, a 10X spike in ingestion traffic occurred. Combined with the additional load from the maintenance, we started queuing data. We queued enough data to cause our queue servers to become disk IO bound. This lowered the enqueue throughput, causing some API requests to time out. Due to a bug, our Android client library responded to these timeouts by retrying every second instead of backing off. This triggered a thundering herd. The influx of retr...

How Breather built a network of spaces and succeeded where so many startups fail

Supplying peace and quiet while solving the on-demand economy. “Acquire users.” That's the common wisdom for consumer-facing startups. The more users, the better. Not unexpectedly, many of these companies focus all of their energy on driving demand, and often it makes sense. Just look at the tech giants that have built their businesses on a foundation of millions and millions of users, often acquiring masses before they even knew what their businesses really was. And if you're Facebook or LinkedIn, it makes sense. These companies aren't worried about supply. What are they going to do, run out of LinkedIn? (Ignore the dirty looks Ops folks are sending my way.) In fact, because of demand-side economies of scale and the network effect , LinkedIn's product actually gets better with more users. But there's a new breed of startups playing a different – and often lucrative – game. T...

A guide towards App Store Optimization

Let’s face it, getting your application discovered in the App Store or Google Play is a huge challenge but if you find a way to crack the algorithm, the payoff is huge! There are more than 1.5 million applications on the Apple App Store that have been downloaded more than 100 billion times. With the average number of downloads an app gets being around 62,000, App Store Optimization ends up being an important technique that can push you way past the average. What is App Store Optimization? App Store Optimization is a technique app makers use to improve the visibility of a mobile app in an app store. It’s similar to search engine optimization (SEO) for websites but optimizes for discoverability for a mobile app. The basic techniques of ASO encompass doing good keyword research, improving your app description, utilizing high quality screenshots, doing competitive research, and...

Why QuizUp turned the fastest-growing game in history into a social platform

Two years ago, QuizUp became the fastest growing game in the history of the App Store. But to stay relevant and to maintain its users, they knew it had to become more. With data-driven development, QuizUp has grown into an app that brings its users back time and time again, transforming from a trivia game into a social platform. Every week, somewhere in the ballpark of 15 thousand apps are submitted to the iOS App Store. About a quarter of those are games. A quick glance at the Featured screen shows a "Best New Games" list with a couple dozen games released in the past week or so. They're from names as big as Lego, and as small as Futureplay, a five-person shop out of Helsinki releasing their first game. It's a highly competitive landscape. And each can only dream of the success that Plain Vanilla Games had in the first week with QuizUp: over a million downloads. Five months after ...

Demystifying Predictive Analytics for Mobile and Web Apps

Predictive analytics is unfathomable to many of us. Terms like artificial intelligence, neural networks and deep learning just deepen the mystery. Yet predictive tools are already ubiquitous. Not in self-driving cars, or robots that look like humans. Rather, on your phone. Spotify looks at your past listening habits, and that of people who like similar music, and recommends new tracks to listen to. Youtube does the same with videos. Your email service predicts whether a mail message sent to you is spam by analyzing past emails sent to you and others. Siri and Google Now use predictive technology to understand your voice, and offer answers to your questions. Predictive analytics is the practice of using advanced statistics and historical data to predict future outcomes. For the most part, the use of predictive analytics in business is still shrouded in mystery and the domain of ...

Introducing Predict - see who will convert, before they do.

Predict lets you know which of your users are going to convert, or not, before they do. Just select an action and, based on users' previous behavior, you'll get a grade on how likely each user is to complete it. Then target users by their grade. Like reaching out to those less likely to convert and giving them a nudge in the right direction. And starting today, Mixpanel Predict is live for all customers using People Analytics . Use Predict to impact leading metrics Use Mixpanel's predictive analytics to learn whether your app’s users will convert. You can define what converting means for your company as any action or event in Mixpanel – even the number of times it was done. Pick an important action that leads to success for your app (commonly called a leading metric ). So if you have a photo sharing app, you probably want to know who is going to share a picture. Or who wo...