@neil dunno if you’re interested in this or not but my solution to this is to make use of server access logs for all my analytics. You lose some of the more creepy metrics but gives me enough idea to know who my site visitors are and what they like.
I use a combination of nginx, Loki and Grafana to come up with a dashboard I can use.