Ask HN: Solutions to count website visitors that's not blocked by ad-blockers?

2 points by baobabKoodaa ↗ HN
I'm trying to weed off from Google Analytics and looking for alternatives. I don't need anything complex, I'm mainly looking for a reasonable guesstimate on the number of visitors per page. This is hindered by common use of ad-blockers, which understandably block many analytics scripts. Do I have to build my own solution to this or is there an existing product for counting visitors that is not blocked by ad-blockers?

7 comments

[ 3.2 ms ] story [ 36.2 ms ] thread
Use server logs instead of client side libraries
I should have probably mentioned that I'm working on static websites that are hosted on CDNs.
All requests except those for your pages could be blocked, so your CDN server is the only subject that can remember them.

Do you receive server logs from your CDN? If not, maybe you can serve something from your own servers to have some server logs under your control.

> maybe you can serve something from your own servers to have some server logs under your control.

This is exactly the approach I was thinking of! It just sounds like a lot of work (and some costs) to set up and maintain a server for this purpose, and then more work to produce useful analytics out of server logs with some measure of "unique" visitors. I was thinking maybe somebody else has already created a product that works like this.

If you just need visitors count, servers logs should be more than enough. If you are looking for something more complex, I am also working on a (premium) self-hosted analytics script[0]. If you go with self-hosted analytics in general it is a lot less likely to get blocked by ad-blockers all resources can be 1st party.

[0]: https://www.usertrack.net/

I've built my own very primitive tracker. PHP on server and a bit of java-script and IMG tag on client. Very simple and works just as well as Plausible and better than Goatcounter (compared the three on same site). If you go for server logs you need ways to discount bots and other scripts. Probably discount foreign traffic depending on the intended audience - this works well for me in a small european country.