SaTracking
ConsentNEWAdvanced

Debug Google tag consent states with Tag Assistant

Check consent defaults, user updates, and tag behavior in a test session without treating a browser signal as legal proof.

Download for AI (.txt)

Want to check this in your browser? Run the local audit.

Measurement topic illustration · SaTracking

Audience and prerequisites

Use Tag Assistant and network evidence to show which consent state each Google tag saw, when it updated, and why a tag still fired or stayed blocked. You need a test page, access to the consent banner or CMP configuration, and Tag Assistant. Skill level: advanced. Reading time: eight minutes.

1. Define the expected states before testing

Write down which consent types the implementation uses, the expected defaults before a choice, and what should happen after accept, reject, customize, and withdraw. The CMP obtains and stores the visitor's choice; Consent Mode communicates relevant states to Google tags. It does not itself collect consent or decide legal requirements.

2. Check initialization and updates in the correct implementation

With direct gtag.js, the consent default command must run before commands that send measurement data, and the implementation must update state when the visitor makes a choice. Google documents gtag('consent', 'default', ...) and gtag('consent', 'update', ...) for that path.

With GTM, use a supported CMP integration or a consent template that uses Tag Manager's consent APIs. A template developer should use setDefaultConsentState and updateConsentState; do not substitute queued gtag('consent', 'update', ...) calls inside a GTM template. Confirm each state is updated when the user's choice changes, including withdrawal.

3. Inspect the session in Tag Assistant

Start a fresh test session and connect Tag Assistant. Review consent state at initialization, after the banner choice, and before the relevant Google tags fire. Repeat separately for each choice path. Confirm that the expected tags are blocked or behave according to the documented consent state. Check ordering: a late default or update can allow an earlier tag to run under an unintended state.

If the state never changes, inspect the CMP callback and mapping from its categories to Google consent types. If a tag runs unexpectedly, inspect its built-in consent checks, any additional consent requirements, and trigger timing. Google's consent-debugging guide provides specific Tag Assistant checks.

4. Record what the test proves

Capture the consent state, page, test choice, tag behavior, and relevant network observations. Test the deployed CMP configuration in the relevant regions and banner variants. A Tag Assistant state is evidence of the state seen by that test session; a missing cookie alone does not prove that no request was sent. A tag's consent behavior does not establish that the overall site complies with law.

Privacy and limits

Use synthetic test choices and never expose personal data in consent signals or event parameters. Google consent settings affect Google tags only; configure Meta, TikTok, and other vendors independently. Basic and advanced Consent Mode have different loading behavior, so confirm which architecture the organization chose before interpreting requests. For implementation context, see the Google consent guide.

For consent planning and provider boundaries, see Coordinate consent for Google tags. For a broader implementation choice, see Choose GTM, gtag.js, or Firebase.

Official references

EDITORIAL HISTORY

What changed

  1. v1.0.0
    Initial bilingual guide drafted and verified against linked official Google documentation.
MEASUREMENT SUPPORT

Need a hand with your tracking?

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