All docs

GTM consent-wrapping checklist

How to gate non-Google trackers on consent. Adsvantage Consent Hub signals Google Consent Mode v2 but does not, by itself, block third-party scripts. Wrap them in GTM.

Why this matters. Tools like Cookiebot/CookieYes bundle a script blocker. Adsvantage Consent Hub deliberately does not, in v1. If a Meta Pixel is hard-coded in your <head>, it fires regardless of the banner. The canonical fix for an agency setup is to migrate every non-Google tag into GTM and gate it on a consent-state lookup.

One-time GTM setup

1. In GTM: Variables → New → User-Defined Variable → Data Layer Variable. Name it dlv.consent.marketing with Data Layer Variable Name consent.marketing.

2. Repeat for consent.analytics and consent.preferences as needed.

3. Create a Trigger Group: Page View + Trigger Condition dlv.consent.marketing equals true. Name it Trigger — Marketing consent granted.

4. The loader pushes the resolved category state to dataLayer after every accept/reject so these variables update automatically.

Per-vendor wrapping

For each vendor: move the script out of <head>, into GTM as a Custom HTML or vendor template tag, and set the trigger to the matching consent group below.

Meta Pixel — trigger: Marketing consent granted. Use Meta's official GTM template (it also reads ad_storage if present).
TikTok Pixel — trigger: Marketing consent granted. Use the official TikTok template; configure Advanced Matching off until consent is granted.
LinkedIn Insight Tag — trigger: Marketing consent granted. The official template now supports Consent Mode but check your version.
Microsoft UET / Clarity — trigger: Analytics consent granted. UET has built-in consent-mode support since 2024; verify the toggle is on.
Hotjar — trigger: Analytics consent granted. Use Hotjar's GTM template; suppress recording when consent is denied.
HubSpot tracking — trigger: Marketing consent granted. HubSpot has a Consent Banner integration; you can disable that and use ours instead.
Custom scripts — same pattern: a Custom HTML tag with the matching consent trigger.

Verifying

1. Open Tag Assistant. Visit the site in incognito.
2. Before clicking the banner: confirm the only tags firing are Consent Initialization — All Pages and the loader itself. No Meta / TikTok / Hotjar tags should fire.
3. Click Accept all. Confirm the dataLayer event consent_updated appears and your gated tags fire on the next refresh.
4. Click Reject all from the floating preferences. Confirm tags stop firing.

What v1 will not do for you

• Auto-scan and quarantine an unknown script tag — that's on the roadmap, not in v1.
• Replace a missing GTM container — sites without GTM must hand-wrap each vendor.
• Override a tag's built-in consent setting if the vendor SDK has one.