Hey everybody! As announced a few weeks ago we want to give creators of interesting community projects the opportunity to present their exciting libraries or tools on the official blog. In this Community Showcase, MrStahlfelge is going to present his gdx-gameanalytics library!
gdx-gameanalytics is a library that enables you to see metrics and crash reports with a single service for all platforms covered by libgdx. It is GDPR-compliant and respects your player’s privacy, but will give you important insights how your game is doing. See here what it can do and why you should integrate it.
When my game first launched on Google Play, I was able to see the installation count and crash reports. But what I missed were some more insights: How long do the players play my game? Which setting options and input types do they use? How is the overall retention, how many of the users that played the game for the first time play it again the next day and the day after?
It was even worse on the other platforms: On iOS, crash reporting does not give you any information about the Java stack you need. On Amazon App Store, there isn’t even a crash reporting available. HTML5 versions published on itch or GameJolt don’t have an installation count, so you really don’t have an idea if players keep on playing the game or just try it for a single time.
An analytics service was needed, but I discarded the well-known Firebase Analytics powered by Google for many reasons: You need to integrate their SDK for every platform, which makes a lot of hassle on HTML5 and iOS due to the way libGDX works on these platforms. Moreover, their SDK is closed source and will leverage every information it can get its hands on about your users. In my opinion, Google already knows enough about all of us, and to be GDPR-conform you have to ask your users for consent to use Firebase Analytics.
Searching for an analytics service that can get fed without using an SDK, but only with some REST requests (which are easy to do cross-platform with libGDX), I came across Game Analytics and had a match. Although they really want to sell you to use their platform SDKs (which I am sure will send them all information they can get), the service also provides a well-hidden REST API to use and I implemented gdx-gameanalytics so every libGDX game can use this API!
While compared to Firebase, the analytics dashboards are not as sophisticated, they fulfill the task. Some of the missing information is due to the fact that your users really are anonymous: There is no gender or age information available from the information that is sent, and in my opinion that is a good thing.
So what’s to do to get your analytics running?
First, best is to watch the introduction video and read the GA documentation about the core concepts of analytics.
Second, set up a free account on gameanalytics and your game. GameAnalytics recommends to set up an own game entry for every platform. This is not needed, just use a single entry and use their filter feature if you need platform-dependant analysis.
Third, integrate gdx-gameanalytics into your game according to the readme. It is only a bunch of lines to add to your
create() method, and you’ll have your core metrics up and running. If you are in need of crash reporting, activate it by adding another single line for the JVM platforms.
When that is done, you should think about sending some custom metrics. The most important metrics to add are progression events and design events.
You should sent progression events when a player started, completed or failed a level (or chapter or game mode, depending on your type of game). This way, you can see which ones were played the most, and which ones are not completed.
Design events are completely free to define. I use the design events to see what option settings my players are using, or if the device they are using is touch-capable or not.
While this is some effort, you absolutely should add progression and design events to your game. They can give you valuable - and sometimes surprising - insights on how people are playing your game. Two examples: 20% of my Android players do not have a touch screen. Players fail in my most difficult “endboss” level in 95% of the tries, but the level is played the most frequently of all levels, even by players that already completed it before.
And now have fun integrating analytics and tweaking your game based on the insights it gives you!