I have been using Plausible for a couple years, it works great and is opensource https://plausible.io/