You can access the full course here: Data-Driven Development with Unity Analytics
Transcript Part 1
Hey guys, my name is Austin Gregory and in this course we’re gonna cover Unity Analytics, which is a free service provided by Unity that allows us to track and manage player progression through our game, as well as acquisition to see when we’re picking up new players, where we’re losing players, what kind of retention we’re having, where players are finding difficulties in our games, tweaks to make the experience a bit more smooth for our players.
So in this course, we’re gonna first create a simple little demo that’s just gonna be a few buttons on the screen that allows us to send out these events that the analytics service requires to build the metrics that we’re going to use. So very simple start. Then we’re gonna set up the analytics service itself inside of the editor, which is also a very simple thing to do, and then we’re gonna look at the core events that Unity sends for us. These are events that Unity handles for us. Then we’re gonna look at sending out standard events which are events that Unity has defined for us, but we get to decide when they fire off. So we can use this to track player progression through certain levels, for example. We’re also gonna track some simple in-app purchase events.
We’re gonna send some dummy data to the service that say hey, somebody bought something, just to see how that looks in the dashboard. And then we’re gonna set up and talk about funnels. Funnels are quite powerful and maybe the most powerful tool you will use from this course. And then we’re gonna take all of that that we’ve learned and talk about the individual metrics that we will need to understand to make meaningful changes to our game.
So my name is Austin Gregory and I will see you in the first lesson.
Transcript Part 2
Hey, guys, welcome back. In this first lesson, we’re gonna set up a quick demo that we’re going to use to interact with our analytic events. We need some way to fire off the events, some way to actually send these things to the service. So we’re going to use a simple little demo.
It’s just going to be some UI buttons that we can click and do something that would kind of mock what a game would do. So we’re gonna have buttons that actually act like they’re purchasing something from like an in-app purchase store. We’re gonna have buttons for loading and completing levels. We may end up killing player and seeing what that can do for our game-over, maybe. Maybe, we have an event for the game ending.
And we’re also going to have like leveling and stuff like that, and then we can send an event every time a milestone is reached. So every time you reach five levels, or 10 levels, we’ll send that event. You don’t wanna go too heavy on the data that you’re sending, because you’re going to have to use this data for something later on to actually make meaningful changes to your game or to see how people are interacting with your game. So if you have too much data, you can really kinda go crazy with that. So we’re going to keep it very simple and just go over the basics and talk about what we can do with analytics in Unity.
So in Unity Hub, I’m gonna create a new project just by clicking New Project and I wanna call it Unity Analytics. And I’m gonna use the latest version I have, which is 2019.1.0b9. It’s the beta for that. And I’m just gonna select 2D because we need to keep it very simple, and just Create Project.
Once our project loads, I’m gonna go up to Layout and go to Default to make sure we’re all on the same layout here. And I’m also going to change my game aspect ratio to be 16:9, just so I know what I’m working with when I’m laying out my simple little UI here. Because we’re gonna do very basic UI stuff and I want to make it restricted to a 16:9 screen. So I’m going to create a UI panel to hold a few buttons. So just create UI panel. Double-click on that to center it in my frame here. And this is just going to be kind of like our main buttons here.
And then, off to the right here, we’ll have out in-app purchase mock buttons that will send in-app purchase events to our analytics service. So no background and we’ll change the color to be whatever you’d like. And now, inside of this panel, I’m gonna have a grid of buttons. So I’m gonna Add Component, Grid Layout Group. And they’re gonna be about 300X75. Some spacing all around. Padding all around the panel. And I want these to be centered right in the middle.
Now, with that inside the panel, we’re gonna create some more buttons here. And now, we can actually create a button that already has TextMesh Pro text in it, which is what we want to do. We don’t have to create a button, and then, remove the text and add it and all that stuff. Import TMP Essentials so we can use the nice text engine, TextMesh Pro.
Let’s grab this color here and we’ll make this a lighter version of the background. And take the text and make it kind of like a cool gold color. Bold, a little underlay, maybe. And this will say Load Next Level. So we’re gonna be able to load a level then complete a level. So we’re gonna be kind of mimicking how you play a game. Load level, complete level. Load level, complete level. And we’re gonna have a set number of levels, maybe, that you have to complete. And then, we’re going to send all this data to our Unity Analytics service so we can see what levels people are struggling with, where they are stopping, and trying to decide what changes we have to make to get them back into the game to continue and complete the levels that they stopped on.
Or, at least, to get people in the future to continue those levels so we don’t have people dropping off on certain levels. And then, CTRL + D to Duplicate. Complete Level. Kill Player. Level-up one. And then, I’ll just add a simple text element to the top here. Game Events. Bold and center it horizontally and vertically. And we can keep going with these but this is gonna be enough for me to test these events. And then, I want to have another panel over here for in-app purchases. So I’m just gonna take this and duplicate it, and then, just scale it down, move it over just like that.
And, in fact, we could probably do with a little extra space here. 100 Lives, $100. Very cheap. A dollar every time you die. And then, change the background color of this panel. Something like that. Store. And this is going to be the demo that we’re gonna be using to interact with our analytic events to fire off these mock game events so that we can actually track what’s happening in a, quote-unquote, game.
So in the next lesson, we’re going to get started by actually setting up our analytics and Unity itself. My name is Austin, and I will see you there.
Transcript Part 3
Hey guys, welcome back. In this lesson we’re going to set up our Analytics Service in Unity. It’s very simple to do, just a couple of button clicks. And then we’re gonna check out the online dashboard, where we’re going to actually view all of the data that we are sending to the service.
So back in Unity, I’m gonna go up to Window, go down to General and go over to Services. Now this is where you can play with all the services you have for your game or for your project. But in this case, I’m simply going to use that Analytics Service. Now I have a few organizations setup on my account. You probably just have the one at this point, but if you have multiple, just choose the one you want the project to be under.
If you don’t have an organization showing here, you can go to your account and add an organization from the online dashboard, which I’ll show you here in a second. So I’m just gonna use and click create. Now we have a bunch of services, but I care about the analytics and the analytics only for this, so I’m gonna click on Analytics and I’m going to enable Analytics. Mine is not just for young children, so I’m gonna click Continue. Now what is this saying to do? Whenever you click play, it will send the first set of events to the service, kind of syncing it up, so it knows. Okay, I got the project, we’re all hooked up.
So I click play and now whenever I click stop. Now if it doesn’t work immediately for you and show you what you just did in the services tab here, you can try going to the dashboard and coming back in and seeing if that will change, update your events over here for you. If not you may want to, go outta the editor and come back in or reload the services tab. Just try that a couple of different times until you get this validator showing you, okay this is what I did. So it’s showing you, this is when this app started, this is the app running, and these are the core events that Unity is sending out for us that we don’t have to handle.
We don’t have to tell the service, hey this is my app starting, hey this is my app running, this is how long it’s running for, this is my app stopping and all that stuff. It handles all of the base events like that for us, which is great because we do want that information. We wanna know when people come back and play. We wanna know when people stop playing, how long they played for, and it handles all that by default, which is great. So now if we go to the dashboard, you’re gonna see a whole lot of nothing here, because it’s gonna take a while to populate the dashboard with the data that you’re sending.
So what we’re gonna do is we’re gonna do some stuff with our events over the next couple of lessons, and then we’re gonna look at another project I have that I’ve already set up for this purpose that’s already been populated. Took a couple days to get everything populated, but it’s all there now. So we’re gonna be able to see the data there.
It’s gonna be a very similar setup to what we are gonna make in this course, so it’s going to look very familiar. But if I go to event manager, we can see that our validator is visible here as well, the same thing that we’re seeing in our editor. So it is working, everything’s working good, it’s just gonna take a while for this to do anything for us in our actual analytics here.
But we have everything set up and we are ready to start working with our analytics. So in the next lesson we’re gonna have a quick overview of the basic core events. My name is Austin and I will see you there.