Blog

WordPress analytics without a cookie banner

Running Google Analytics on WordPress typically means wrestling with consent plugins, slowing down your website with heavy scripts, and watching 40% of your visitor data vanish when users reject the cookie banner. Here is how to measure WordPress and WooCommerce traffic accurately without placing a single cookie or displaying an intrusive banner.

· Published

The cookie banner headache on WordPress

WordPress powers over 43% of the web. For most site owners, setting up web analytics has meant installing a plugin like Site Kit or MonsterInsights, connecting Google Analytics, and then realizing that European privacy laws require a consent management plugin like Complianz, Cookiebot, or CookieYes.

This traditional setup creates three immediate problems for WordPress sites:

  • Performance drag: The combined weight of gtag.js and a consent management banner regularly injects 150 KB or more of JavaScript into your page head. This blocks the main browser thread, delays rendering, and hurts Core Web Vitals scores like Interaction to Next Paint (INP) and Largest Contentful Paint (LCP).
  • Poor user experience: Visitors arriving at your site are immediately blocked by an intrusive modal dialog asking for consent, leading to higher initial bounce rates before they read a single sentence.
  • The consent data gap: In Europe, between 30% and 60% of visitors reject or ignore cookie banners. When they decline, traditional analytics scripts cannot legally execute. You lose sight of nearly half your audience.
The core problem: You are slowing down your WordPress site and annoying your readers with a banner, only to collect incomplete and distorted data in return.

How cookieless WordPress tracking works

Cookieless analytics rethinks measurement from the ground up. Instead of writing persistent tracking cookies (like _ga or _gid) to the visitor browser, it uses an ephemeral, privacy-by-design hashing mechanism.

When a visitor lands on your WordPress site:

  • A lightweight script (under 4 KB) sends basic pageview details (URL, referrer, screen width) to an EU-hosted server.
  • A daily rotating cryptographic hash is calculated server-side: HMAC-SHA256(daily_salt, SECRET + ":" + ip + "|" + ua + "|" + domain).
  • The raw IP address is discarded immediately and is never written to disk or database.
  • No cookies, local storage keys, or session identifiers are written to the visitor device.

Because nothing is stored on or read from the visitor device, Article 5(3) of the EU ePrivacy Directive is not triggered. If your WordPress site does not use third-party advertising or retargeting cookies, you can remove your cookie banner entirely, while staying fully compliant with the GDPR.

WooCommerce conversion tracking without banners

For eCommerce stores running WooCommerce, the cookie banner problem is even more acute. Store owners need to know which products sell, which marketing campaigns convert, and where customers abandon checkout. Yet asking for cookie consent before tracking checkout funnels creates friction and drops measurable conversion data.

A cookieless WordPress setup solves this cleanly:

  • Automatic purchase tracking: When an order completes, the analytics script records an order_completed custom event with order totals, currency, and line items.
  • Funnel tracking: Track checkout_started when shoppers enter the checkout page, allowing you to calculate real cart-to-checkout conversion rates.
  • 100% purchase attribution: Because the tracking does not rely on marketing cookies, every completed transaction is recorded, ending discrepancies between WooCommerce order counts and your analytics reports.

Performance comparison: default analytics vs cookieless

Replacing a conventional analytics stack with a lightweight cookieless solution provides an immediate performance boost to any WordPress installation:

FeatureGA4 + Consent banner pluginMX Cookieless Analytics (MetriXs)
Total script weight120 KB to 180 KBUnder 4 KB
HTTP requests8 to 15 external calls1 lightweight call
Database footprintHeavy options and stats tables in wp_posts/wp_optionsZero database bloat; hosted externally
Core Web Vitals impactNoticeable INP latency and layout shiftsZero measurable render-blocking impact
Consent banner requiredYes (mandatory in EU and UK)No (100% banner-free)
Traffic capture rate40% to 70% of real visitorsNear 100% of real human visitors

Step-by-step setup using the official WordPress plugin

Setting up cookieless analytics on WordPress takes less than two minutes using the official MX Cookieless Analytics plugin on WordPress.org:

  1. Install the plugin: In your WordPress dashboard, navigate to Plugins → Add New, search for MX Cookieless Analytics, and click Install Now followed by Activate.
  2. Get your API key: Create a site in your MetriXs dashboard and copy your site API key from Settings → Sites.
  3. Connect and verify: In your WordPress menu, open Settings → MX Cookieless Analytics, paste your API key, and click Connect & Verify. The plugin performs an automated challenge handshake with the MetriXs API to verify ownership.
  4. Exclude site administrators: Check the option to exclude logged-in administrators and editors so your own editing sessions do not inflate pageview counts.
  5. WooCommerce auto-detection: If WooCommerce is active on your site, the plugin automatically binds to checkout hooks and begins tracking order totals and conversion funnels with zero configuration.
Ready for production: tracking is opt-in and remains disabled until you connect your verified key, ensuring strict compliance with WordPress.org repository guidelines.

Frequently asked questions

Do I need a cookie banner on WordPress if I use cookieless analytics?
No. If your WordPress site does not use third-party marketing, retargeting, or advertising cookies, cookieless analytics allows you to remove the consent banner entirely.
Does the WordPress plugin track WooCommerce orders and revenue?
Yes. The MX Cookieless Analytics plugin automatically hooks into WooCommerce to track checkout started events, completed orders, order totals, and product breakdowns without requiring consent.
Can I exclude logged-in WordPress administrators from tracking?
Yes. The plugin settings allow you to automatically exclude logged-in administrators, editors, or authors so your own visits do not alter your traffic statistics.
Will switching to cookieless analytics improve my WordPress site speed?
Yes. Replacing heavy tracking libraries and consent banner plugins eliminates over 120 KB of JavaScript and prevents render-blocking scripts, directly improving Core Web Vitals.
Where can I download the WordPress plugin?
The plugin is available directly in your WordPress admin panel under Plugins → Add New (search for "MX Cookieless Analytics") or directly on WordPress.org.

Track WordPress without cookies or banners

Install the official MX Cookieless Analytics plugin from WordPress.org and get accurate, GDPR-compliant traffic stats in 2 minutes. Free plan forever.

Get started for free →

Related: MetriXs for WordPress · Supported platforms · How cookieless tracking works · Lightweight analytics scripts compared · GDPR-compliant analytics