Something that always annoyed me of the current state of technology is how easy and pervasive we let tracking become. Tens of connections to 3rd parties carrying Referer and Cookies just to load an article. (We give up our users to social media websites just to show a like button that looks worse anyway in a iframe than it would natively, wtf.) But I digress.
In that light, I wasn't happy about using Google Analytics, but for some reason I assumed analytics would be hard to self-host. I was wrong.
Enter PIWIK. It's a mature open source analytics platform that works exactly like Google Analytics. Installing it on my Sandstorm server took two clicks[1], and I was ready to copy-paste the <script>
tag. I honestly even find the UI twice as easy to use.
It works where GA doesn't
Here's the kicker: it's not just easy, it does not just respect your users' privacy by not snitching them to a 3rd party, it works where GA doesn't! No ad blocking extension blocks self-hosted analytics.
I'm not the first to realize that ad blocking is skewing analytics, and self-hosting is the obvious solution. I tested a few popular extensions for what they block:
Google Analytics | Self-hosted PIWIK | |
Ghostery | YES | No |
Adblock Plus | No | No |
uBlock Origin | YES | No |
Disconnect | YES | No |
Privacy Badger | No | No |
Indeed, over the last 24 hours PIWIK tracked 18% more pageviews for this blog: 767 vs. 648.
You can check yourself what your browser loaded or not on this page, as I'm still running both GA and PIWIK for a couple days to get better numbers. If you want to hear about the results, follow me on Twitter.
UPDATE: Unsurprisingly, ad blockers are even more widespread amongst HN readers. Over two days, GA logged 10.403 pageviews, PIWIK 16.110. 55% more.
Read more about how PIWIK works with Sandstorm on the Sandstorm blog.
By the way, try Sandstorm. It's an open source platform for your server, it lets you install and update apps with one click, and it has state-of-the-art server and client sandboxing. Secure and usable, seriously. ↩︎