Analytics Without Google
I noticed this post mentions GoatCounter but says that it doesn't meet his needs because it isn't self-hosted.It is not by default, but you certainly can self host it, and the author has been quite open about that being a viable path for people interested in doing so. I self host GoatCounter myself and it works very well.