Google analytics

Google analytics is a most famous and most used analytics tool for websites on the internet. This analytics tool is natively implemented in GameArter gameplayer and SDK.

  • Free to use within generous limits
  • complex and accurate visit tracking
  • intelligence helping to reveal changes / trends

This article is written with regards to use it for tracking games running in a browser (WebGL, HTML5)

Get tracking id for placing to GameArter gameplayer

  • Sign in to Your Google analytics account
  • Go to Admin section
  • Select an account and select / create required property
  • Tracking id is available in Tracking info/Tracking code. Tracking id has form UA-XXXXXXXX-X
  • Did not find it? Check Google guide.
  • Copy this tracking id and insert it to GameArter project, tab Basic settings.

After few minutes, you should see first data in the analytics.

Guide & explanations

1. GamePlayer Analytics

Google analytics tracks wilde spectrum of website events fully automatically. Final processed results are available in a Google analytics page devided into logic sections. The great thing is the option to look at the data in a global space as well as very closely on the level of one user. Filtration options help much as well. If you would like to dive into all possibilities, you can learn about all the functions and options in free course provided by Google itself - Google analytics academy. On this webpage, we will show you only basic pages for quick orientation.

1.1 Sections explanation:

Real time reports provide insight to real time events in your app.
Audience reports provide insight into characteristics of your users.
Acquisition reports provide information on how visitors arrived your game.
Behavior reports provide detailed informations of user behavior.

1.2 Segments

Segments is a useful tool for segmentation of your audience. Following example is showing how to create a segment for every game - for possibility to watch analytics of every game separately in a case that you are using same analytics for more games. Using one analytics for all games followed by separating games via segments has the adventage, that you have a comprehensive overview above all your games in one place. Also you can analyze whether users play more your games or only one.

For separating individual games into own segments, follow these steps:
Audience -> Overview -> + Add Segment -> + New Segment -> Advanced Conditions -> Sessions -> Page Title -> the name of your game (just start typing and name will automatically fill) -> Save. Now you can find this segment in custom when you add a segment.

Googleanalytics segments

If you watch certain analytics requiring complex filtrations (e.g. analytics of users with certain property), segments do a big sense here as well, because once you will set them one time, you can use them anytime you want in any analytics.

2. Basic in-game analytics

GameArter SDK supports event tracking option. Via this feature you can send any information you want to analytics in a form of an event. For bigger simplicity, GameArter SDk allows to activate also automatical tracking and sending of basic events as e.g. scene changes to analytics completely automatically. See more in the implementation documentation of selected SDK.

List of attributes you can send to analytics:

  • string action (required)
  • string category (optional. Game name by default)
  • string label (optional)
  • int value (optional)

Practice example

Let's look at how we work with these attributes in practice and what data we get.
Let's say one of your games is about cars and you will want to see how the user alternates these cars and how long they spend in each of them.

string action will be the name of the action we want to measure. In this case "Change Car".
string category is game name by default. We will rewrite it to "Cars".
string label will keep name of the individual car. For example: "Lambo", "Camaro", "M3".
int value will keep time which a user spent with the car.

So the structure would look like this:


// Garter.I.AnalyticsEvent(string action, string category, string label, int value); // rule (Unity SDK)
Garter.I.AnalyticsEvent("Change car","Cars", "Name of the previous Car","value-mitunes-of-previous-car-activity");


Important Logic: To make it simple to read and analyse in the analytics, we should do following:
1) Sending the event action "Change car" on change car event. Attach data of the previous car.
2) Send the data only if a user spent or achieved minimum time/speed with the car (= eliminates spam during switching between more cars - send the data only if a user really used the car)

Watching the events

Two places where you will find event data:
1) real time reports section
2) Behavior/Events reports section

If you are interested to understand options, check event tracking documentation.

Is not Google analytics sufficient for your needs? Check example of other analytics tools you can use.

Is anything unclear in the article or does something miss there? Let us know.