Show HN: Self-hosted, privacy-friendly and open-source analytics for WordPress
kokoanalytics.com
kokoanalytics.com
Well done, and good luck!
But if you’re new to WordPress, I think the process won’t be that enjoyable. Users are usually on EOL PHP versions and WordPress itself is very different from modern day PHP projects.
(Webalizer)
But how does it work if you are behind a cdn like cloudflare is the usual question, but since Wordpress creates each page dynamically it might work.
When not using a cookie, the plugin will look at the `document.referrer` value to determine whether a visitor is returning and whether a pageview is unique (less reliable, but should be good enough for some).
IP addresses are not looked at at all (let alone stored).
I recently actually started using matomo (away from google analytics)...So I'm curious why you seemed to no longer use it?? Is there something that i should be wary about now using matomo?
I expect Matomo to be even better, after all this time.
We're using it for a big variety of clients small to big and sure, it's less capable than Google Analytics, but then again – most of our clients are just interested in simple visitor statistics to validate certain assumptions, not whether or not James Doe's engagement with our site has been 4.32% better after his second Flat White at Starbucks.
When ever there's a viable alternative to a Google product – go for it. Matomo is 100% viable and I feel much better tracking (anonymous!) user-behavior this way.
https://matomo.org/blog/2019/10/matomo-analytics-for-wordpre...
(Both are GPLv3, so there's no licensing issue or anything; Just caught my eye.)
I do have Google Analytics running on them but GA can be complicated for some users (especially starting out a basic blog), and they love being able to see everything in one place. I've tried a few "display GA stats in WP admin" plugins but they always feel a bit half-baked.
Most bloggers set up Google Analytics without thinking too much but never use much of the data it collects and tracks.
This plugin has all the basics that the average bloggers cares about and it does it without adding extra load and without collecting intrusive and behavioral data.
This strikes me as a potentially non privacy-friendly feature. How is this implemented? I assume some form of fingerprinting must be used?
We're absolutely against fingerprinting as I believe it's better (for the visitor) to just use a cookie in those cases, since they retain control that way. (Delete cookie = be forgotten.)
That's why we opt for a cookie by default, as I believe it is more in "the spirit of the law" than fingerprinting the visitor and storing information about them server-side.
So, when you disable the cookie the plugin falls back on checking the `document.referrer` value for determining returning visitors and unique pageviews. It's a lot less reliable obviously, but some price has to be paid if you do not want to rely on storing something client-side.
What they're talking about is usually described as tracking unique sessions. So, I would see the use of the referrer as a low-complexity, less reliable, but more privacy-friendly way of tracking unique sessions.
What if you completely separated them, and tracked and displayed both for cookie users? Users who disable cookies would then have historical data in the same unit.
Or a warning would probably work fine.
Fingerprinting is the next most reliable way but raises all sorts of data-retention issues. Maybe it is acceptable if the fingerprints are only stored for a very short period of time (say 1 hour).
For my home-brewed analytics system I eventually decided that the trade off wasn't worth it. I just count page views rather than visitors. I know it isn't industry standard, but I don't care and nobody in "the industry" is going to trust self-hosted analytics for anything anyway.
Since people are not familiar with other programs and they can't be confirmed, it may make them skeptical
Although I certainly recommend running a current PHP version of course.
I'm looking for a GDPR-friendly analytics solution for a media property I am building so I am very excited in this space.
For something like this to be viable for us (am not saying we are your target user type) there are some notable things missing which I'm guessing you may add over time.
* Browser type / UA
* Viewport/Screen sizes
* Time on site/page
* Bounce rate
* Pathing
The other thing that you should look into is custom dimensions. So I can label certain templates as a page-type (say 'posts' versus 'pages' versus 'homepage' vs 'tags' etc).There is more beyond that (event based metric like subscribing to a newsletter) but that would within reach without too much extra effort.
Given the code is available, I'm going to dig into the plugin to see if I can help on that.
PS. Since this is brought up all the time: in case anyone wonders why this feels similar to Fathom Analytics, it is because I built the initial open-source version of Fathom too.
Koko Analytics is my attempt at a truly open-source and self-hosted tool that is easy to install (ie not just for those who know their way around a server).
One question, does this plugin have the ability to filter out traffic from web crawlers? The sites I run are low volume, so a non-trivial amount of traffic comes from crawlers and other bots.
That said, I believe some of the smarter ones may still be tracked right now so I will add some user agent filtering to the script to make sure they aren't!