Reader small image

You're reading from  Unity 2022 Mobile Game Development - Third Edition

Product typeBook
Published inJun 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781804613726
Edition3rd Edition
Languages
Tools
Right arrow
Author (1)
John P. Doran
John P. Doran
author image
John P. Doran

John P. Doran is a passionate and seasoned Technical Game Designer, Software Engineer, and Author who is based in Incheon, South Korea. His passion for game development began at an early age. He later graduated from DigiPen Institute of Technology with a Bachelor of Science in Game Design. For over a decade, John has gained extensive hands-on expertise in game development working in various roles ranging from game designer to lead UI programmer working in teams consisting of just himself to over 70 people in student, mod, and professional game projects including working at LucasArts on Star Wars: 1313. Additionally, John has worked in game development education teaching in Singapore, South Korea, and the United States. To date, he has authored over 10 books pertaining to game development. John is currently a Technical Game Design Instructor at George Mason University Korea. Prior to his present ventures, he was an award-winning videographer.
Read more about John P. Doran

Right arrow

Using Unity Analytics

Making a game is a wonderful experience and a lot of hard work, but when designing projects, you have to rely on your experience and gut feelings in order to make it as awesome as possible. Often, in the game industry, we will use playtesting – a process where select people play a game and give feedback, and then we use the feedback we receive to improve the project.

This playtesting is most often done in person; however, by creating games for mobile, a lot of people will be playing your game after release, and most of them will have an internet connection. With this combination of people playing the game and also being online, we can send data about how the game is being played to ourselves. This will still allow us to do playtesting with a large variety of people. Being able to look at our data will allow us to check whether the choices that are made to change the game are the right ones, and we will be able to make adjustments to our games on the...

Technical requirements

This book utilizes Unity 2022.1.0b16 and Unity Hub 3.3.1, but the steps should work with minimal changes in future versions of the editor. If you would like to download the exact version used in this book, and there is a new version out, you can visit Unity’s download archive at https://unity3d.com/get-unity/download/archive. You can also find the system requirements for Unity at https://docs.unity3d.com/2022.1/Documentation/Manual/system-requirements.html in the Unity Editor system requirements section. To deploy your project, you will need an Android or iOS device.

You can find the code files present in this chapter on GitHub at https://github.com/PacktPublishing/Unity-2022-Mobile-Game-Development-3rd-Edition/tree/main/Chapter10.

Setting up Analytics

Although we activated the Analytics option from Unity Gaming Services in order to use Unity’s Ads system in Chapter 7 Advertising Using Unity Ads, we didn’t really dig deep into the system itself. Let’s finish the setup for that now using the following steps:

  1. To start, we need to install the Unity Analytics package in our project. We can do so by returning to the Unity Editor and opening the package manager, by going to Window | Package Manager.
  2. There is a bug with the version of Unity this book was written for, with the Analytics package not showing up by default; instead, Unity shows the legacy Analytics Library package. However, it is possible to add the new package by clicking on the + button at the top left and then selecting the Add Package by Name option. From there, type in com.unity.services.analytics. If all goes well, you should be able to see that the Analytics package has been installed correctly by checking the Package...

Tracking custom events

Unity Analytics does a number of different things automatically to make it easy to work with. However, as a game designer, you may often want to check whether certain aspects of a game are being used or whether players are reaching certain pieces of content. To keep track of this, we can make use of the custom events system.

Custom events are pieces of data that users send to the cloud as they play a game. Each custom event can have its own parameters, which will allow us to filter the data that we send when it is generated. We will discuss how you can send information over the cloud through the use of code.

Sending basic CustomEvents

The first kind of event we are going to send is just an event name. This can be used for something such as tracking the number of times people access a certain place or checking whether something invalid appears to be happening. To make it easy to trigger and track for testing purposes, we will cause an event to happen...

Working with funnels

One of the many things we’d like to know about our players is how they are actually playing a game – for instance, are users skipping our tutorial? To keep track of how players proceed through a series of events, we have funnels. Funnels help us to identify where player drop-off happens in our game.

If you happen to see a large number of people not getting to a certain step, you can assume that something that happened in the preceding step causes people to stop playing our game.

Note

For more information on how funnels work as well as why you’d want to use them, check out https://data36.com/funnel-analysis/.

Funnels are based on the concept of custom events, which we used in the Sending custom events with properties section of this chapter. We can use the Funnels tool (previously known as the Funnel Analyzer) to look at the data sent via these funnels, which we can then use to make educated decisions on what changes should be made...

Summary

In this chapter, we explored a number of ways that we can make use of Unity’s Analytics tool to make our games better, from how to understand what our players are doing to learning how to adjust our game based on that feedback, without users having to download an entirely new copy of our game.

Specifically, we learned how to set up the Unity Analytics section of the Unity Editor, and then we saw how we can make use of code to create events to be sent to the cloud for us to look at. With the given data, we learned how we could make use of funnels and the Funnel Analyzer to learn more about our players.

Now that we have seen how to create events, let’s see one of the other main benefits of utilizing Unity Gaming Services – being able to change projects using the Remote Config feature, which we will learn more about in the next chapter.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Unity 2022 Mobile Game Development - Third Edition
Published in: Jun 2023Publisher: PacktISBN-13: 9781804613726
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Author (1)

author image
John P. Doran

John P. Doran is a passionate and seasoned Technical Game Designer, Software Engineer, and Author who is based in Incheon, South Korea. His passion for game development began at an early age. He later graduated from DigiPen Institute of Technology with a Bachelor of Science in Game Design. For over a decade, John has gained extensive hands-on expertise in game development working in various roles ranging from game designer to lead UI programmer working in teams consisting of just himself to over 70 people in student, mod, and professional game projects including working at LucasArts on Star Wars: 1313. Additionally, John has worked in game development education teaching in Singapore, South Korea, and the United States. To date, he has authored over 10 books pertaining to game development. John is currently a Technical Game Design Instructor at George Mason University Korea. Prior to his present ventures, he was an award-winning videographer.
Read more about John P. Doran