W

WooCommerce add-on

An add-on for the ConsentTrustee WordPress plugin that auto-blocks common WooCommerce analytics and marketing scripts. No configuration needed — it knows which scripts to block.

This add-on requires both the ConsentTrustee WordPress plugin and WooCommerce to be installed and active. It does not work on its own.

What it does

When you install tracking and marketing plugins in WooCommerce, they enqueue scripts that set cookies. Normally, you would need to find each script handle and map it to a consent category manually. This add-on does that mapping for you.

Auto-blocked scripts

PluginCategory
Google Analytics for WooCommercestatistics
Facebook for WooCommercemarketing
Pinterest for WooCommercemarketing
TikTok for WooCommercemarketing
Hotjarstatistics
HubSpotmarketing
Klaviyomarketing
Mailchimp for WooCommercemarketing

Installation

1. Install prerequisites

Make sure you have both the ConsentTrustee WordPress plugin and WooCommerce installed and activated. The add-on checks for both on activation and will show a notice if either is missing.

2. Upload and activate

Upload the consenttrustee-woocommerce plugin and activate it. That is all. There is no settings page because there is nothing to configure.

3. Verify

Open your store in an incognito window. Decline consent and check DevTools (Network tab) to confirm that marketing and analytics scripts are not loading. Then accept consent and verify they start loading.

Purchase tracking

The add-on also adds consent-aware purchase event tracking. On the WooCommerce thank-you page, it pushes a purchase event to window.dataLayer, but only if the visitor has given marketing consent. This way, your conversion tracking in Google Ads or Facebook stays accurate without violating consent.

If a visitor completes a purchase without marketing consent, the event is not sent. There is no way around this without violating GDPR, and honestly that is fine — you still get the sale, you just cannot attribute it to a specific ad campaign.

Adding custom scripts

If you use a WooCommerce plugin that is not on the auto-blocked list, you can still block it using the ConsentTrustee WordPress plugin's filter:

add_filter('ct_script_categories', function ($categories) {
    $categories['my-custom-tracking'] = 'marketing';
    return $categories;
});

Your custom mappings take priority over the add-on's built-in list.