Mixpanel - Analytics for startups

real-time analytics, metrics, optimization, and data analysis 

Backtype does split testing with Mixpanel

The guys over at Backtype wrote a post about their adventures in split testing. Check it out:

http://tech.backtype.com/split-testing-with-mixpanel

Posted by Suhail Doshi 

Comments [0]

Javascript Library updated, mpmetrics.js is now deprecated

We would like to inform everyone that we've updated our Javascript client library in favor of a new architectural design that became more necessary. The primary change is that we need to change the way developers use the actual mpmetrics object, many customers of ours also use widgets provided by companies like Uservoice.com and because of the current implementation and due to the fact that Uservoice is a customer of ours, the mpmetrics object gets overriden and cuts off your metrics.

The change is simple, we now require developers to instantiate a brand-new object called MixpanelLib which you can set to a variable called mpmetrics:

<script type="text/javascript">
try { var mpmetrics = new MixpanelLib("YOUR_TOKEN"); } catch(err) {}
</script>

You can download or source the new Javascript library at: http://api.mixpanel.com/site_media/js/api/mixpanel.js

That's it, really simple. You can continue to call mpmetrics like you always have. We're working with Uservoice to rename their variable mpmetrics to something else so it does not conflict. This allows you to continue to inline our javascript without overriding some one elses mpmetrics object and in the future allows you to use multiple projects to log data to much more easily as well.

If you have any questions or concerns, please email us at support@mixpanel.com.

Posted by Suhail Doshi 

Comments [2]

A/B Testing to increase user engagement

Here's the idea: sometimes you want to optimize for engagement, rather than something more concrete like revenue or conversion rate.  Measuring engagement is a trickier task, (one you should use Mixpanel for), but that just makes it more interesting.

Let's use Posterous (the service that hosts this blog) as an example startup that might want to optimize for engagement.  Perhaps they want to increase the number of comments received on blog posts, so they drum up an A/B test between their current layout (the control group) and one with a greater emphasis on commenting.

Once it's been running for a while we can start to analyze our hypothetical A/B test.  We can approach it in a few ways: 

  1. Average actions per user
  2. Ratio of active to inactive users
  3. User activity distribution
Comparing average actions per user

The first and most naive approach is to simply compare the average number of actions per user from each group in your A/B test.  This is really simple to do, and it looks something like this:

Hypothetical Posterous A/B Test: Average comments per visitor

Group

Visitors

Comments

Average

Control

334690

7459

0.0222

Experimental

322784

9567

0.0296

If we use this metric, we see that the experimental design is clearly winning, with approximately 30% (0.0296/0.0222) more comments per user.  The trouble with this technique, though, is that we don't know anything about the distribution of users who commented.  For all we know, all of the comments in the experimental group could have been posted by a single user - and that wouldn't be optimal.  This is an obvious exaggeration, but it leads nicely to our next option:

Comparing active user ratios

We can avoid the issues with the previous method by ignoring the actual number of comments and just looking at our visitors.  We classify each visitor as Active or Inactive - those who post at least one comment and those who don't.  This lets us ignore any outliers, such as a visitor who posts a thousand times. Now our table looks like this:

Hypothetical Posterous A/B Test: Active visitor ratio

Group

Unique visitors   

Active visitors

     Ratio

Control

334690

4533

     0.0135

Experimental

322784

3357

     0.0104

When we look at the proportion of visitors who posted at least one comment, we can see that the control group is beating the experimental group by around 30% - the complete reverse of our last conclusion.  

It's interesting that the two metrics we've used so far to measure user engagement can give entirely different results - it shows that we really need to look at the underlying distribution.

User activity distribution

The most likely outcome of an A/B test like this is a couple of differently shaped distributions.  They will still be quite similar, and in all likelihood will be power-law shaped (as the vast majority of visitors don't post at all).  So, without further ado, here are our distributions:

This graph may be a bit difficult to interpret. It shows the frequency of visitors with different comment counts - for example, there might be 1,000 visitors who left 2 comments, 345 who left 3 comments, and so on.  This means that a point (X, Y) on the curve tells you that there were Y visitors who left X comments.  Because this is just an example, the specific numbers don't really matter.  The most important part is the overall shape of the curve.

We can see that most users don't comment at all, and that there are very different behaviors between groups.  The control group (green line) has more users that write a small number of comments each, while the experimental group (red line) has fewer active users who comment frequently.

The question becomes 'do you want a smaller, highly engaged community, or a larger, less engaged community?' There's no easy answer here; it's more of a think-long-and-hard sort of situation that greatly depends on individual aspects of your startup.

Ultimately, the distribution method is the most powerful, but it's also the most difficult to implement and analyze - especially since your results will likely be less clear-cut than the contrived examples I've given here.  If anyone has some hard data, I'd love to hear about it - it would be great to have a case study.  Please email me at tim@mixpanel.com if you're interested in sharing.

-----
This post is based off of a conversation I had with Jesse Farmer a few weeks ago.  If you haven't read his blog, you should - there are some real gems.

 

 

Posted by Tim Trefren 

Comments [3]

A/B testing to increase your conversions the Eric Ries way

There are a lot of articles on the internet related on how to A/B test and there are numerous open source tools that are available to do it but nobody does a great job doing macro level A/B testing which we think is extremely important.

I personally learned about this idea from Eric Ries when he talked about a case where IMVU A/B tested the text of something only to find it was able to increase the conversions of something like revenue and they had no idea it had this effect on their users. It goes to show that an A/B test may increase conversions of something desirable but adversely effect something else or do completely the opposite of that scenario which would be profound.

When we designed Mixpanel, we thought about this idea and made sure it would be feasible to do this in the future so I'd like to show you how we're able to do this for you today, you can literally create an account and try it yourself or follow along in some manner. We think being able to do these macro level A/B tests really differentiates ourself from current tools available today.

Basic understanding

With Mixpanel, you're always logging events with a track() function:

mpmetrics.track("played a song", {"genre" : "hip-hop"});
mpmetrics.track("added to playlist", {"genre" : "pop"});

By Mixpanel standards, this is pretty basic API usage, this lets our customers track when a user plays a song or adds a song to their playlist but we take it one step further by letting them segment those events by the genre of that song which has its own merits in terms analysis.

Regardless, understanding properties ({"genre" : "pop"}) is the cornerstone in your understanding in how we can macro-level A/B test. These are user-defined and you can add more than one.

Creating the test

Any A/B testing article will generally explain that you can split users using the modulo operator on some user id:



function pick_background_color(user_id) {
    var test_id = user_id % 2;

    if (test_id) {
        return "red";
    } else {
        return "blue";
    }
}


This is basic code that chooses the background color to use based on a user_id provided to us so that the user always sees the same background color consistently. You should be able to setup a basic test to do almost anything you want just using the modulo operator and some basic programming logic.

Logging the data

Once you have the test created, what you can then use Mixpanel's properties as a way to log the test data. For example, lets say we have a music site and want to see how a red versus blue background effects our users behavior on the website.

So what we do, when we decide the background color we'll use in the CSS using the pick_background_color() function. In that function, we'll modifiy and add some Mixpanel code:



function pick_background_color(user_id) {
    var test_id = user_id % 2;

    if (test_id) {
        var color = "red";
    } else {
        var color = "blue";
    }

    mpmetrics.register({"test-background" : color});

    return color;
}


What mpmetrics.register does is it binds that property to every event along with any other events also bound to that event. This allows us to see how a red vs. blue split in background color effect every event on our music site. So we'll be able to see whether a blue or red background increases overall engagement: songs being played and songs added to a playlist (or all the other events being logged).

That's all it takes extra: mpmetrics.register();

On our reports, you can click on the "View" button and then click properties to get to your "test-background" property to see its effect and the split of red vs blue for that specific event.

Wrap up

It's not enough to just test whether a blue background color increases song plays, you might find it decreases songs being added to playlists--this is important to know because you may reconsider your product decisions if you're a site like Muxtape who thrived off users creating new playlists that would be shared around increasing their overall traffic.

Imagine if these metrics were related to your bottom line, you better know how certain things effect everything else otherwise your product could be headed down an unexpected and undesirable path.

 

Posted by Suhail Doshi 

Comments [1]

Funnel analysis with Mixpanel

I was looking over the blog the other day and I noticed that though I wrote an Introduction to Funnel Analysis and a guide to implementing the funnel I forgot to do a blog post.  So, here it is!

A brief introduction

Funnel analysis is a way to measure how users go through a specific set of actions on your webpage.  Anywhere you need to get conversions, like a signup or purchase, can benefit from this kind of analysis.

An example funnel would be a signup process for new users, which could look something like:
front page -> signup impression -> signup -> confirmation

Users would drop off at each of those steps.  The goal of measuring the funnel is to minimize this dropoff rate.

Tracking funnel steps

One really cool thing that Mixpanel can do is track events as funnel steps instead of relying purely on pageviews.  

This means, for example, that you can figure out exactly what percent of people add an item to their cart - which is an action that doesn't change the page but is crucial to the checkout process.  It's also a major dropoff point, so you definitely want to be able to track it in your funnel.

Once you've figured out the steps of your funnel it's really easy to integrate. After integration, we get to the fun stuff - the report.

Viewing the funnel

Here's what a funnel report looks like (with a few notes):

So, with this display you learn:
  • Number of unique visitors at each step
  • Conversion rate between steps
  • Overall funnel conversion rate

Which are all amazingly useful things to know.

But wait - there's more!

We actually take this a step further - the same concept of properties, when applied to funnels, allows you to store any extra data you know about that step of the funnel and see how it effects user behavior.

You can track things like:
  • referrer
  • ad campaign
  • search string
  • anything you think would effect conversion rates

Here they are tracking what country users are coming from. You can see that each country has a different conversion rate: 


We can see that visitors from the US convert the best between these two steps. This is interesting, but the real question is how it effects the total conversion rate for the funnel.  We can see that too:


It's interesting to note that the conversion rate at the first step didn't match the overall outcome - Australia actually converted the best, rather than the US. This illustrates why tracking the full length of the funnel is so important.

Being able to track specific things across the full length of the funnel allows for some interesting applications - such as site-wide A/B testing.  You can show different versions of the site to different users and see not only how it effects one level of conversion - clicking a signup button, for example - but how it actually effects the things you really care about which happen later.
Posted by Tim Trefren 

Comments [0]

Mixpanel adds custom graphs

Our goal at Mixpanel is to display the data you send us in a way that makes it easy to understand.  This can be a real challenge when you have many different events on the same graph, so we've opted to only show you the most important ones - a maximum of 9 things per graph.

However, this means that your less common events don't show up on overview graphs.  To fix this, we've just introduced an 'Advanced' section at the top of both event and property overview pages.  Here you can select the specific events you would like to compare:

When you hit the 'Compare' button, you'll see graphs for only the selected events, like so:

One more thing I'd like to point out are the explanations we've added to each graph.  If you see a graph or chart that confuses you, mouse over the 'what's this?' link next to the title. 


Posted by Tim Trefren 

Comments [1]

Mixpanel partners with Rackspace

We're excited to announce a partnership with Rackspace, as part of their new initiative to promote quality services.  This initiative includes a few other Y Combinator companies like Olark and Cloudkick. As a partner, we have a featured application listing at http://tools.rackspacecloud.com so that other Rackspace users can find out about Mixpanel.

This is just the latest example of how helpful Rackspace has been to us.  We've had a great experience with the online support, as well as personal attention from Rackspace staff via the phone whenever we've needed it.  When you add in the great deal they gave us on servers, you get a very happy startup.
Posted by Tim Trefren 

Comments [0]

Mixpanel + Ruby on Rails = Wonderful

Last week Patrick McKenzie of http://www.bingocardcreator.com did a great writeup on using Mixpanel with Ruby on Rails - you should take a look!

http://www.bingocardcreator.com/articles/tracking-with-mixpanel.htm

There are a couple of choice bits about analytics in general as well:

Why You Should Use Analytics

The fundamental reason you want to use analytics is because it lets you know how your customers interact with your site and that this drives decisionmaking about your site design, future business directions, and the like.

You might say "Wait, why don't I just talk to customers?" You should talk to your customers, but customers:
  • have more important things to do than talk to you
  • are not experts about your site
  • misremember things
  • resent being tested on like rats in a twisted science experiment ("Would you hit this bar for cheese more if it was green, or blue?")
Analytics has none of these problems. The data you collect:
  • is always there, waiting for your analysis
  • is totally expert on use of your site
  • is as accurate as your collection method
  • has no issue with answering arbitrary, inane questions
It's fantastic to see people using analytics to drive their business forward.
Filed under  //   Rails   Ruby  
Posted by Tim Trefren 

Comments [0]

Introducing Super Properties - Analytics

Super Properties have been available for Mixpanel for a few weeks now, but not everyone knows that they exist or the true value super properties can provide for people who use Mixpanel.

Quick description

On Mixpanel, when you track an event, you are allowed to have properties attached to that event. So if a user is playing a song, you may want to know what type of song, maybe where that song was played from, and what artist so you can visualize and understand more about your users. Properties describe events.

There are properties that you want to attach to all events, such as gender. Super properties are just global properties you can set across all events so you do not have to tediously include them with everything you log. Super properties are available for our Javascript library and soon our Facebook version as well. For information, we encourage you to read the documentation we have available.

Case 1: Tracking groups

To make your life easier, we allow you to track global variables such as gender, a user type, logged/not logged in. It's really dead-simple:

mpmetrics.register({"gender": "male", "session" : "logged in"}, "events");

When you view your report you'll be able to see the segmentation of male vs female users that interact with all events across your entire website. This is very useful because you get to see how a group of users whether they are male/female, logged in/not logged in respond in certain ways and how they compare.

Tracking groups can be very helpful, you may want to just track how a certain group of users who potentially purchase gold interact with your application for instance versus those who do not. Super properties can help you realize that you have different types of users you may need to optimize for and think about while building new features.

Case 2: Experimentation

Super properties actually encourage experimentation across your application. Imagine for a moment that you want to test a white background against a black background. When you view the report pages, you'll be see how different color backgrounds effect engagement across your entire application, not just one specific event or type of conversion. It is extremely valuable to do macro level A/B testing rather than focus on micro-level characteristics (e.g. Does this one orange button increase conversions)

If you had a music website, you might be surprised to see that a different color background makes people play more songs but decreases the amount of revenue you make, while another color does the exact opposite. The end result helps make the right decision for what you're building.

Case 3: Origin tracking

When building your application it is extremely important to understand where users are coming from because that origin may be vital towards your growth. Knowing where your users are coming from is only half the battle, with super properties you can actually find out how a point of origin effects the overall experience of a user.

One of our most useful tools happens to be Funnel Analysis, funnel analysis allows you to see how users drop off at each step of your flow. With super properties, you could essentially register the origin at step 1 and see which origin converts the best at the end of a funnel.

As an example, imagine you are building a Facebook application. Facebook provides numerous ways to funnel in users: invites, notifications, news feed items, cross promotion/advertising but which one performs the best for your application? Which one should you focus on? Super Properties will be able to show you exactly that information.

Filed under  //   analytics   experimenting   funnel   metrics   mixpanel  
Posted by Suhail Doshi 

Comments [1]

Analytics: not just for optimization

When we pitch Mixpanel to people, a lot of them tell us that they're busy working on their core product, and that they're not at an optimization stage yet.  I'd like to point out how valuable analytics data can be for learning about your customers - something that is crucial to product development.

A couple of really valuable aspects are

  1. No selection bias
  2. Understanding feature use

   
Selection bias

Selection bias often occurs when companies ask customers for information.  The customers with the strongest opinions are most vocal, and skew the dataset.  This means that the data you get back from surveys may not actually be a valid representation of your customers.

A great thing about automated analytics is that there is no selection bias.  You track what EVERYONE is doing, so there's no way to get only a subset of opinions.  That means you can trust the analytics data you gather a bit more than the feedback you get from talking to users.

Feature use

As a startup, we spend a lot of time cranking out new features.  However, we can't afford to spend too much time working on something before we know it works.  This means we push out new stuff way before we're entirely happy with it - but it lets us start getting actionable feedback immediately.

This feedback comes in the form of data.  We can instantly see if the new feature is getting use or getting ignored.  If it's getting use, we see what aspects of it are most popular and we can focus development on those. 

If it's getting ignored, that is just as telling. A new feature that no one wants is useless, and we either lower its priority or scrap it entirely.

We heard a real-life example of this from one of our users the other day. Joey Liaw of Voxli (YC W09) is using Mixpanel, and he posted this to friendfeed:

 

Top three push to talk bindings for our users this week: 16% use Left Control, 11% use Middle Mouse Button, and 10% use Tilde. I put mouse support in because David A. asked for it, but I thought he'd be the only person using it. Glad I was wrong. Would be interesting to correlate this against what apps users run, or their Arena ranking.


He only knows this because he started tracking it.  It sounds obvious, but so many people are flying blind - they release new things and have no idea what happens next.

I'm sure you can think of times in the past when you added something to your product and never knew if it was getting any use - what were they?

Filed under  //   analytics   optimization  
Posted by Tim Trefren 

Comments [1]