Out of curiosity, and as someone who has never used website analytics: why do we need a third party for this? Couldn't a bit of client side code + server side code do all the work these days?
It's very basic compared to Piwik, but it runs on PostgreSQL, my DB of choice, and it's written in Go, not PHP, which means it has higher performance and is more secure.
Just wanted to add that you can also use Fathom with MySQL or SQLite if that's more your cup of tea. It supports those 3 database engines right now.
Please check out https://matomo.org (former name Piwik) for open-source self-hosted website analytics (with server logs support)
If you sell software, you have a customer that can do whatever they like.
If you provide SAAS you can tie in the user more and more.