Map the real choice before changing tags

Consent mode changes how Google tags behave according to the consent state a site communicates. It does not ask visitors for consent, decide which choice is lawful, or remember a choice for the site. Start with the actual preference interface and the organisation’s approved policy: what can a visitor choose, which optional purposes do those choices cover, and where can they change their mind? The implementation must translate those real choices into the relevant Google consent states. A developer should not set every state to granted merely to restore a reporting number, or set every state to denied without checking whether that matches the site’s stated approach. The technical review is about fidelity to the choice and timing, with policy owners resolving the underlying permission decision.

Google’s current website guidance names four core parameters: analytics_storage, ad_storage, ad_user_data and ad_personalization. Their names refer to different aspects of measurement or advertising use; one broad ‘accept’ button does not by itself tell a developer how a more granular settings panel maps to them. Write a small mapping table in the project notes, showing the site’s choice, the four resulting states and the reason for each mapping. Include a case for no choice yet, a case for each available preference combination, and a case for withdrawal. This makes a disagreement visible before code is deployed. If a consent management platform supplies the integration, inspect its settings and documentation rather than assuming the banner’s visible switch automatically controls the Google tag.

Check the default before measurement

Google instructs developers using gtag.js to set the consent default on every page before commands that send measurement data, such as config or event. For Tag Manager, Google recommends its consent-specific template APIs for default and update states rather than using queued gtag consent commands inside a template. The practical test is to inspect the order in which the default becomes effective, not merely find the word ‘default’ somewhere in source code. If tags begin sending events before a default is set, the later command cannot make the earlier requests disappear. If a banner loads asynchronously, Google documents wait_for_update as one option, but the value and behaviour need to be tested against the actual loading path rather than copied from an example without thought.

Distinguish the two deployment models before testing network traffic. In basic consent mode, Google tags are blocked from loading until the visitor interacts with the banner, so there should be no Google transmission before that interaction. In advanced mode, tags can load while consent is denied and may send limited, cookieless signals according to Google’s design. A network request in that situation is not by itself proof that consent was ignored; equally, seeing a denied label in a debugger is not enough to prove all site scripts respected the choice. The team must know which model its policy and implementation call for, then inspect both tag state and actual requests. Do not label one model universally required for all Hong Kong websites on the strength of a technical guide.

Test acceptance, refusal and withdrawal

Google’s guide says to update consent on the page where the user changes the setting, before a page transition. A useful test sequence starts in a fresh browser state with no stored choice. Record the default, choose one available option, and inspect the update event and resulting parameter states. Repeat with a refusal and with each granular combination the interface supports. Then change an accepted choice to a refusal through the settings panel. Withdrawal is an update too; it must not leave a previous granted state active simply because the first banner has disappeared. Avoid testing only the all-accept path, which is usually the easiest path and says little about whether the stated choices work.

Page timing matters in a single-page site as well as a conventional multi-page site. If the visitor confirms a setting and the app immediately navigates away, an update may be queued too late for related measurement. Google specifically warns that updates made immediately before a reload can lose traffic as the browser unloads. Test the actual button flow, including redirects after account sign-in or checkout, and check that the state is current before subsequent events. When a consent tool writes its choice to storage, confirm that the stored choice belongs to the correct user and device context; a shared computer should not silently treat a new visitor’s first session as the previous person’s intentional choice.

Carry the choice across real journeys

Consent mode itself does not save a visitor’s preferences. Google tells implementers to persist the choice and apply the correct update on subsequent pages. After making each test choice, reload the page, visit a different product or service page, and open a new tab to the same site. Check that the displayed preference and the tag state agree. On a site with multiple domains or embedded booking steps, map where the choice is available and how it is transferred; do not assume a preference on one origin automatically follows the visitor to another. If the site cannot carry a choice reliably, identify the handoff gap before interpreting a fall in measured sessions as a marketing problem.

For a worked scenario, suppose a visitor refuses analytics storage on the home page, opens a service page, then changes the setting to accept analytics while leaving advertising purposes refused. The service page should begin with the state carried from the first page, not an all-granted reset. After the new choice, analytics_storage should update while ad_storage, ad_user_data and ad_personalization continue to reflect the separate advertising choice. On a later reload, the same split choice should be restored. This is an illustrative test case, not a claim about any real client. If the interface cannot express such a split, test only the combinations it genuinely offers and do not invent a preference option in the implementation.

Use Tag Assistant and inspect the limits

Google’s troubleshooting guide uses Tag Assistant’s Consent tab to examine whether consent is configured, whether defaults are set in time and whether updates occur. Run it on a fresh session and compare the observed states with the mapping table. If the tab is empty, investigate whether consent mode is implemented at all. If the default appears late, inspect load order. If the update is absent, inspect the actual banner or CMP integration. Repeat on the important page templates rather than assuming a pass on the homepage covers checkout and booking. Record the browser, page, choice, expected states and observed states so the defect can be reproduced without exposing a visitor’s private data.

A green-looking debugger does not independently certify the whole consent experience. It does not decide whether the notice is understandable, whether the categories match the organisation’s policy, or whether non-Google scripts respect the same decision. Inspect those separately with their owners. Nor should a change in GA4 or Ads figures be used as a shortcut to infer that settings are right: measurements can shift because of traffic, attribution or implementation changes. After a technical repair, rerun the same choice matrix and note the deployment date. Keep the test cases beside the consent interface so a future redesign or new tag prompts another review. The practical result is a reproducible account of what the site sends for each real visitor choice.

The handover should name the person who owns the banner configuration, the person who owns Tag Manager or gtag.js, and the person who approves purpose mappings. A future change to one layer can invalidate a previously successful test. For example, adding an advertising tag without checking its consent requirements can create a new path that the old test matrix never exercised. Keep a brief change trigger and a reproducible browser procedure, so the next maintainer can verify the same choices after a site release instead of relying on a remembered screenshot.

Before you proceed

  • Four consent parameters match the site's actual choices.
  • Defaults take effect before relevant tag measurement.
  • Accept, refuse, withdraw and reload paths were observed.

Sources & further reading