Skip to main content
An admin sets the signal source in Connect your consent platform. This page covers what your website has to do, and precisely what is gated.

Your job on the page

Write the visitor’s decision to the JavaScript global named in your settings. The default is window.__consent.
A plain boolean works too: window.__consent = true. The tag reads the value like this: The full documented shape is { analytics, marketing, necessary, version }. Only analytics is read. The others are accepted and ignored, so writing the whole object now is safe.
The tag walks the signal path property by property from window, so window.__consent, __consent, and window.myCmp.state.consent all work. A path with a function call or an operator in it does not, because the path is never run as code.
Set it as early as you can, ideally before the allGood tag loads. A value already present means no waiting at all.

OneTrust

Check your own OneTrust configuration for the right category ids — C0002 and C0004 are the defaults, but they’re editable.

Cookiebot

Anything else

Set the provider to Custom, keep the signal source as it is, and write the same object from your own banner’s callbacks.

What the tag does, precisely

With No tracking before opt-in on, which is the default:
Four consequences worth designing around:
  1. A denial sticks for that page load. A later yes doesn’t restart it. A real visitor who changes their mind gets a fresh tag on their next page load, which is why this is acceptable — and it means pre-decision browsing is never delivered late, which is the point.
  2. Nothing is lost on a yes. Everything held is sent, so a page view that happened before the banner was answered still arrives.
  3. What’s held is finite. On a page that fires a great many events before consent is answered, the oldest are dropped.
  4. Silence eventually gives up. If your platform never writes the value — wrong path, banner that never loads — the tag holds, then quietly stops. This is the “nothing is recorded, no errors” case.
With the setting off, none of the above applies: events send immediately.

The gating matrix

Why forms aren’t gated

A submission is an explicit action by the visitor. Form processing rests on a different lawful basis from analytics consent, and refusing a lead because someone declined analytics cookies would be the wrong behaviour. What forms do carry is the evidence: the exact consent statement the visitor was shown, stamped onto the record by allGood rather than supplied by the page. See Keep evidence of what visitors agreed to.
A landing page that allGood hosts is tracked only by the tag it loads, so the gate applies there exactly as on your own site. Serving the page records no view and sets no _ag_id. A hosted page that doesn’t load the tag isn’t tracked at all, and publishing it shows a warning.
It proves a browser reached an allGood surface before. It does not prove anyone consented, which is why the two checks are separate.

Testing the gate

The hosted test page has Grant, Deny and Clear buttons that write the consent global exactly as a real banner would. Use them to watch events hold, then flush.