I’ve been thinking about analytics with my own website lately. Originally I started out with Google Analytics. The thing I liked the most about this was checking out referrals and looking at the map to see what part of the world the traffic is coming from.
But then I listened to this episode of the Changelog:
It covered a number of topics. Some points that resonated with me:
- Google Analytics is not lightweight
- Privacy/tracking issues
- Cookie-less option
Some time later, I read this post from Jose:
This was before fly.io. Setting up my own Plausible server for a side project seemed fun, but not something I want to maintain (and ultimately would add cost). So, I decided to rip out Google Analytics and just stick with my users
table - which records the user’s timezone (based on the user’s IP address).
For me, this has been enough. However, I recently came across https://splitbee.io. For a low traffic website such as mine, this gives me a nice UI to inspect similar (yet probably more accurate) information. I also really enjoyed the onboarding process.
So I started thinking about analytics again - this time from a technology/product point of view (i.e. not making a personal decision based on cost).
This is a naïve thought - but could you make an analytics solution that is designed to work exclusively with Live View? I’m assuming through the Live View life cycle that a javascript call is being made per page render to the Phoenix server anyway. So could you piggy-back on that to achieve similar functionality to a traditional javascript Page Tagging solution (such as Google Analytics).
Specifically, I was thinking you could create a pub-sub communication model between the web application and the analytics service. The thought of an Elixir-centric solution in my web app is appealing and this feels like it carries on the spirit of Live View - i.e. there is javascript but you don’t have to think about it. I like the onboarding experience with Splitbee too - I could see a similar experience, but with an Elixir-based product. I’m not sure if there would be any other benefits to such a solution (above and beyond a traditional javascript solution) or even this is a good idea! Just thought I’d see what other people think.
Finally, and this is a self-serving question, is this something that people would be interested in? The existing solutions out there are already fantastic! Would you pay for such a thing?