Integrating WP Statistics with CookieYes

Works with WP Statistics 14.16.16+   |   CookieYes plugin (tested with 3.5.6)

Set WP Statistics to start counting visitors only after they accept the “Analytics” category in the CookieYes banner. You do not need the WP Consent API plugin for this.

Requirements

Step 1 – Enable the integration in WP Statistics

  1. Go to Statistics ▸ Settings ▸ Privacy & Data Protection.
  2. Under User Preferences, set Consent Plugin Integration to CookieYes.
  3. Click Update.

The CookieYes option is only selectable while the CookieYes plugin is active.

Step 2 – Clear your caches

If you use any caching, optimization, or CDN plugin/service, purge its cache now. Otherwise WordPress may keep serving an outdated version of the scripts.

How it works

Test the setup

  1. Open your site in a private/incognito window. The CookieYes banner appears.
  2. Click Reject All and browse a page. Your visit should not appear in Statistics ▸ Visitor Insights.
  3. Open a new private window, click Accept All, and browse a page. Your visit should now appear in the reports.

Tip: make sure you are logged out, or that your user role is not excluded under Statistics ▸ Settings ▸ Filtering & Exceptions, or your own test visits will not be counted.

Using CookieYes through WP Consent API instead

CookieYes also supports the WP Consent API. If you already use that setup and it works for you, you can keep it. See WP Consent Level Integration. The direct CookieYes option is simpler because it needs one plugin less.

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.