Self-hosted Matomo is a good alternative in PHP land. Being PHP it makes it pretty easy to deploy on a VPS and use it as analytics for all your projects. That also puts you in control of it's performance and impact on your users.
You can also use a server-log only mode which uses zero client-side snippets/pixels to do the tracking work.
https://matomo.org/matomo-on-premise/