Mixpanel tracking for ROBLOX

'Sup guys?

If there’s one thing that I’ve learned interning at Roblox for the past couple of weeks, it’s that data is extremely important to collect. One of my side projects was to create a system that allowed me to answer the questions I had about my games, like “Where are players dying?”, “How many players are (not) getting through the tutorial?” and even “What is the average solve time of this puzzle?” Enter: Mixpanel. It’s data analysis software which tracks events and user engagements. Typically, this is used on a website using JavaScript or an Android/iOS application. I decided to implement it on Roblox.

What kinds of questions could possibly be answered? Well…

  • Where are players falling off the map in my obstacle course?
  • What types of guns are players using in my FPS?
  • How much damage does a new player do in one lifetime in my FPS, compared to an old player?
  • What maps do players vote on the most in my round-based game?
  • How many rounds of my dodgeball game are happening per hour? How long do they last?
  • Are players buying products from me more often with shop design A or shop design B?

What tracking can it do out-of-the-box?

  • Server starts/closes
  • Visits/leaves and session times
  • Spawns/deaths, and positional data
  • Purchases
  • Player locations (using zones you define, the void y<-250 is defined by default)

What’s the API like?

The API for tracking your own stuff is as simple as a couple lines of code. Here’s sending one event associated with a server:

MixpanelStandard.track("Round started") MixpanelStandard.trackPlayer(player, "Pressed button") MixpanelStandard.trackPlayer(player, "Bought item", { ["Item name"] = "Cool sword", ["Item price"] = 200 })

Sample graphs

Here’s a couple of things Mixpanel can show you. This is data I’ve collected using Mixpanel in Mirror Muse, my accelerator project:




Note on the user location profiling: It’s using IP addresses of Roblox’s game servers to determine location. This is inaccurate data and because we don’t have players’ IP addresses, we cannot track player locations. Ignore it.

Bonus graph: Here’s a pie chart of the number of deaths for each punch type in my side project, Fisticuffs:

What’s the catch?

You can’t track everything. You have a limited number of data points for use with your Mixpanel account (25,000/mo, increased to 200,000/mo if you put their logo on your website). This should be plenty for small-ish games depending on what you’re tracking. It costs $150 for 500,000 data points per month and that is the lowest tier (at the time of this posting). Mixpanel have excellent support staff and are more than happy to help you figure out what kind of data you want to track. I’ve spoken with their support staff a number of times. If you’re making more than $1,000 a month from your game, it is definitely a worthwhile investment.

When you try out the tracking code, you’ll want to disable some of the included tracking scripts that aren’t relevant to your game. These are described in the README. Mixpanel recommends to start small, so start with Server starts/closes, Visits, and maybe one custom event like rounds.

I want to play with this!

Some other notes

The conclusions that can be drawn from data you collect in your game can be insanely useful for making effective updates to your game. Being able to see when players are leaving your game is a very valuable tool. If you’re losing 10% of your players in the first 10 minutes of play, that could mean the difference between a front-page game and a flop. So should you try Mixpanel?

1/17/2016 Update:

I’ve made the following improvements to the library after having used Mixpanel for longer.

19 Likes

So this is basically a better version of Google Analytics? Cool, I like it.

Will definitely use this when I decide to make another game.

Not better, just different. Google Analytics is more suited for web. Mixpanel is designed specifically to gauge user interaction with a product. As game developers, this is way more relevant to us. While it is possible to accomplish the same things like page views, this is definitely what you’ll want if you’re designing games.

@Ozzypig should tell them how you benefited from the info you gathered on your current project!

If only Roblox gave us a more integrated way to do this tracking. Great work @Ozzypig!

Not sure if @Ozzypig is sponsored or…

I like it though, might even use it later on.

Gunna bump this because I just updated the library. After using Mixpanel for a while now I’ve got a better idea of how to manage the data being sent over so limits aren’t hit nearly as quickly.

1 Like

I honestly really like Mixpanel, but I shy away from using it simply because of the data limits.
Now, obviously, I’m don’t expect them to provide more data for the free version. However, I’m not really all too interested in paying for additional data point limits.

EDIT: I’m also curious – how do you get them to verify that you put their logo on your website?

I agree, the data limits are pretty unforgiving for ROBLOX developers. I got a bit of leeway (read: a LOT) for making this library and telling them about it, plus I’ve already subscribed.

You paste in your URL, press some button, and it will check the homepage for the logo code.

I plan on setting up a module for Amazon Mobile Analytics soon. They provide 100 Million free requests every month and charge 1$ per million requests after hitting the limit. The only concern is that they require billing information on file to use their services.

I’ll be tracking slightly different data with my module and it will be interesting to see how the services compare.

Can the httpService make POST requests that have headers?

Nope

Well poop. I would have to setup a middleman to take ROBLOX requests and convert them into an acceptable format for Amazon Mobile Analytics. Crud. It’s possible but an unnecessary pain.