This is the best way to be compliant with GDPR and Cookie laws. I decided to drop Google Analytics and use Statify for basic site analytics some time ago. Statify is privacy-friendly as it uses neither cookies nor a third party. Due to this tracking approach, Statify is 100% compliant with GDPR and serves as an lightweight alternative to other tracking services. Hooray for privacy!