Setting up Analytics in Unity

When you want to learn how users are using your app, setting up analytics is extremely easy to do and will provide you with all the pertinent info you’ll ever need:

First of all, go to Windows/General/Services and it will bring up the services panel. Analytics is immediately visible.

Press Analytics, it will bring up a new window where you can turn it on.

We’re also given a message to press play to complete integration so go ahead and do that.

After pressing play, you should see the option to open the dashboard in the popup window.

Pressing it will take you to your analytics webpage

And you’re all set up! From here, you can create events to track.

Scripts used to be automatically installed, but after Unity 2017, you’ll have to manually download the sdk.

Or you can simply install the library via your package manager.

So let’s say we want to keep track of how many times our submit case button has been pressed. Go to the submit button and attach an analytics event tracker.

Since we want to track a button, we select UI, it tells us to connect the button to the scripts trigger event

Just add a new onClick event to the button, drag the button in the script slot, and then analytics/trigger() and you’re all set to track the button!

This is just a quick and simple introduction to analytics, for more information, check out Unitys documentation.

cartoonist, game artist, and wanabe gamedev.