Google Tag Gateway
5 min
google tag gateway (gtg) allows advertisers to serve the google tag or a gtm container from their own first party infrastructure (such as a cdn, load balancer, or web serve) rather than directly from a google domain link to official documentation https //developers google com/tag platform/tag manager/gateway https //developers google com/tag platform/tag manager/gateway while gtg improves ownership of the delivery path, it often complicates consent timing because gtg can inject scripts via a cdn before a consent management platform (cmp) has fully loaded, the google tag may fire before consent defaults are established this results in "late consent" signals why gtg requires a specific consent strategy in manual integrations, you maintain control over the script execution order within the html however, with google tag gateway (especially "one click" cdn deployments) this control is often lost, leading to late consent late consent occurs when consent mode defaults or the tcf (transparency and consent framework) stub are initialized after a google tag has already fired to address these timing issues and ensure your tags respect user privacy choices, please refer to the detailed configuration steps in the resolving late consent section below verification and troubleshooting 1\ verify gtg enrollment do not assume your infrastructure is active formally verify that gtg is working by using google tag assistant and following the official google documentation https //support google com/tagmanager/answer/16816376 https //support google com/tagmanager/answer/16816376 2\ detect late consent use the pubconsent gcm debug system to analyze the integration console logs enable "debug" in the configurator to view detailed logs in the devtools console tab debug ui append ?pubtechgoogletagsdebug=true to your url or execute window pubtech google tags debug() in the console note ensure you have interacted with the cmp ui (accept/reject) before triggering the debug window to optimize debugging, specify your configuration goals (e g , gtg enrollment or basic vs advanced consent mode) in the configurator this provides the debug system with context to deliver more accurate troubleshooting messages 3\ resolving late consent when the load order is unpredictable, you must coordinate two configuration layers to ensure that consent mode defaults are set before any google tag fires a use "override consent mode defaults" you can use the google tag option override consent mode defaults ( https //support google com/tagmanager/answer/12131703 https //support google com/tagmanager/answer/12131703 ) this allows you to set specific consent modes to "denied" by default for the necessary states or regions before the tag fires b universal recommendation for measurement to maintain measurement accuracy while remaining compliant, adopt advanced consent mode and create a specific cmp variant in your pubconsent panel this is a universal recommendation for keeping measurements enabled in regions where you are not legally required to show a banner to users create a cmp variant name it "gcm all granted" configure type set the cmp type to google consent mode and enable global consent defaults (this ensures all google consent types are granted immediately upon script execution) map regions in your settings and integration page, set your tcf variant as the "fallback" and map the "gcm all granted" variant to the regions where consent should always be granted c manual resolution for stricter control, avoid one click injection deploy your gtm container via gtg instead of individual tags set up gtg manually to maintain full control over the html script execution order