Hundikuu Consent & Tracking

GDPR, Google Consent V2 compatible cookie management and Meta Pixel, Google Analytics, Google Ads tracking.

Version: 0.8.0 WP 6.4+ PHP 8.0+
Purchase / Download

Cookies & Tracking by Hundikuu combines cookie consent management and marketing tracking into one simple tool. The plugin is optimized for performance – the Klaro consent banner loads only on user interaction, the GTM container loads asynchronously, and Meta server-side events are processed in the background.

Documentation

Installation

Frequently asked questions

Does the cookie banner support multiple languages?

Yes. Five languages are built-in: Estonian, English, Finnish, Russian, and German. The banner switches languages automatically based on the attribute, which Polylang and WPML set automatically. Additional languages can be added via the hnd_tracking_klaro_locales filter or translated using Polylang String Translations / WPML String Translation / Loco Translate.

Is this plugin GDPR compliant?

The plugin is designed with GDPR compliance in mind:

  • All non-essential cookies and tracking are blocked by default until the user provides consent
  • Google Consent Mode v2 is implemented with a default denied state
  • Users can accept all, decline all, or select individual categories (analytics, marketing)
  • Users can review and change their consent at any time
  • Consent is stored in localStorage (first-party; no third-party cookies are used for consent management)
  • Necessary WooCommerce cookies (cart, session) are always enabled but displayed transparently

However, GDPR compliance also requires a proper privacy policy page on your site. The plugin provides the technical implementation – a legal review of your specific use case is always recommended.

Does the plugin affect page loading speed?

The plugin is designed with zero impact on initial performance:

  • Consent Mode v2 default state: ~500 bytes inline (synchronous, required)
  • Klaro early initialization: ~1.5 KB inline (synchronous, registers lazyload listeners)
  • GTM container: loads asynchronously, never blocks rendering
  • Klaro JS (~30 KB): loads only after user interaction (scroll, mouse move, touch, keyboard) or after a configurable timeout (default 4 seconds)
  • Meta CAPI: events are sent server-side via Action Scheduler, zero impact on website loading

Lighthouse performance score is typically unaffected. Total Blocking Time impact is essentially zero on the first load.

Does the plugin work with caching plugins?

Yes. The plugin automatically clears the page cache when you change settings. Supported caching plugins:

  • WP Rocket
  • W3 Total Cache
  • WP Super Cache
  • LiteSpeed Cache
  • SiteGround Optimizer
  • Cache Enabler

If you use another caching plugin, clear the cache manually after changing the plugin settings.

What happens if a visitor declines all cookies?

Google Analytics 4: Sends anonymous "cookie-free pings" (no cookies are set, no personal data is stored). You can still see approximate visitor numbers through GA4 modeled data.

Meta Pixel: Does not load at all. No data is sent to Meta.

Google Ads: Sends anonymous pings similar to GA4. Conversion modeling still works.

WooCommerce cart cookies: Still work (classified as "necessary"). The shopping cart functions normally regardless of the consent choice.

Can visitors change their consent after accepting or declining?

Yes, in two ways:

  • Revisit button: A floating button (configurable position, icon, colors) that opens the consent modal. Activate it under Settings → Revisit Button.
  • Custom link: Add a link to your site with the code onclick="hndOpenConsentManager(); return false;" – for example, in the footer or on the privacy policy page.
What consent categories are available?

Three categories:

  • Necessary – always enabled, cannot be disabled (WooCommerce cart, WordPress session). Displayed for transparency.
  • Analytics – Google Analytics 4, WooCommerce order attribution (Sourcebuster cookies)
  • Marketing – Meta Pixel, Google Ads
Does the plugin replace PixelYourSite, MonsterInsights, or similar tracking plugins?

Yes. Once configured, this plugin does everything those plugins do – and more. To avoid duplicate events, you should deactivate other tracking plugins. The plugin provides:

  • GA4 tracking via GTM (replaces MonsterInsights, Site Kit, etc.)
  • Meta Pixel via GTM + server-side CAPI (replaces PixelYourSite)
  • Google Ads conversion tracking via GTM
  • GDPR consent management (replaces CookieBot, Complianz, CookieYes, etc.)
What is Meta Conversions API (CAPI) and why do I need it?

Meta CAPI sends tracking events from your server directly to Meta, in addition to the browser-based Meta Pixel. This is important because:

  1. iOS 14.5+ blocks browser tracking for ~30-40% of users
  2. Ad blockers block the Meta Pixel script entirely
  3. CAPI events are server-to-server – browsers cannot block them
  4. Meta Ads preferentially uses CAPI data for optimization and attribution

The plugin sends CAPI events asynchronously via Action Scheduler, so there is no impact on page loading speed. Events are deduplicated with the browser pixel using UUID-based event IDs.

Where can I get a Meta CAPI access token?
  1. Go to Meta Business Manager
  2. Navigate to Events Manager → select your Pixel
  3. Click Settings → Conversions API
  4. Under the "Set up direct integration" section, select "Set up with Dataset Quality API"
  5. Click "Generate access token"
  6. Copy the token and paste it into the plugin settings → Meta CAPI → Access Token

Important: Never share your access token publicly. The plugin stores it securely in your WordPress database and never displays it in the browser.

How to test if CAPI events are working?
  1. Go to the Test Events tab in Meta Events Manager
  2. Copy the test event code (e.g., TEST12345)
  3. Paste it into the plugin settings → Meta CAPI → Test Event Code
  4. Perform actions on your site (view a product, add to cart, submit a form, make a purchase)
  5. Events should appear in the Test Events panel within 30 seconds
  6. Remove the test event code after testing
Can CAPI be used without the browser Meta Pixel?

Technically yes, but it is not recommended. Meta's deduplication and attribution models work best when they receive events from both sources. The browser pixel provides real-time user interaction data, while CAPI provides reliable server-side confirmation. Together, they give Meta the most accurate picture for ad optimization.

What user data does CAPI send to Meta?

CAPI sends SHA256-hashed user data for better matching:

  • WooCommerce orders: billing email, phone, first name, last name, city, state, zip code, country (all hashed)
  • Forms (Gravity Forms, etc.): email and phone fields (if present in the form, hashed)
  • All events: client IP address, user agent, _fbp cookie (first-party), _fbc cookie (click ID)

All personal data is hashed with SHA256 before sending. Meta cannot reverse the hash – they can only match it against their hashed user database. Raw personal data never leaves your server.

 

Can this plugin be used without WooCommerce?

Yes. The plugin works on any WordPress site. WooCommerce e-commerce events (view_item, add_to_cart, purchase, etc.) are only loaded if WooCommerce is active. On sites without WooCommerce, you still get consent management, GTM, GA4, Meta Pixel, Gravity Forms tracking, and contact micro-conversions.

Which WooCommerce events are tracked?

Five standard GA4 e-commerce events:

  • view_item – product page view (product name, price, category, SKU)
  • add_to_cart – add to cart click (supports both block-based and classic themes)
  • view_cart – cart page view (all products, total value)
  • begin_checkout – checkout page view
  • purchase – order confirmation (transaction ID, value, tax, shipping, all products)

Corresponding Meta Pixel events (ViewContent, AddToCart, InitiateCheckout, Purchase) are also sent via GTM and CAPI.

Does the plugin work with WooCommerce block themes (FSE)?

Yes. The plugin uses universal WordPress conditional functions (is_product(), is_cart(), etc.) instead of WooCommerce template hooks, so it works identically on both block-based themes (TT4, TT5, custom FSE child themes) and classic themes. The add-to-cart event captures both block Store API (/wc/store/v1/batch) and classic jQuery AJAX calls.

Are WooCommerce Sourcebuster (sbjs) cookies tracked?

WooCommerce order attribution uses Sourcebuster cookies (sbjs_current, sbjs_first, sbjs_session, etc.) to track where visitors came from. The plugin classifies these under the analytics consent category. If a visitor declines analytics consent, WooCommerce still sets these cookies itself (the plugin cannot prevent this), but the cookie banner transparently discloses their presence.

Do I need Google Tag Manager to use this plugin?

The cookie banner works without GTM. However, to track visitors with GA4, Meta Pixel, or Google Ads, you need a GTM container. The plugin inserts your GTM container and manages consent – the actual tracking tags live in GTM. A ready-to-use GTM container template is included with the plugin.

What is the difference between the free and licensed versions?

Free (without license): Basic Klaro cookie banner with default settings and 5 built-in translations (ET, EN, FI, RU, DE). No tracking, GTM, or design customization.

Licensed: Full functionality, including GTM insertion, Consent Mode v2, Meta CAPI, WooCommerce e-commerce events, Gravity Forms tracking, contact micro-conversions, banner design customization, revisit button, and automatic updates.

Every new installation comes with a 3-day trial period – all features are available during the trial.

Does the license work on a test server/development environment?

The license works based on the main domain. For example, the license key used on hundikuu.ee also works on docs.hundikuu.ee. We recommend testing in a development environment before deploying to production. The 3-day trial period also allows for full testing on new installations without a license.

 

Changelog

1.0.1 Minor

Fixed GTM container generator errors

Added GTM container generator persistent memory

Added option to pause/disable certain GTM tags in GTM container generator

Lisatud küpsiste ribareklaami pealkiri

1.0.0 Major

Initial fully functional version:

Added Google Tag Manager container JSON file creation tool

Complete Estonian translation added.

0.8.0 Major

Improved loading and timing of JS and CSS files. Optimization for PSI score.

Show previous versions
0.7.0

Translation timing error (WP 6.4 and newer). CAPI fine-tuning and event matching logic

Fixed Klaro compatibility when displaying translations

Enhanced CAPI compatibility and added additional data to the data layer.

0.6.0

Initial public version