Integrating WP Statistics with Borlabs Cookie

Set WP Statistics to start counting visitors only after they have given consent in the Borlabs Cookie plugin. This ensures full compliance with data protection regulations (GDPR/ePrivacy).

If you’re looking to integrate WP Statistics with a different consent plugin, see our general guide here: Integrating WP Statistics with Consent Management Plugins.

Requirements

Step 1: Configure Privacy Settings in WP Statistics

Before activating the integration, ensure your WP Statistics settings are optimized for it. This integration is only compatible with the Client-Side tracking method.

  1. Go to WP Statistics → Settings → General.
  2. Set the Tracking Method to Client Side Tracking.
  3. Next, go to WP Statistics → Settings → Privacy & Data Protection.
  4. Enable the following options:
    • Anonymize IP Addresses
    • Hash IP Addresses
  5. Click the Update button to save your changes.

Step 2: Enable the WP Statistics Service in Borlabs Cookie

Unlike other integrations, this one does not require changing any settings in our plugin’s “Consent Plugin Integration” section. All configuration is handled within Borlabs Cookie.

  1. In your WordPress dashboard, go to the Borlabs Cookie menu.
  2. Navigate to the Library section.
  3. Find WP Statistics in the list of available services, then install and activate it.
Borlabs Cookie

By doing this, Borlabs Cookie will automatically block the WP Statistics tracking scripts until the user provides consent.

Step 3: Clear Your Cache (Very Important)

If you use any caching, optimization, or CDN plugin/service, you must purge its cache completely. Otherwise, WordPress may continue to serve outdated versions of the scripts, and the integration will not work correctly.

Test the Setup

To ensure everything is working correctly, follow these steps:

  1. Open an incognito/private window in your browser and visit your site.
  2. In the cookie banner, decline consent for Statistics. Browse a few pages. The visitor counts in WP Statistics should not increase.
  3. Reload the page and this time accept consent for Statistics. Browse a few more pages. The visitor counts should now increase.

That’s it! Your analytics now run only with proper user consent. Don’t forget to update your Privacy Policy and Cookie Policy accordingly.

Let’s get started
Take your business to next level

Become part of our growing family of +600,000 users and get the tools you need to make smart choices for your website. Simple, powerful insights are just a click away.