Matomo is a full-featured web analytics platform that rivals Google

Formerly known as Piwik, Matomo is a full-featured web analytics platform. A key difference to Google Analytics, though, is their approach to data, with its promise of 100% data ownership (data gathered via Google belongs to – and is used by - Google!). Here at O’Brien Media, we hold privacy close to our hearts, so it’s perhaps natural that we recommend Matomo to our clients!
Source