Let’s look at what Google Analytics can do for us. Below we can see in one of my apps I have used it to help data mine many types of data and that’s what we will be looking at throughout the data given from Google Analytics.
So during the testing phase of my “One Button Game” / to the moon / crash tap / pod dash / new name yet to come,
Google Analytics now some of the common data that we can find:
- What the users are playing on
- The device brand and model
- Screen resolutions
- Operating systems
- Play session types
- Play events captured
- Play session length
This information is useful to designers, programmers, UI designers and data analysis. As all this information can be used for debugging, better design strategies, and examine user behaviors and player pattern interactions.
So why would you use Google Analytics?
Google Analytics provides three important parts that you won’t have to source yourself.
- A complete tool for tracking tool with a powerful dashboard and a API for developers and programmers.
- Can be used to source game analytics rather than relying on 3rd party companies and outsourcing data analysis, reducing costs and complexity.
- A freely available working plugin for they Unity Game Engine.
So now that I found, Google Analytics, it has possibly saved me hours as I have not needed to build my own solutions or asking users after they playthrough testing, feedback forms, as it is now handled by the plugin now.
Let us take a peak at the events overview and explain a few things.
During November the first batch of testing came through during this stage I was only capturing “Gameplay” as displayed we can see their was about 100 gameplay sessions ran.
This includes restarts without the event action stating it.
At this point I realized how powerful the tool was and began adding the event action flags. During the second phase was the biggest amount of data and events.
So I captured how many times it was played, restarted if they went in the garage, if they payed for the garage and if they tried to pay but didn’t have enough credits.
Above we can see the Operating systems, networks, devices, Screen resolutions, Branding.
So how is this data useful what are we using this for and why?
So this data here can be used by our programmer to gather how well the app ran on devices and this would be feed back to the designer through feedback forms and other methods.
Next would be Screen Resolutions this would be feed to the UI designer and designer to ensure and view how the user may have seen that game at select resolutions.
How to setup Google Analytics
First steps to installing
- Download the Google Analytics plugin for Unity.
- Create a Google Analytics property and a view profile.
- Import the the unity package if you have not done so already.
- If your project does not already have a file called AndroidManifest.xml in the <YOUR PROJECT ROOT>/Assets/Plugins/Android/directory, build the project for Android and then copy the AndroidManifest.xml from the Temp/StagingArea/ directory (it will be under the directory you chose to build in). Paste it into <YOUR PROJECT ROOT>/Assets/Plugins/Android/.
- Add the following permissions to the AndroidManifest.xml in <YOUR PROJECT ROOT> /Assets/Plugins/Android/ above the application tag:
- If you want to enable Campaign Tracking, add the service as follows:
- Now to configure the GAv3 prefab in Unity, add the prefab GAv3 to the scene.
- Click on the GAv3.prefab prefab object, which can be found in Assets/Plugins/GoogleAnalyticsV3 in the Project View.
- The Inspector view will display a Script component attached to the prefab with several properties listed. Populate these properties with the correct values for your project. This will populate the object so that it can be used everywhere in your project. For example:
Android Property ID: UA-XXXXXXX-1
iOS Property ID: UA-XXXXXXX-2
Other Property ID: UA-XXXXXXX-3
App Name: MyGame
Bundle ID: com.example.games
App Version: 1.0
Dispatch Period: 5
Sample Frequency: 100
Debug Mode: VERBOSE
Anonymize IP: false
Dry Run: false
Start Tracking Objects and Events
After configuring the GAv3 Prefab we can start tracking objects and events.
- On the script that handles the events you want tracked add
public GoogleAnalyticsV3 googleAnalytics;
- Save the script and attach the GAv3 in the inspector to the script variable.
- Now back to the script you want to add trackable events.
- So using the API Refrence you can learn about all the many types of trackable methods but just below I have included a example how I used it.
So overall after using Google Analytics I would not go back or to other sources though I am yet to try Unity Analytics I still feel better with Googles, It is just seamless and has no impact on the game and its components.
I would recommend using it on a upcoming project and just trial it ensure you track as much events as possible and the data will just start come flowing in for you saving you countless hours of extra work.