Analytics Custom Events- App Dev Series 15

Objective: using Unity Analytics to track the app usage data from users.

When published a guiding app, you must be so desperate to know what option of your app is that users selected the most.
We can use Unity Analytics to analysis the usage of our app.

Enable Analytics

To start using Analytics, click Windows from drop down menu of Unity, then select Services.
It would open Services window tab besides Inspector.
Then select Analytics and enable it.

So simple to be ready to use this service.

Custom Event

Now we need to create a function under Analytics called Custom Event.
First we need to create a script.
As I would like to analysis the data of button clicking on different animals, I would create a public method to it.

Inside this method, we would use AnalyticsEvent.Custom to track the data on button clicking.
We need to give this event a name, and event data by using Dictionary.

Let’s tracking the separate buttons by their name, and keep a time parameter to track how long does user click that button since app started.

After done setting this button-clicking event, we can add a AnalyticsResult to track down the status of using Analytics.

Finished setting! Let’s back to editor and test this out.

Analytics result on Dashboard

Back to editor, assign the script to the button or any object you would like to call the analytics.

Once you play the app and click or call the method, it should show the result of analytics in the Console.

And we can go to the Dashboard of our app to see the analytics data.
However it would need to take hours to reveal in Dashboard, you should check it later.




A passionate gamer whose goal is to work in video game development.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Shared Code at Quizlet

Introducing FalconPool — A layer 2 fundraising protocol

MongoDriver.Facade makes it easy for you to work with MongoDb.

C program for Text Compression using Huffman Coding

Important Version Upgrade

How to Generate a static site using pelican.

Going Global and Beyond Serverless With Akamai CDN

Didn’t work for me in M0 cluster

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
S.J. Jason Liu

S.J. Jason Liu

A passionate gamer whose goal is to work in video game development.

More from Medium

Git, Gitlab, Gitflow: Time and space travelling’s traffic laws

Daily Progression: UI Manager Setup!

TDD: Saver or Blocker?

Configuring Appium for MAC