How to use Google Analytics? (SOLVED)

Hi there!

We are going to release a free public demo of a little part of our game on itch.io. I would like to track the progress of the players: level X cleared with a score Y, level Z failed and so on.

I have no experience in this field. However it seems to me that I can use google analytics via @britzl extension. Am I right? If so, I read in the documentation that I have to add to the project the “analytics tracking ID”. But how can I get one such ID? Have I to create a new “property” in Google Analytics? If so, what Kind: (1) web (2) google apps or (3) apps and web?

I am sorry for the very basic questions…

Thanks as usual!

1 Like

Yes, you need some kind of analytics services. There are several to chose from. (Facebook also has analytics, but the game has to be Facebook connected obviously).

Google has two analytics services: Google Analytics and Firebase Analytics.

  1. Google Analytics is for web apps
  2. Firebase Analytics is for Android and iOS games and requires the Firebase Analytics service.

When you log in using a Google account at analytics.google.com you get the choices you mention above. If you chose to create a property for Apps you will be taken to the setup for Firebase and you need to enter things such as your applications package id etc.

My recommendation is that you create a Web property (and in the website URL field you can enter some bogus value). Once you have created the property you can see the tracking id (UA-1234567890-1) in the Tracking Code section of the settings panel.

1 Like

Thanks @britzl. Now it is clearer to me. I am going to try soon.

I have succeeded in using @britzl google analytics library.

I have set
Dispatch period: 120
Queue save period: 60
Verbose: 1

I see in the console that the library has sent 10 “hits to google analytics” and I am able to see that there is 1 user on google analytics when the game is running (on my mac). For the moment I am only sending screenviews with something similar to

ga.get_default_tracker().screenview(ga_screen_name).

However I am not able to see anything on google analytics. I guess I have to look at “behavioral flow” but no page view is registered, no events at all…

Any help?

I think there’s a delay before the data shows up. There’s a realtime view that will show some data in “realtime” though.

https://support.google.com/analytics/answer/1070983?hl=en

Thanks!

Yes, I was expecting some latency. But also realtime view shows nothing at all… strange…

You should be seeing something in the realtime view then. Weird. Try sending some events as well as page views.

1 Like

Events sent with

ga.get_default_tracker().event

are indeed shown in real time. I think I will stick with this kind of tracking.

Thanks for your support as usual!

1 Like