How to Test Your GTM Consent Setup
Before publishing a consent setup, test it the way visitors will experience it: from an opt-out region and an opt-in region, with and without a stored choice, and with Global Privacy Control on. This article gives you a scenario grid, what to expect in each cell, and how to read the results in Tag Assistant.
Setup
Use GTM Preview on the workspace you’re about to publish, on the real site or a staging copy that loads the same container.
Simulate regions with a VPN: one location in an opt-out region (a US state such as California) and one in an opt-in region (an EU country, the UK, or Quebec).
Simulate GPC with a browser that sends it natively or with a GPC browser extension.
Start each scenario clean. Use a fresh incognito window, or clear the site’s cookies, so there’s no stored choice (
cc_consent_preference) and no cached regional default (cc_region_defaults) from the previous run.
The scenario grid
Run these eight loads. For Allow and Reject, make the choice on the first load, reload, and judge the second load; that’s what shows whether stored choices are applied from Consent Initialization. In each cell, “fire” and “blocked” refer to the non-essential tags, meaning those set to Require additional consent. Google tags fire in every cell (see “Things that look wrong but aren’t”).
Scenario | Opt-out region | Opt-in region |
|---|---|---|
Default load (no choice, no GPC) | Fire. Tags Not Fired count equals the Allow row. | Blocked. Count equals the Reject row. |
Default load with GPC on | Blocked. Count equals the Reject row. | Blocked. Count equals the Reject row. |
Allow, then reload | Fire. Count equals the Default row, and equals opt-in Allow. | Fire. Count equals opt-out Allow. |
Reject, then reload | Blocked. Count equals the GPC row, and equals opt-in Reject. | Blocked. Count equals the GPC and Default rows. |
So the whole grid resolves to two numbers: an “everything allowed” count that appears in three cells, and an “everything non-essential blocked” count that appears in the other five. Record the counts in a copy of this table; if every cell lands on the number its neighbors predict, the setup passes. The counts themselves vary by container, which is why the grid is about equalities rather than values.
Reading the differences
When two cells that should match don’t, the difference is a short list of specific tags. Open both runs in Tag Assistant, compare the Tags Fired lists, and note the tags that appear in one and not the other. Then click each such tag to see which trigger fired it and, on the Consent tab for that event, what the consent state was at that moment.
Common causes:
A catch-all custom event trigger (event name matching
.+). It fires on Consent Initialization, before a stored choice or GPC has been applied, so the tag fires in opt-out regions under GPC or after Reject. Fix the trigger pattern.A tag fired by a site event pushed early in the page, such as a conversions relay on a data layer event, that still has a plain event trigger. It’s blocked on cold loads and fires on reloads. Use a trigger group with CC - Consent Ready.
A Google tag on a Consent Initialization trigger. It runs before the CMP sets defaults. Move it to Initialization.
A tag still at Not set. It fires everywhere. Give it a consent setting.
A tag on an early trigger that hasn’t been moved to CC - Consent Ready. It’s blocked on opt-in default loads and never fires after Allow without a reload.
The event timeline
The event list on the left of Tag Assistant tells you the order things happened in, which is usually the whole explanation:
Consent Initialization, with the Captain Compliance tag fired on it.
Consent Default: the state the CMP set for this visitor.
Consent Update, if there was a stored choice or GPC. On a reload after Allow or Reject, this comes immediately after the default, before Initialization. On a cold load it may come later, after the banner has loaded.
Initialization, page view, DOM Ready, Window Loaded, and the site’s own events.
captainComplianceConsentandcaptainComplianceConsentReadyfrom the banner. Tags on CC - Consent Ready fire here.
If a tag fired before step 3 completed, it fired on a stale state.
Things that look wrong but aren’t
Google tags appear as fired even when consent is denied. In advanced Consent Mode that’s the cookieless ping. Check what the request contained rather than whether it fired.
Tags on CC - Consent Ready fire later than they used to, after the banner resolves the state rather than at page view. That’s the intended behavior.
Two Container Loaded events on one page. That’s the GTM snippet or a
gtm.jspush running twice on the page, which is a site issue unrelated to consent, but worth fixing since it can double page views.
When it passes
Publish from the workspace you tested, and keep the grid with the version notes. When you later add a tag, the quick regression is the two cells most likely to catch a mistake: opt-out with GPC, and opt-in default load. If those two still equal their Reject rows, the new tag is gated.
