[C] Consentify

Google Consent Mode v2

Send consent signals to Google Analytics, Ads and Tag Manager.

Google Consent Mode v2 is how Google tools find out whether a visitor agreed to tracking. Since March 2024 it is required for Google Ads features in the EEA. Without it, Google receives no signal and drops the traffic from your reports.

Consentify can push these signals for you. Turn it on with one attribute:

<script
  src="https://consentify.dev/widget.js"
  data-token="ct_YOUR_PUBLIC_TOKEN"
  data-gcm="true"
></script>

Put the Consentify script before your Google tag, and use the data-gcm attribute rather than the dashboard setting. The denied default is pushed the moment the script is parsed, which is what lets it beat Google's tag. Enabling Consent Mode from the site settings instead means the default cannot be sent until the config request comes back - by which point Google's tag may already have run.

What gets sent

Your consent categories map onto Google's consent types automatically:

Your categoryGoogle consent types
necessarysecurity_storage
analyticsanalytics_storage
marketingad_storage, ad_user_data, ad_personalization
preferencesfunctionality_storage, personalization_storage

Categories your site marks as required are always granted.

Before a decision, everything except security_storage is denied. When the visitor chooses, Consentify sends a consent update with the result. Revoking consent sends a fresh update returning those types to denied.

Using it with Google Tag Manager

No extra setup. GTM reads the same dataLayer, so tags with built-in consent checks respect the signal automatically. For custom tags, add the matching consent type under Tag Configuration → Consent Settings.

Verifying it works

Open DevTools and run:

window.dataLayer.filter((e) => e[0] === 'consent')

You should see a default entry with everything denied, then an update entry after making a choice.

Consent Mode tells Google what the visitor allowed. It does not stop scripts from loading - see Script Blocking for that. Most sites want both.

On this page