Consent Modes

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

ModeVisitor experienceTypical regulation
Opt-in (strict)Non-essential blocked until acceptGDPR, LGPD
Opt-outNon-essential may load until reject / DNTSome US frameworks
GranularPer-category toggles in preference centerGDPR, best practice globally

Configured primarily in Consent SetupCompliance + Appearance button layout.

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 SetupIntegrations toggles signal consent to:

IntegrationPurpose
Google AnalyticsConsent-aware measurement
Google Tag ManagerContainer respects consent state
Facebook PixelMeta consent alignment

Enable only integrations you actually deploy.

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 parameterCookieShift category
analytics_storageAnalytics
ad_storageMarketing
ad_user_dataMarketing (v2)
ad_personalizationMarketing (v2)

All four default to denied on first load in opt-in regions. Marketing acceptance grants ad signals together.

GTM / GA4 setup checklist

  1. Load cmp.js before GTM/gtag on the page (WordPress and script embed docs show order).
  2. In GTM, use Consent Initialization or rely on CookieShift’s early gtag defaults—do not fire Ads/Analytics tags before consent update.
  3. Map container tags to the same categories you use in CookieShift (Analytics vs Marketing).
  4. Test in incognito: reject all → no ad/analytics hits; accept marketing only → ad signals granted, analytics denied.
  5. 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

CategoryStrict opt-inOpt-out
NecessaryAlways onAlways on
PreferencesOff until opt-inOften on until opt-out
AnalyticsOff until opt-inMay load until opt-out
MarketingOff until opt-inMay load until opt-out

Exact behavior depends on saved config and runtime version.

TestHow
First visitIncognito → reject → verify tags in network tab
Accept analytics onlyCustomize → enable Analytics only
Reject allReject → marketing pixels should not fire
Return visitConsent cookie present → banner may not reappear until renewal