Two different pieces
Wire the banner, Consent Mode defaults and Google tags to one stored choice, then check the granted and denied paths before enabling measurement. Google Consent Mode communicates relevant consent states to Google tags so they can adjust their behavior. Consent Mode does not replace the banner, determine what a jurisdiction requires, or automatically configure tags from other providers.
The data layer is a shared message queue, not a consent banner or vendor pixel. A generic dataLayer.push() does not grant consent or forward an advertising event. Google consent states must be set through the supported Google tag or Tag Manager consent APIs in the correct order; control each non-Google pixel separately.
If your requirement is to avoid contacting an optional provider before consent, make sure its scripts do not load before the choice is made. In particular, Google's advanced mode can load tags with denied states and send signals without cookies; it is not equivalent to blocking all network communication.
Implementation order
- Define categories and purposes with the responsible teams. Decide which tags belong to each category and what happens when no choice has been made.
- Set default states before the relevant tags run. The example below is illustrative and does not replace a configuration reviewed for your deployment.
- Update the state based on the choice made in the CMP, before navigating away or allowing dependent tags to run.
- Integrate each provider separately. A Consent Mode update for Google does not automatically control Meta, TikTok, or other providers' pixels.
- Test every path: first visit, accept, reject, customize, change preferences, and withdraw consent.
Conceptual example for gtag.js with an initial denial:
gtag("consent", "default", {
ad_storage: "denied",
analytics_storage: "denied",
ad_user_data: "denied",
ad_personalization: "denied"
});After reading the choice stored by the CMP, the application sends a consent command of type update with the corresponding values. Do not copy a fixed acceptance update as a substitute for the actual interaction. If you use GTM, configure the state with compatible consent APIs and templates instead of relying on Custom HTML tags that may run too late.
Test the states
In Tag Assistant, review the consent states and the order of the default signal, update, and tags. Also inspect network requests when consent is denied and granted. Repeat the test for the relevant country and banner variant.
Keep evidence of which tags run and which requests are sent. A cookie's presence alone does not explain every transmission. Review the official Consent Mode web guide regularly, since its parameters and integration can change.
Limits
Legal requirements depend on the services, data, jurisdiction, and actual configuration. This technical recipe does not certify compliance. Consult the people responsible for privacy and each provider's current documentation.
Official references
- Set up Consent Mode on websites Checked November 10, 2026
- Consent Mode overview Checked November 10, 2026
- Debug Consent Mode with Tag Assistant Checked November 10, 2026
What changed
- v1.0.0Initial publication; distinguishes consent collection from Consent Mode and outlines the state flow.
- v1.1.0Clarifies that consent is applied through supported Google consent APIs and that other pixels need separate controls.