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!

Geolocation Error on 7/9/2015

Incident Summary: No geolocation was being performed on events and people requests between 5:00PM PST 7/8/2015 to 1:30AM PST 7/9/2015. This affected all customers. Timeline: On 7/8/2015 at approximately 5:00 PM PST, a change was deployed to consumers that migrated our geolocation system from a Python module to a C replacement as part of our systems optimization plan. After this point, all geolocation requests made to the Maxmind DB began failing. Around 7/9/2015 1:00AM PST, Mixpanel began reverting the change and by 1:30AM, all consumers were reverted back to the Python Maxmind DB reader, which resolved the issue. Root Cause: The migration from a Python module to a C replacement proved not to be a direct drop-in replacement and generated errors (TypeError) when fed a value other than a string. We typically send IPs in the format we receive them, which can sometimes be a long...

A/B testing comes to Android

So you've got an idea. "We have all these awesome features most users just haven’t tried yet. I bet more people would use them if they couldn't skip the tutorial. " "I know more people would create an account if our button just said 'Get Started'." "Our game's too easy. People want a challenge. If it were a bit faster, it would keep users coming back." Great, but a good idea alone isn’t gonna cut it. Especially when opinions differ. What you really need is cold, hard data. You need to put that hypothesis to the test and see how it fares with real users in the real world. That's where A/B testing comes in. Previously, you've been able to use Mixpanel to experiment and improve your iOS app. And we've seen how useful it has been to our customers. Today, we're expanding Mixpanel A/B Testing to Android. All the capabilities that enable you to experiment and improve your iOS a...

Community Tip: Benefits & Best Practices for Cross-platform Apps

In this Community Tip, we highlight the benefits and best practices for accommodating all of your varied products, environments, and platforms under a single Mixpanel project. Using this guide, your team can decide how to best track your cross-platform app data within Mixpanel. If you're one of the many users working with cross-platform apps, you may have wondered whether it's best to combine everything into one Mixpanel project or split everything up and analyze it separately. We've found that creating separate Development and Production projects to avoid cluttering your Production data is a great best practice, but the question of what to do with cross-platform Production apps is a matter of preference. The good news: Mixpanel is flexible enough to handle cross-platform scenarios in any configuration you'd like to implement. The choice is yours, and each approach comes with its...

Introducing Codeless Mobile Analytics

Tracking how users are interacting with your app just got easier. Now you can get Mixpanel's advanced mobile analytics without writing a line of code. Let's face it, everyone's dealing with limited developer resources. If you've got to add a tracking request to the growing queue of dev needs, it'll probably take some time. With Codeless Mobile Analytics , you can focus your development time on what matters - making your app better. With a simple point and click setup, Codeless makes tracking events a breeze. Want to know if people are using a new feature? Skipping that tutorial? Changing a setting? After you've installed the Mixpanel SDK you can just fire up Codeless Mobile Analytics (it's that icon on the bottom of your sidebar). Select your platform - iOS or Android. Then connect to your app using either a phone or an emulator. That's it. From right there in your bro...

How Cozi got a 38% increase in signup completion

Tara Pugh, product owner of Cozi, stopped by our June Office Hours to explain the process for improving their UX through many small, data-driven steps. Cozi helps bring order to the chaos of modern family life with an app that gets the entire family on the same page with shared calendars, to-do lists, and shopping lists. Digging into their conversion funnel data with Mixpanel, they identified opportunities to improve user experience by streamlining the account creation flow. Testing hypothesis after hypothesis, Tara and the team at Cozi were able to incorporate bits of learning into the flow: lighter background, different calls to action, pre-populating name and email forms. No single change resulted in a huge increase in conversions, but all together, the improvements raised the signup completion rate from 55% to 76%—a 38% increase. Check out Tara's talk for all th...

Join us for Office Hours with Vandan Parikh (Product @ Capital One) & learn how to translate data into actions

Come join us for Office Hours in San Francisco where Vandan Parikh, Director of Product Management at Capital One, will take us through: Getting from information to action — Wednesday, July 29, 2015 What it's about Whether you are a product manager, growth hacker, data scientist, marketer, engineer, or founder, your role increasingly relies on turning data into action. The capacity to make this transformation consistently will determine the success of your team, product, and ultimately, your company. Vandan Parikh, Director of Product Management at Capital One and formerly Product Lead for Flickr at Yahoo, has developed tactics and strategies to create data-driven action and incredible success. Don't miss Mixpanel's Office Hours on July 29th when Vandan will detail the goals, principles, and environments necessary for you to bring actionable analytics into your company su...

AARRR! for People: Using Mixpanel Notifications to Grow your Business

This Community Tip will describe how to utilize Mixpanel notifications to engage users according to the AARRR analytics framework . By sending targeted notifications throughout the customer lifecycle, you can independently increase acquisitions, activations, retention, revenue, and referrals. Mixpanel Notifications are powerful tools for engaging with your user base. Through targeted push, email, SMS, and in-app messages, you can deliver effective calls to action to targeted groups of users. To determine who receives what call to action, Mixpanel uses targeting based off of people properties . There’s nothing worse than having a great call to action, but not having the right people properties to target the right group of users. This post will cover all of the tips and tricks you need to create effective campaigns throughout your user's lifecycle with Mixpanel notifications. We...

Community Tip: How to keep properties consistent across client and server libraries

To unlock the full power of Mixpanel reporting when using multiple integration libraries, super properties should be maintained across each Mixpanel library. In this Community Tip we discuss how to pass data from the client-side to your server for custom super properties and Mixpanel's default client-side properties. Passing custom super properties As a refresher, super properties are client-side properties that are automatically attached to every event that a user sends to your Mixpanel project. Super properties make working with Mixpanel data much more convenient because you can create custom global properties that are omnipresent on all of your events. These super properties will be attached to each and every event provided the memory location (cookies in a browser, device memory in a mobile phone) of the super properties is not cleared. However, since custom super properties ...

Now you can hide events and properties

Keep stale event and property names out of your dropdowns. Mixpanel has long offered you the ability to hide events that you've decided are irrelevant or maybe just were typos from the very beginning. We’ve recently extended this functionality to let you also clean up the list of properties that you see when segmenting reports or creating custom events. Say your application tracked an an event called "ate" with integer property called "tomatos". Later you decided to fix the pluralization of this property name and renamed it "tomatoes". Even though you stopped sending events with the "tomatos" property, you'd still see entries for both “tomatos” and “tomatoes” in the dropdown list of properties on your segmentation report. By marking the property name "tomatos" as hidden , you can keep it from showing up in this dropdown and any other dropdown that lists properties. How to h...