SaTracking
PlatformsNEWAdvanced

Configure consent-aware tags in Google Tag Manager

Set consent defaults in the correct order and check each tag's consent requirements before a GTM container is published.

Download for AI (.txt)

Measurement topic illustration · SaTracking

Audience and prerequisites

Map each tag to the consent types it needs, set defaults before tags load, and verify allowed and denied states in Preview. You need an agreed consent mapping, access to the container, and a test plan for first visit and preference changes. Skill level: advanced. Reading time: eight minutes.

Work with the people responsible for privacy to document which tags require which consent types and what behavior is expected before a visitor chooses. The banner or CMP collects the choice. Google Consent Mode communicates applicable states to Google tags; it is not a consent banner and does not determine legal obligations.

2. Set defaults before measurement tags run

Use a supported CMP integration or a reviewed consent template. Place the consent initialization logic so defaults are available before relevant Google tags process events. For a custom GTM template, use Tag Manager's consent APIs setDefaultConsentState and updateConsentState; Google's developer documentation says not to substitute queued gtag('consent', ...) commands in a GTM template. A direct gtag.js implementation uses its documented gtag('consent','default',...) and update commands instead; do not mix the two recipes.

Review built-in consent checks and any additional consent requirements for each tag. A tag can have a valid trigger and still be blocked by consent settings, or run because its requirements do not match your intended policy. Keep non-Google vendor tags separately configured; Google consent settings do not automatically govern them.

4. Preview each choice path

In Tag Assistant, test first visit, accept, reject, customize, and later preference changes. Inspect consent state and which tags fired at each event. Verify that updates occur before subsequent measurement events. If a default is missing or late, fix initialization order. If a choice does not update state, check the CMP callback and mapping. If a tag behaves unexpectedly, check its consent requirements and trigger separately.

Save the expected and observed states with the container version. Tag Assistant evidence describes that test session; it does not prove legal compliance or every provider's receipt. A cookie scan alone cannot explain all network behavior.

Privacy and limits

Do not place personal data in consent signals or event parameters. Consent Mode behavior varies between basic and advanced setups; document the chosen architecture and test it. This guide describes Google Tag Manager and Google tags only. Set policy and consent behavior for other platforms independently.

For consent-state testing and Tag Assistant evidence, continue with Debug Google tag consent states.

Official references

EDITORIAL HISTORY

What changed

  1. v1.0.0
    Initial bilingual guide drafted and checked against linked current Google documentation.
MEASUREMENT SUPPORT

Need a hand with your tracking?

Nicolas Salazar works with teams on analytics, tracking plans, data quality, consent, and implementation.