For some privacy laws, anonymized statistics, and a specific configuration of your analytics provider, e.g., Google Analytics, allow setting statistics before consent. How to configure your Google Analytics account for GDPR and other privacy laws can be found here. Anonymizing your IP addresses for Analytics
The Privacy Suite for WordPress
Get compliant today in the European Union, United States, Canada, United Kingdom, Australia & South Africa with the only Privacy Suite for WordPress that offers a fully-featured plugin for Worldwide Compliance.