12.17.2015

Leveraging Analytics in Your Games

By Josh Caratelli Director & Gameplay Programmer Double Mercury Entertainment

Analytics and game metrics are hugely important in making data driven decisions to give your game the best possible chance of success. Although analytics doesn’t and shouldn’t account for all development and business decisions, it is essential when deciding where to go next.

Unreal Engine 4 provides a fantastic suite of options to help you track your players' data, ranging from Blueprint to C++ implementations – and it doesn’t take very long to set up! Plenty of documentation is already available here and Joe’s earlier post here for providers Apsalar and Flurry for mobile. Implementing other providers or rolling your own isn’t too much work either if you’re code savvy or if you know someone who is.

This guest blog post, however, is going to cover some of the extras up you might have missed when setting it all up and some tips and tricks which have been passed down to me that I’ve found super useful to put you on track on becoming an analytics champion!

Refresher and double check your setup

For some providers such as Apsalar which unlike Flurry doesn’t have real time analytics, it usually takes around a day for the metrics to show up on the dashboard. So it’s worth saving yourself the headache and double checking you have everything setup properly.

Note: Although Apsalar doesn’t support real time analytics, you can test whether it’s working via the Event Tracking Console. Download the app named ‘The Identifiers’ from the App Store to get your IDFA code.

After you’ve registered on the appropriate websites, double check you’ve correctly entered your API and Secret keys into your DefaultEngine.ini file. If these keys are incorrect your data will NOT be tracked even though everything looks fine! Also make sure that you both start and end a session, as some providers won’t upload analytics until the session has ended and there can be issues (not always) with event tracking if the session ends prematurely. 

If you’re going to go the Blueprint route, there are over 20 Blueprint nodes for you to utilize to track your data ranging from basic events to player demographics. If you can’t see these, double check you’ve enabled the appropriate provider plugins in the editor.

Blueprints

Finally, a common mistake is not deploying the game to your mobile device to test analytics. Most mobile analytics providers will only track data from iOS/Android devices. 

Becoming an analytics champion – multicast, tips and tricks

Sometimes it’s difficult to pick and choose which analytics provider you want to use; they all have their own individual areas of strength. One of the very cool features which Unreal Engine 4 supports is the ability to use a multicast provider to send analytics events to multiple providers. This means you can get the best of both worlds, I’ve personally found that Apsalar does better event tracking while Flurry handles retention metrics better. Multicast is very easy to setup and extremely beneficial, you can see its documentation here.

Plugin

If you’re implementing analytics in C++ there are a few different things you can do to make your coding life more readable and a bit easier. Getting a reference to the analytics provider is always a good start along with using a ternary operator when you can to avoid a large, unruly control statement.

In terms of data collection you can actually ‘LOD’ your analytics with groups. This means you can easily turn off groups of events once you have your data. It’s important not to track everything (as tempting as it may be) because you’ll end up with lots of data that is interesting but not actionable. 

Joe Graf recommends that “If you can't make a change to the game in order to make an event go in the direction you want, then it's probably not worth recording...unless it's for longer term research needs.” It pays to keep that in mind when thinking about what data you’re going to track. 

IAnalyticsProvider &Analytics = FEngineAnalytics::GetProvider();

Analytics.RecordEvent(bOverheated ?
TEXT("Game.Player.DiedWhileOverheating") :
TEXT("Game.Player.Died"));
if (AnalyticsLOD == METRICS_UI)
{
Analytics.RecordEvent(TEXT("UI.MainMenu.Start"));
}

When deciding what to track for my latest Unreal Engine mobile title Smog Game, we have found the best way is to begin with a set of hypotheses and then used the resulting collected data to prove or disprove these. For example while playing Smog Game you can collect one of two power-ups, a X2 Score or Slomo.

Chart

Prior to launch we expected the data to show roughly a fifty-fifty split between the uses of the two power-ups. Surprisingly the data showed us that players were letting the Slomo power-up disappear at twice the rate of the X2 power-up! From combining this with other metrics and qualitative data we were able to determine that players found the Slomo wasn’t useful early on in the game.

Had we not been using analytics in the game we might have updated the game mechanics with completely wrong assumptions and had a negative user experience as a result. 

We’ve also found that tracking UI flow using ‘funnels’, a visual way to measure how players move through a series of events, and having separate testing and development accounts to ensure testing doesn’t pollute your data (as you can’t delete data points) are good practices to follow. This should give you enough to get started on becoming an analytics champion inside Unreal!

If you have any further questions ping me at @josh_caratelli on Twitter or comment below.

Recent Posts

Holospark’s Earthfall Brings Innovation to the Co-op Shooter Genre

Seattle-based indie developer Holospark brings the Pacific Northwest to lif...

Unreal Engine Drives Monster Puppet for The Mill and Monster.com

Award-winning studio The Mill needed to produce several animation spots fea...

Drive Studio Uses Unreal to Score Big for FOX Sports’ 2018 FIFA World Cup Broadcast

Drive Studio leveraged the power of Unreal Engine to design the environment...