Perhaps something soverign like https://plausible.io/open-source-website-analytics I've tested this in the past and its relatively easy to setup if I recall.