How CookieShift consent modes interact with analytics, opt-in, opt-out, and tag firing.
Consent mode describes how your banner and runtime treat non-essential tags before and after a visitor decides. CookieShift combines law templates, strict mode, and integrations to match your program.
Modes at a glance
| Mode | Visitor experience | Typical regulation |
|---|---|---|
| Opt-in (strict) | Non-essential blocked until accept | GDPR, LGPD |
| Opt-out | Non-essential may load until reject / DNT | Some US frameworks |
| Granular | Per-category toggles in preference center | GDPR, best practice globally |
Configured primarily in Consent Setup → Compliance + Appearance button layout.
Strict mode (prior consent)
When Strict mode is enabled:
- Marketing/analytics tags should wait for appropriate category consent
- Necessary tags continue for security and consent storage
- Scanner before consent issues highlight tags that still fire early
Google Analytics / GTM integration
Consent Setup → Integrations toggles signal consent to:
| Integration | Purpose |
|---|---|
| Google Analytics | Consent-aware measurement |
| Google Tag Manager | Container respects consent state |
| Facebook Pixel | Meta consent alignment |
Enable only integrations you actually deploy.
Consent Mode v2 (Google)
CookieShift enables Google Consent Mode v2 when Integrations → Google Consent Mode is on (default for new configs). The CMP calls gtag('consent', 'default', …) before tags run, then gtag('consent', 'update', …) after the visitor decides.
Signals mapped
| Google parameter | CookieShift category |
|---|---|
analytics_storage | Analytics |
ad_storage | Marketing |
ad_user_data | Marketing (v2) |
ad_personalization | Marketing (v2) |
All four default to denied on first load in opt-in regions. Marketing acceptance grants ad signals together.
GTM / GA4 setup checklist
- Load
cmp.jsbefore GTM/gtag on the page (WordPress and script embed docs show order). - In GTM, use Consent Initialization or rely on CookieShift’s early
gtagdefaults—do not fire Ads/Analytics tags before consent update. - Map container tags to the same categories you use in CookieShift (Analytics vs Marketing).
- Test in incognito: reject all → no ad/analytics hits; accept marketing only → ad signals granted, analytics denied.
- Optional: enable Google Additional Consent (ACM) in integrations when using TCF + Google vendor IDs.
Debugging
Open the browser console and filter for Consent Mode: logs (default/update phases). Confirm dataLayer receives consent_update events after banner actions.
Misalignment causes “gaps” in conversion data—not always a compliance failure but affects reporting.
Category ↔ mode mapping
| Category | Strict opt-in | Opt-out |
|---|---|---|
| Necessary | Always on | Always on |
| Preferences | Off until opt-in | Often on until opt-out |
| Analytics | Off until opt-in | May load until opt-out |
| Marketing | Off until opt-in | May load until opt-out |
Exact behavior depends on saved config and runtime version.
Testing consent mode
| Test | How |
|---|---|
| First visit | Incognito → reject → verify tags in network tab |
| Accept analytics only | Customize → enable Analytics only |
| Reject all | Reject → marketing pixels should not fire |
| Return visit | Consent cookie present → banner may not reappear until renewal |