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.
Or even run it in a container anywhere. A while ago (when Matomo was named "Piwik") I had it running in a stateless containers (db was provided as a service).
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/