Matomo Analytics - Android SDK

Matomo Analytics Logo

Matomo (formerly known as Piwik) is an open-source analytics platform. Basically like Google Analytics, just not Google Analytics. Most importantly it can be self-hosted.

I was looking for a privacy friendly way to get more insights into SD Maids user base out-side of Google Play. SD Maid has a sizeable amount of non Google Play users, due to popularity in markets that don't have access to Google Play (e.g. China) but also due to piracy. I had already introduced a self-made mini analytics platform, but while the data gathering part worked fine, visualising it was more effort than I was willing to spend.

So I wanted something that offered me a lot of that out of the box that was cheap to run (self-hosted) and privacy friendly. Matomo fit that bill, except that the Android SDK did not offer what I was looking for. The current maintainer was very welcoming though and open to the idea of a rewrite. So that's what I did.

Changes included:

  • An improved API interface.
  • Additional analytics feature that the web/iPhone SDK already had, such as visit count and frequency, custom dimensions and more.
  • QoL improvements, e.g. thread safety, edge case behavior (low memory).
  • Unit-Tests and test coverage.
  • Remapping the web downloads feature into an "app update tracking".
  • Offline mode & batch dispatching.