My own solution is AWStats combined with a custom log file anonymizer that I wrote.
https://gitlab.com/jamieweb/web-server-log-anonymizer-bloom-...
This will provide stats on unique visitors, most viewed pages, referring sites, etc, whilst protecting the privacy of visitors.