___TERMS_OF_SERVICE___ By creating or modifying this file you agree to Google Tag Manager's Community Template Gallery Developer Terms of Service available at https://developers.google.com/tag-manager/gallery-tos (or such other URL as Google may provide), as modified from time to time. ___INFO___ { "type": "TAG", "id": "cvt_temp_public_id", "version": 1, "securityGroups": [], "displayName": "CMPStack Consent Banner", "categories": ["UTILITY", "ANALYTICS"], "brand": { "id": "brand_dummy", "displayName": "CMPStack", "thumbnail": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAABDElEQVR42u3bURKCMAxF0SzFTbn/X3ehC3AQaknea3M746e0OQiWkEQMjtfz8Xb+xN3DPeA0kNUDn4LYLfghhF2Dv4Swe/A/EboEf4jQGqBb8F8IAADQGGD0SyuMIQQAAPgfwOl6BgAAAAAAAAAA8gEcEWbWE4pJXYIHYAbAAeGO+QFwWIRy3nBajGI+ABwXVTkPAM6Lqzh+rLDIzOMCsMJPNfPSAsD9bp19YwXA+T+7Ym8RrtvWqo0VAI4PL5UPVwC4JTCqH61Ly2POglNklwBwSWSqcosAOKSzlel1WY3gbHGTtFZwFwB5pajF2QdAXCusfLts0TMgP/t0jNA0RdscjZO0ztI83bd9/gMoNlQ7XZ3GwQAAAABJRU5ErkJggg==" }, "description": "Loads the CMPStack consent banner and sets Google Consent Mode v2 signals denied-first, before any other tag fires. Fire this on Consent Initialization - All Pages.", "containerContexts": ["WEB"] } ___TEMPLATE_PARAMETERS___ [ { "type": "TEXT", "name": "siteId", "displayName": "Site ID", "simpleValueType": true, "help": "From Domains → Install tag in your CMPStack panel. It is the domain's id, not its hostname.", "valueValidators": [ {"type": "NON_EMPTY"}, { "type": "REGEX", "args": ["^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"], "errorMessage": "That does not look like a site ID. Copy it from Domains → Install tag." } ] }, { "type": "TEXT", "name": "apiUrl", "displayName": "API URL", "simpleValueType": true, "defaultValue": "https://api.cmpstack.io", "help": "Leave as-is unless you are on a dedicated instance." } ] ___SANDBOXED_JS_FOR_WEB_TEMPLATE___ // CMPStack consent banner. // // Fire this tag on the "Consent Initialization - All Pages" trigger. That trigger is // the only one GTM guarantees runs before every other tag in the container, which is // exactly the guarantee this tag needs: Consent Mode has to be set to denied BEFORE a // Google tag reads it, and blocking has to be armed before a pixel is injected. // // GTM's sandbox has no DOM access, so the script is loaded with injectScript rather // than by writing a