Mobile App Analytics Didn't Work for Me.
So I Built My Own.
Why do developers use Firebase for mobile analytics and crash reporting?
Because it's easy? Because it's free? Because that's what we've always used? Probably all of the above. But does it give you what you want? I would say no, it does a decent job at some things, and other things it falls short.
I've never been completely happy with Firebase or any of the other analytics offerings I've tried. That's why I built my own.
This series of articles explains how and why I built AppStrength, why I'm glad that I did, and how I'm now benefitting from having real-time analytics in my apps that give me exactly what I want.
The problem
I've been a mobile developer for over 15 years and in that time I've used almost every analytics package that exists, both for my own apps and in my professional role as a contract mobile developer for companies large and small.
Like I said, Firebase does a decent job at some things. So do Countly, PostHog and MixPanel. But none of them have given me what I want as a mobile developer, and especially not as a KMP mobile developer.
A lot of them started life as web analytics tools and have had mobile shoe-horned into them, so you see things such as 'page views', or they have different apis between Android and iOS so not only is integrating them a pita but then you also can't view and compare the data for each platform as you want.
The biggest pain-ponts of using these libraries are:
Integration and setup
Create the project, add the iOS and Android apps, download the config files, work out where in the project to put them, initialisase the library, read a tutorial, find a newer tutorial because it's all changed since the last one, move config files to a different folder, take out the Android init and rewrite the iOS init in Swift then work out how to call it from Kotlin...
Viewing the data
How do I compare Android with iOS? Where do I see event parameters? What does that event key mean? How long is each game lasting?
I can't see the data clearly, I know: Export the data to a file, import into a spreadsheet, create a chart...
Dashboard personalisation
Try and hide irrelevant charts. See if there's a way to change this to a barchart. Find where event parameters are hiding. Ignore the data from qa devices.
The solution - part I

For my last Android-only app, Filight Status and Boarding Pass, I used Crashlytics for crash reporting but didn't want to use Firebase Analytics. So I decided to use my own hand-rolled hybrid implementation for analytics so I could see exactly the app usage data that I wanted to see in the format I wanted it.
Also, one important criteria for me was privacy. Users of the app are entering potentially sensitive data about their flights and I didn't want any of this data being sent over https, either in my own analytics implementation or a third party library.
To achieve this I created a free Supabase project with Postgres tables for installations, sessions and events. Using PostgREST api and the Supabase Kotlin client I posted app data to the database.
I then created a free Grafana account and connected it to my Supabase instance. With this I created some charts to show the number of new installations by day and cumulative, number of flights added and the number of those flights where the status was followed all the way through to landing.
This was a pretty good solution, it gave me the data and charts that I wanted and was easy to view and navigate. Although I found Grafana a bit limiting in terms of the chart format and customisation.
The solution - part II

For my recent KMP mobile app - GrooveGap - I decided to take this one step further and create my own basic analytics data gathering and dashboard without using Grafana. I had several criteria I wanted to be able to monitor instantly and easily:
- Number of installs
- Number of sessions
- Number of games started
- Number of games completed
- Types of games being played
- Time spent playing the games
I wanted to view these values by platform (iOS and Android) and as totals, and I wanted to be able to simply click on the values to drill-down and compare them each day in a chart.
As I had with my previous project, I created a Supabase project and used the Supabase Kotlin client library to connect the iOS and Android apps to the database. I then wrapped this in a repository and api layer to post data to the database so I had a centralised and extensible architeture for the analytics that was pure KMP. I collected data on new installations, sessions, game events, and other events and KPIs.
I then used Codex to help me build a Laravel frontend to display tables and charts from the collected analytics data. The important part of this was I created the dashboards that I wanted, I could see the main data points I was interested in at a glance, then drill-down into the data for more detailed analysis.
This solution gave me exactly what I wanted from my own analytics solution. The analytics layer of the KMP app was callable from where I wanted it and was flexible enough to add new events easily. Plus the dashboard was completely customisable and flexible for me to create the views of the data that I needed.
But there were still a couple of nagging issues to the solution that I didn't like, and oddly enough they were both related to the points that I liked mentioned in the above paragraph. The first was that I felt the KMP layer should be in its own module in the app, or even not part of the app but in a reusable library. The second was I didn't like handing over the building of the dashboard completely to Codex, I wanted more control over it. But I didn't know enough about the stack I was using for the web development. What else could I use to develop a web frontend?
The solution - part III
Taking all the lessons from these earlier attempts at developing a complete KMP analytics solution I decided to approach the problem from a fresh perspective. What would I want in a full analytics solution?
- Easy integration
- Single API for iOS and Android
- Easy to view and customise charts of users and sessions
- Event duration measurement
- Event parameters on start and end of an event
- Charts of any and all event parameters
- User definable chart types
- All charts combine or compare iOS and Android data
I already had the beginnings of the KMP SDK I wanted to create for integrating analytics into a KMP app. Choosing a stack for the dashboard was also a simple choice - Kotlin/Wasm would be perfect. Not only would it provide a powerful framework for creating all the dashboard features I needed, it was also a language I was familiar with so I could develop it without AI taking complete control of the architecture and development process.
So this is my journey to creating AppStrength. In the next articles I'll share the story of what I created and how I developed it - the ups and downs, the good and bad, and what the final achievement looks like.