cmpwoocommerceGoogle Consent Mode v2cookie consent

WooCommerce Cookie Banner: Setup and Testing Guide

Marcin
13 July 2026
6 min read
WooCommerce Cookie Banner: Setup and Testing Guide

WooCommerce stores often combine WordPress, payment gateways, analytics, advertising pixels and third-party plugins. A consent setup therefore needs to manage optional tracking without disrupting the cart or checkout.

This guide explains how to classify common cookies, review payment services, connect Google Consent Mode v2 and test the complete purchase path. For broader background, see the GDPR cookie banner guide.

Every plugin or tag can introduce cookies, browser storage or external requests. A visible banner is only one part of the setup: the visitor’s choice should also be reflected in how the website behaves.

In practice, you should verify that:

  • cart, session and checkout functions remain available;
  • optional analytics and advertising technologies follow the visitor’s choice;
  • Google tags receive the intended Consent Mode state;
  • payment and fraud-prevention services still work when optional consent is rejected.

Classifying common WooCommerce cookies

The correct classification depends on how the store and its plugins use each technology. The following table is a practical starting point, not a substitute for reviewing the actual implementation.

CookieTypical purposeLikely category
woocommerce_cart_hashDetecting changes to cart contentsNecessary
woocommerce_items_in_cartRemembering whether the cart contains itemsNecessary
wp_woocommerce_session_Maintaining the customer session and cartNecessary
_ga, _ga_*Google Analytics measurementAnalytics
_gcl_auGoogle Ads measurement and attributionMarketing
_fbp and similar identifiersAdvertising measurement or audiencesMarketing

Cart and session cookies are commonly treated as necessary when they provide functionality requested by the shopper. Analytics and advertising technologies generally require a separate assessment and should be connected to the relevant consent choice where required.

Review payment gateways separately

Payment gateways and fraud-prevention services may load scripts, set cookies or contact external domains during checkout. Automatically treating every payment-related technology as marketing could prevent customers from completing an order.

Document each service separately and test the checkout with optional cookies rejected:

  1. Open the store in a clean browser session.
  2. Reject optional cookies.
  3. Add a product to the cart.
  4. Proceed through checkout and select a payment method.
  5. Complete the payment-provider flow or use its test environment.
  6. Confirm that the customer returns correctly and that the order status is updated.
  7. Repeat the test after accepting optional categories and compare the analytics and advertising activity.

Classification and consent requirements can vary by provider, configuration and jurisdiction, so uncertain cases should be reviewed with an appropriate specialist.

  1. Load the consent manager before optional analytics and advertising tags.
  2. Keep genuinely necessary cart and session technologies available.
  3. Map the analytics choice to analytics_storage.
  4. Map the advertising choice to ad_storage, ad_user_data and ad_personalization as appropriate.
  5. Check the initial consent state before the visitor makes a choice.
  6. Confirm that the state updates after rejection, partial consent and full consent.
  7. Review payment and fraud-prevention scripts independently.
  8. Repeat testing after plugin updates, checkout changes and tag-manager publishes.

Consent Mode communicates consent states to Google tags; it does not collect consent or guarantee legal compliance. For implementation details, use the guide to Google Consent Mode v2 in Google Tag Manager.

Choose an implementation approach

ApproachSuitable forPoint to monitor
CMP or WordPress pluginStores seeking a managed consent interfaceLoad order, category configuration and plugin compatibility
Google Tag ManagerTeams that manage most marketing tags through GTMTags or triggers that bypass the intended consent checks
Custom implementationTeams with ongoing developer ownershipMaintenance effort and regressions after site changes

Before selecting a platform, confirm that it supports the categories, languages, Google consent signals and records required by your implementation. You can review the available CookiePilot features as part of that evaluation.

Test more than the banner

TestExpected resultSuggested method
Before a choiceThe configured default consent state is active; optional storage behaves as intendedBrowser developer tools and Tag Assistant
Reject optional cookiesCart, account and checkout functions continue to workManual purchase-path test
Accept analytics onlyAnalytics follows the selected state while advertising remains deniedGTM Preview or Tag Assistant
Accept allTags receive the corresponding updated signalsGoogle diagnostics and network inspection
Add or update a pluginCookies, requests and categories are reviewed againBrowser testing and CMP records

Check browser storage, network requests, tag-manager events and the complete order flow. Do not treat the appearance of the banner as proof that the implementation works.

A consent management platform can help present choices and retain relevant records, but it cannot guarantee compliance by itself. Requirements depend on the technologies used, their purposes, the store’s configuration and the laws that apply to its visitors.

Review current guidance for the relevant market and obtain specialist advice where classification or consent requirements are unclear. Avoid blocking technologies that are genuinely necessary for a requested shopping function, and verify whether optional tracking starts before the required choice has been made.

FAQ

WooCommerce does not by itself provide a complete consent-management workflow for every store’s plugins, tags and legal requirements. A separate configuration or tool may be needed.

Cookies genuinely required to maintain a shopper’s cart or session are commonly treated as necessary. Confirm their actual purpose and avoid using that category for unrelated tracking.

No. Consent Mode passes consent states to supported Google tags. A separate interface and process are still needed to collect and manage the visitor’s choice where required.

Are payment gateway cookies marketing cookies?

Not necessarily. Review each payment and fraud-prevention technology according to its purpose and configuration, then test it with optional consent rejected.

When should the store be retested?

Retest after changes to plugins, themes, checkout, payment providers, advertising tags or GTM containers. Regular reviews can also identify technologies introduced without an intentional configuration change.

Next step

Create an inventory of cookies, tags and external requests. Classify each item by purpose, configure the banner and Consent Mode states, and then test the entire purchase path with different consent choices.

If you are evaluating a consent manager for your store, compare the required functionality with CookiePilot pricing before deciding on an implementation.

Written by

Marcin

Zespół CookiePilot dzieli się wiedzą o RODO, PKE i zarządzaniu cookies.

Share this article: