The most effective way to implement Consent Mode on a WordPress website is to use a single instance of Google Tag Manager and deploy all tracking and marketing services through it.
This includes services that natively support Consent Mode, such as:
- Google Analytics 4
- Google Ads
- Microsoft Clarity
This approach keeps your consent management centralized, scalable, and compliant with GDPR requirements.
WebToffee GDPR Cookie Consent Plugin Setup
Enable Google Consent Mode
Once your plugin is installed and configured, navigate to:
WordPress Admin → Cookie Consent → Google Consent Mode (GCM)
Enable the following options:
- Enable Google Consent Mode
- Manage Consent Mode with GTM Template
The second option is essential because it allows the plugin to communicate consent states directly with Google Tag Manager.
Configure Microsoft Clarity Consent Mode
If you are using Microsoft Clarity, you can also integrate it with Consent Mode.
Go to:
Cookie Consent → Microsoft Consent Mode
Enable:
- Microsoft Clarity Consent Mode
- Support Microsoft UET Consent Mode (if you are using Microsoft Advertising)
This ensures Microsoft tracking respects user consent preferences.
Google Tag Manager Setup
After finishing the plugin configuration, Google Tag Manager will load on every page regardless of whether cookies have been accepted.
This behavior is correct and expected.
The next step is to install the WebToffee CMP template inside GTM and properly configure your triggers and tags.
Install the WebToffee CMP Template in GTM
Go to:
Google Tag Manager → Tags → New → Tag Configuration → Discover more tag types in the Community Template Gallery
Search for:
WebToffee CMP
Add the template to your workspace.
Create a new tag with:
Tag Name: WebToffee CMP
Trigger: Page View – All Pages
In most cases, the Page View trigger is already available by default.
Configure Services That Support Consent Mode
Services such as:
- Google Analytics 4
- Google Ads
- Microsoft Clarity
can safely fire on the default:
Page View – All Pages trigger.
These platforms are capable of operating in a limited, anonymous mode before consent is granted. Once the visitor accepts cookies, the services automatically switch to full tracking functionality.
This means:
- GTM loads immediately
- Consent-aware tags load immediately
- Cookies are only stored after user consent is granted
This setup is compliant when configured correctly.
Configure Services and Tags That Require Cookies
This is the most important part of your GDPR compliance setup.
Any tag or third-party service that relies on cookies should only fire after the appropriate consent category has been granted by the user.
Examples include:
- Retargeting scripts
- Heatmaps
- Marketing pixels
- Affiliate tracking
- Third-party analytics tools
Create a Consent Variable in Google Tag Manager
You can use the consent state available in the Google Tag Manager Data Layer to control when specific tags are triggered.
For example, if a tag should only fire after Analytics Cookies are accepted, you first need to create a Data Layer Variable.
Go to:
Variables → New → Data Layer Variable
Use the following configuration:
Data Layer Variable Name: analytics_storage
You can verify this value inside Tag Assistant under the Data Layer tab.
Create a Custom Event Trigger
Next, create a trigger that listens for consent updates from the WebToffee plugin.
Use the following configuration:
Event Name: wcc_gcm_consent_update
Enable: Use regex matching
Enabling regex matching ensures the trigger fires in both situations:
- When consent changes dynamically without a page reload
- When the page is reloaded
Under:
This trigger fires on → Some Custom Events
Set the condition:
Analytics Consent equals granted
This trigger can now be assigned to any tag that should only activate after analytics consent is approved.
Repeat the same logic for other consent categories such as:
- Marketing
- Preferences
- Functional cookies
This creates a fully scalable and compliant consent setup inside GTM.
Testing Your Consent Mode Configuration
After configuration is complete, thoroughly test the implementation.
Test in GTM Preview Mode
Open:
Google Tag Manager → Preview
This launches Tag Assistant.
Verify that:
- Cookie-dependent tags only fire after the relevant consent category is granted
- Google Analytics 4 fires immediately on Page View
- Microsoft Clarity fires immediately on Page View
Verify Cookies in the Browser
For final validation:
- Open your website in Google Chrome
- Open Developer Tools
- Navigate to:
Inspect → Application → Cookies - Clear all existing cookies
- Reload the page
Before consent is granted, only essential cookies should appear.
After accepting cookies, the corresponding tracking and marketing cookies should become visible.
Final Recommendation
Once everything is working correctly, run a complete cookie scan of your website to ensure all cookies are properly categorized and blocked before consent.
A properly configured Consent Mode implementation improves:
- GDPR compliance
- Data accuracy
- Tag management scalability
- Website performance
- Marketing attribution quality