Getting a good understanding of what your users are doing in your game and how often they come back to play can be critical to the success of a game. Defold provides key metrics such as daily users, installs and retention out of the box through the project dashboard. Additionally the Facebook SDK provides the facebook.post_event() function with which it is possible to create user funnels and drill down into user behaviour.
The above two solutions are often enough, but sometimes you want even more data. Perhaps you wish to track application crashes, load times or device specific metrics, in which case Google Analytics is a good choice. Google Analytics support in Defold has been requested both here on the forum and on Slack, but up until now there has been no implementation of the Google Analytics Measurement Protocol for Lua and Defold. With that in mind I decided to create an implementation that wraps the Google Analytics Measurement Protocol so that you guys can focus on making awesome games while quickly adding tracking in key parts of your game.
The implementation is provided as a Defold library project and it is available on GitHub: https://github.com/britzl/defold-googleanalytics