Unity3d Analytics - What it really takes to get analytics setup

Unity3d Analytics - What it really takes to get analytics setup

Is funny fact but I really didn’t considered using in game analytics one week prior to releasing Stickman World to the App Store, and honestly I had thoughts during my initial development phases but what crossed my mind was that it was just going to just add development time and it was never a priority.

After further research about Unity, It turns out that analytics are part of Unity Services which was first introduced for Unity 4.6 - 5.1 as an asset in the asset store and fully integrated with Unity 5.2+ in which Unity Analytics, Unity Cloud Build, Unity Ads, and other(s) are now available to use in your games.

The real question here was how long was it going to take me to get Unity Analytics integrated? well it honestly surprised me that I was able to add analytics to Stickman World in just minutes, however I did not add custom events initially or add every single little thing they offered but as MVP for release date all I wanted to do was track user usage in order to answer questions such as:


  • How many active players do I have in the game?
  • How many sessions daily vs weekly vs monthly?
  • User retention? Are players coming back?
  • Custom events, maybe I want to know percentage of users playing the tutorial level?
  • Revenue, etc…


To understand what it took let me walk you through the steps to enable Unity Analytics as well as creating a custom event:


  1. First you must enable Unity Analytics by opening Unity -> Window -> Unity Services then just provide your organization and project name which is what will show in the Unity Services portal when you review game analytics.
  2. Once you setup Unity Services - click on the Services tab and enable analytics.
  3. Validate that analytics in your game are reporting by just playing your game within the Unity editor and then go to the Unity Services portal to validate and make sure everything is setup correctly. For further documentation on this process you can look at the Unity Manual


What I just covered which was just 3 steps is mainly all you need and will set you up with analytics. Now if you want to create custom events to track additional information, for instance if you wanted to track how many people have completed your tutorial level you could do something like this in your code.


// This is just meant to demonstrate this feature

// or if you want to pass additional information
    Analytics.CustomEvent(“tutorialCompleted”, new Dictionary<string, object>
        { “enemiesKilled”, totalEnemiesKilled },
        { "coins", totalCoins }


Thank you for your time and don't forget to subscribe to my newsletter, also be sure to find me at @dilmerv and stop by and say hi as I love to chat with everyone.

Pingbacks are closed.