CookieWise + GTM Consent Mode v2
Drop in CookieWise, tick the right GTM consent boxes, and run a clean Consent Mode v2 setup.
CookieWise sets denied consent defaults before GTM runs, then updates consent state based on each visitor action (accept, reject, or granular choices).
What CookieWise Does Automatically
- Sets defaults:
gtag('consent', 'default', ...)is set to denied before GTM tags run - Pauses tag execution: includes
wait_for_updateso tags wait briefly for consent state - Sends updates:
gtag('consent', 'update', ...)fires on accept, reject, and granular save - Maps categories: CookieWise categories map to Google Consent Mode v2 signals
Step 1: Install CookieWise First
Add CookieWise as the first script in your page <head>, before GTM:
<script src="https://www.cookiewise.net/api/script.js?website_id=YOUR_WEBSITE_ID"></script>
If you load CookieWise after GTM, Consent Mode defaults may arrive too late.
Step 2: Keep Your GTM Container Standard
Use your normal GTM container snippet. CookieWise pushes consent state into dataLayer using the Google gtag consent API, so no extra custom consent script is required.
Step 3: Tick Consent Checks on GTM Tags
For each relevant GTM tag (GA4 config, GA4 events, Ads conversion, remarketing, Floodlight, etc.), open Tag Settings → Consent Settings and require the correct consent types.
| Consent Type | When to require it |
|---|---|
| analytics_storage | GA4 pageview/event tags and analytics tooling |
| ad_storage | Google Ads and remarketing tags |
| ad_user_data | Ads tags sending user data for conversion/attribution |
| ad_personalization | Personalized advertising and audience features |
| functionality_storage | Optional for tags that rely on functional preference storage |
In most stacks, these are the five consent checks you need to verify.
Step 4: Verify in GTM Preview + Browser Console
- Open GTM Preview mode on a clean session (incognito).
- Confirm consent starts denied on first load.
- Click Accept All and confirm consent updates to granted for analytics/ads signals.
- Click Reject All and confirm non-essential signals remain denied.
- Use granular settings and verify updates match selected categories.
Step 5: Publish and Re-check Tagged Events
After publishing GTM, validate GA4 Realtime and Ads diagnostics. With consent denied, Google uses cookieless pings and modeled reporting pathways; with consent granted, full measurement resumes.