I have been working on one for many years now as a side-project (not free): https://www.usertrack.net
Since October I started working on it full-time and I'm really excited about the future updates. I want people to start using it not only because it's self-hosted but because it should lead faster to actionable insights than Google Analytics. I am also planning to provide a free version after I manage to earn enough to keep working on it.
Countly (https://count.ly) is open source, push notifications, analytics, A/B testing, performance management and deployable on-prem. You can also install a limited, free-to-use version on Digital Ocean also.