A tool you host yourself

Plausible Analytics

Source code: github.com/plausible/analytics

Reading the record: its licence, updates, setup and sources.