Google Tag Manager Template Guide
Last updated: November 3, 2026
This installation uses the shared Web CMP runtime, which supports IAB TCF 2.4. TCF behavior depends on the published property configuration; verify the actual installation and connected tags.
Use the Cybexo CMP Community Template to install CYBEXO CMP in a GTM web container. The template manages Google consent through native GTM APIs and loads the banner using your Web App configuration.
Release availability: The shared-loader template update is published through the existing Cybexo CMP Gallery repository. Check the offered revision against the latest release metadata. Google typically takes two to three days to show updates. Wait for the matching revision before adopting this setup; do not manually edit the installed template.
Before you start
Section titled “Before you start”- Copy your CYB App ID (shown as Settings ID in the dashboard) from the CYBEXO dashboard. This template release accepts only
CYB-App IDs. - Keep Consent Mode enabled in that app’s configuration to publish visitor choices to Google through this integration.
- Use one consent installation on each page. Remove competing direct CMP loaders and Google consent commands. A compatible CYBEXO platform connector configured for GTM should manage its own early setup; do not add a second manual installer.
- Have access to create, preview and publish tags in your GTM web container.
Adding a Gallery template does not create or publish a tag. You still need to configure a tag instance and publish the container.
1. Add the early shared loader for TCF
Section titled “1. Add the early shared loader for TCF”For a TCF installation, place this short script near the start of each page’s <head>, before the GTM container snippet and other TCF-dependent scripts. Replace YOUR_CYB_APP_ID with the actual App ID used in your template tag:
<script id="cybexo-cmp" data-settings-id="YOUR_CYB_APP_ID" data-gtm-bootstrap="on" src="https://cmp.cybexo.com/loader.js?data-gtm-bootstrap=on"></script>Keep it synchronous: no async, defer or type="module", and do not put it in a GTM Custom HTML tag. Allow the loader under your site’s Content Security Policy. Keep the startup query exactly as shown; it is stable across engine releases. Verify successful delivery on the actual site.
This same loader exposes the early TCF API and waits for the template to establish native Google defaults before starting the CMP. The template resumes it without loading a second banner. No separate bootstrap file, inline program or engine version is required. When upgrading, replace the old separate bootstrap setup with this shared-loader setup; do not keep competing installers.
GTM alone cannot provide an API before GTM executes. The early loader is required when TCF consumers execute before GTM. Without it, the template injects the shared loader after establishing defaults. A blocked early loader cannot provide the API, and a blocked GTM leaves the early loader waiting without consent grants or a banner. Configure Basic-mode tag blocking separately.
For a compatible CYBEXO platform connector configured to use GTM, let the connector manage its early setup and platform declaration instead of adding this manual snippet.
2. Install and configure the Gallery template
Section titled “2. Install and configure the Gallery template”- In GTM, open Templates → Search Gallery.
- Search for Cybexo CMP and add the Gallery-linked template.
- Open Tags → New, select Cybexo CMP, and enter your CYB App ID.
- Review the fields below. Keep denied global defaults unless your consent configuration requires otherwise.
- Select Consent Initialization – All Pages as the trigger.
- Save and preview the workspace before publishing.
| Field | Behavior |
|---|---|
| CYB App ID | Paste the actual CYB- Web App ID from the dashboard, without a URL or extra query parameters. Legacy IDs are rejected and consent remains denied. |
| Global Defaults (JSON) | Set each Google key to granted or denied. Omitted or invalid values are denied. Malformed JSON denies all four values. |
| Region Override List (CSV, optional) | Comma-separated valid country/subdivision codes, such as DE, FR, US-CA. Leave blank for global defaults only. |
| Region Override Defaults (JSON, optional) | Overrides for the listed regions. Omitted keys or blank optional JSON inherit global defaults. Explicit invalid values deny that key; malformed nonblank JSON denies all four. |
| Wait for Update (ms) | Accepts 500–10,000 milliseconds, inclusive. Invalid or out-of-range values use 500 milliseconds. |
Denied global defaults:
{"ad_storage":"denied","analytics_storage":"denied","ad_user_data":"denied","ad_personalization":"denied"}Regional defaults affect visitors in the specified regions; more specific subdivisions take precedence. Defaults are configuration, not a record of the visitor’s choice. The wait allows time for asynchronous restoration; it does not wait indefinitely for the visitor or prove that the CMP is ready.
3. Keep one consent owner
Section titled “3. Keep one consent owner”The template uses setDefaultConsentState for defaults and updateConsentState for validated visitor choices, including saved choices and later changes. It covers ad_storage, analytics_storage, ad_user_data and ad_personalization, and sets the fixed developer ID dZTNmYW.
The template automatically passes data-consent-mode=off to the loader to disable its separate gtag command path. Native GTM updates remain enabled through the template. This installation flag is different from disabling Consent Mode in your app configuration; an app-level disabled setting prevents choice publication and is not overridden by the template.
Do not combine this setup with the direct Web gtag('consent', ...) installation snippet. Retain the synchronous shared loader when early TCF is needed, but let this template own Google defaults and updates.
Web CMP 1.5.38 and later keep the native GTM bridge as the sole Google consent owner. Automatic advertiser-TCF inference is disabled for this integration (enableAdvertiserConsentMode: false); the TCF API, TC String and disclosures remain available. Remove any separate window.gtag_enable_tcf_support = true override. Do not enable a parallel TCF-to-Google writer alongside the template. This is specific to native GTM; follow the direct Web guide for a direct installation.
Repeated execution shares the loader and does not reset an existing choice. A successful tag completion means the loader script loaded; configuration, vendor-list delivery and CMP readiness must still succeed. A failed loader or conflicting configuration reports failure and keeps consent denied. Fix the cause and reload; repeating a failed tag in the same page does not restore permission.
Consent Mode changes how supported Google tags behave. It does not automatically block every network request or every third-party tag. For a reproducible single-destination GA4 setup, follow Basic GA4 through GTM: it includes the publisher gate, exact trigger and consent settings, saved-choice restoration and withdrawal handling. Advanced mode instead allows supported Google tags to load under denied defaults. A fully-off migration must remove this template’s native defaults as well as disable app-level commands; see the mode-switching steps.
4. Verify in Tag Assistant
Section titled “4. Verify in Tag Assistant”Test the version actually installed in your workspace, using a fresh visit and a returning visit:
- Confirm the CMP tag fires on Consent Initialization and the expected four defaults are available before Google initialization.
- Confirm developer ID
dZTNmYWand successful loading fromhttps://cmp.cybexo.com/loader.js. - Accept, reject and change advertising/Analytics choices separately. Check the native consent values after each action and after reload.
- Reopen preferences, edit without saving, then cancel. Native Google values must retain the completed choice. Test an independent Analytics refusal and an advertising-personalization refusal separately.
- Confirm intended Google events are delivered when permitted and that tags respect withdrawal and rejection according to their configured consent checks.
- For TCF, confirm the early API answers
pingafter the early loader executes and before GTM or other TCF consumers execute, and queued listeners receive the loaded state when the CMP becomes ready in that document. - Test delivery failures and recovery. A loader request or a tag marked successful alone is not proof of a working CMP.
Use native consent state for this integration. In Tag Assistant, select the earliest Consent Initialization event and inspect Consent for defaults; select the event after a completed choice and inspect the updated values and the Google tag’s consent checks. A direct gtag queue filter can correctly return []: native GTM consent APIs do not need to add gtag('consent', ...) entries. Do not add a second consent writer to make that queue nonempty.
Keep the relevant Tag Assistant and network evidence for the version you publish. Pulse can supplement installation diagnostics; a scan does not replace interaction testing or prove every visitor choice was honored.
5. Publish and update
Section titled “5. Publish and update”Migrate legacy App IDs before updating this template. Complete a supported migration that preserves the app configuration and consent history, then copy the actual CYB- App ID from the dashboard. Do not replace an ID prefix by hand: changing a string does not migrate an app. If migration is unavailable, contact CYBEXO support before updating. Verify the migrated app configuration and use its actual ID in the tag.
Publish the tested GTM container. For an existing installation, review and accept the offered Gallery template update in the workspace, preview it, then publish the container. A new repository or Gallery version does not automatically change an already-published customer container.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Check and fix |
|---|---|
| No CMP tag in Tag Assistant | Create the tag instance, select the intended template and publish the container. |
| Consent defaults are late | Use Consent Initialization – All Pages and remove conflicting consent owners. Check tags loaded outside GTM. |
| Choices do not update native consent | Confirm the current Gallery version, the correct Settings ID and app-level Consent Mode enabled. Check configuration/vendor-list delivery and competing CMP installations. |
| Early TCF API is missing | Place the synchronous shared loader before GTM and TCF-dependent scripts. Check CSP and loader delivery; an asynchronous loader is insufficient for earlier consumers. |
| Legacy or invalid App ID | Obtain the actual CYB- App ID from the dashboard. Complete supported migration before updating a legacy installation. |
| Loader failure or conflicting Settings IDs | Fix blocked delivery or remove the conflicting tag/configuration, then reload. Repeating the failed tag is not recovery. |
| Duplicate banner or inconsistent choices | Keep one CMP loader and one consent owner per page. Remove the separate advertiser-TCF override; test reopening and cancelling without saving on Web CMP 1.5.38 or later. |
Console consent filter returns [] |
Native GTM uses consent APIs. Inspect Tag Assistant’s Consent tab; an empty direct-command queue alone is not a failure. |
| Basic tag stays blocked after acceptance | An All Pages event is not replayed by consent checks. Follow the ready-event trigger in the Basic GA4 guide and check both the public consent state and native analytics_storage. |
| Banner does not appear | A saved choice or regional policy may suppress it. Use a fresh browser context, check the Settings ID and inspect delivery errors. |
If Google tags are delivered through a gateway, also follow the Google tag gateway load-order guide.