ConsentLayer
Guides

Google Consent Mode v2

ConsentLayer automatically manages Google Consent Mode v2 — no additional setup required.

How it works

  1. On page load, the banner sets all consent signals to denied (except security_storage)
  2. When consent is given, the banner updates the consent signals to match the user's choices
  3. Google tags read these signals and adjust their behavior accordingly

Signal mapping

ConsentLayer CategoryGoogle Consent Signals
essentialfunctionality_storage, security_storage
statisticsanalytics_storage
marketingad_storage, ad_user_data, ad_personalization

Verification

Open your browser's developer console and check:

// After consent is given
dataLayer.push({event: 'consent_check'})

You should see the consent signals update in the Google Tag Assistant.

Excluding Google from script blocking

By default, ConsentLayer excludes Google's own scripts from blocking when Consent Mode is active (since Consent Mode handles the compliance). This is controlled by the gcmExcludeGoogle setting in your banner configuration.