News for hackers. Stuff that matters.

Ask HN: Static Site Analytics Without Cookies?

I run a couple of static sites, and am interested in aggregate stats about visitors - total number, referrer/origin, time of day and maybe location at the resolution of like, 100Km or so (eg State of origin or similar).

Are there any easy ways to do this that don't need a cookie consent pop-up, and are GDPR compliant (by recording zero PII)?

I'm happy to trade recording much less information about users in order to achieve this.

( 2 comments | 4 points | on HN )
Re:Ask HN: Static Site Analytics Without Cookies? by barneythedino on Tuesday August 14, 2018 @12:50PM (#17759549)
It may not be quite where you want it yet, but take a look at https://github.com/usefathom/fathom. In particular you may be interested in issue https://github.com/usefathom/fathom/issues/40 where cookies are discussed.
Re:Ask HN: Static Site Analytics Without Cookies? by EE84M3i on Tuesday August 14, 2018 @12:51PM (#17759556)
The oldschool way of doing this is programs like awstats that parse the web server logs, which can do all the things you're talking about and is in Debian/Ubuntu repos. I don't know if there's a fancier similar tool that people use these days, but AWStats gets the job done.

I wouldn't say they record zero PII but they don't record much additional PII over what your logs already use.