Google Analytics for Defold


Oh, thank you for reporting! I guess maybe I shouldn’t even bother setting a custom user agent when using HTML5…

1 Like


I’ve released version 1.3 of the library. The new version will not attempt to change the User-Agent on HTML5 builds since this is prevented by all modern browsers.



what kind of analytics should I use. Standard google analytics or firebase?

1 Like


Hmm, I dunno. For Defold you currently have three options:

  1. Defold analytics. This is super easy to setup and use but it doesn’t allow you to track in-game events and user interaction.
  2. Google Analytics. The full suite of Google Analytics at your fingertips. Personally I’m not very fond of their dashboard though. It’s super advanced but I find it hard to get the data in an easy to use format.
  3. Facebook Insights. Send tracking data using

The Firebase Analytics dashboard looks really nice, but unfortunately you’ll have to wait for Native Extensions and build your own extension to use it.



I’m asking this because then you create new property in the analytic dashboard it ask you which tracking method to use



Ah, I see. I believe you need to select Google Analytics in that case.

1 Like


There is no Google Analytics SKD in dashboard anymore when you’re creating new property :frowning:
Only Website and Firebase Analytics



Where specifically? I still get the Mobile App and Website options:



Mobile app has no “Google Analytics SKD” options now, Firebase only



But if create a new account then “Tracking ID” still available. Cool.



Tried to use britzl/defold-googleanalytics in project. Registered new analytics account, got Track ID number, sent events but nothing happing in GA. Google Analytics not register any requests. I guess they changed the algorithm for new account to Firebase. @britzl would you check the lib with a new account id? Also I asked @AGulev for check lib with his Id, he said that the lib works with old Id but not with new".



This is the important part. The Google Analytics Measurement Protocol is still very much a supported Google product. I would be surprised if it’s retired anytime soon.



still available, but not working for a new project. Just try to create a new account.



I just created a new account and a new Defold project and immediately see Real Time results in Google Analytics when using the Google Analytics for Defold library.

1 Like


sorry, it was a bit weird, I just looked GA dashboard today and all works fine! :confused:



I have issues with setting up GoogleAnalytics in my project, I tried to use different: created new Properties as web, as mobile, and as mobile-web. no see real-time updates… tested in Defold Editor, as web-build too. tried also to create via new account. zero result.

tracking ID is added to game.project settings.

[EDIT]: works now. thanks @AGulev , looks like I missed: ga.update() and need to wait some time to start working stats.

{EDIT2]: I found what I missed first time, be sure to send at least some statistics, for example: ga.get_default_tracker().screenview("menu") without it will no work.