Google Tag Gateway deployment recommendations
This page describes recommended deployment patterns when using CookieHub together with Google Tag Gateway.
Recommended: CookieHub and Google Tag through GTM
In this configuration, CookieHub and the Google Tag are both managed by Google Tag Manager. This is the recommended approach for most deployments.
Benefits:
- Predictable initialization order
- Consent defaults established before measurement
- Easier troubleshooting
Recommended: CookieHub loaded directly on the page
CookieHub can also be loaded directly on the website while Google Tag Gateway serves the Google Tag.
Benefits:
- Consent defaults are typically available early in the page lifecycle
- Reduced dependency on GTM initialization order
Use with caution: Automatic Google Tag setup through CDN GTG
Some CDN-based GTG implementations can automatically configure and initialize Google Tags. The exact behavior may vary between providers.
If CookieHub is deployed through GTM and the Google Tag is automatically initialized by GTG before GTM completes loading, measurement requests may occur before CookieHub has established consent defaults.
This can result in late consent signals being reported by Google.
One-click CDN injection requires no change to the site itself, so the Google Tag is injected and initialized by the CDN rather than by the page. This often leaves the customer with no control over the load order.
If CookieHub is deployed through GTM, we recommend allowing GTM to manage the Google Tag instead of automatically configuring the tag through GTG.
Not recommended: Using a GTM Container ID as a GTG tag
CookieHub recommends configuring GTG using a Google Tag ID.
Using other identifiers may result in unexpected behavior depending on the GTG implementation.
Consent mode for GTG-enabled tags
For tags that remain enrolled in GTG, advanced consent mode is the recommended mechanism. It allows Google tags to load and receive consent updates after initialization while respecting consent defaults, so it stays compatible with a manual GTG deployment where the customer controls the script import order.
Where a late consent signal has already been reported, also review Global Consent Defaults and Data Transmission Controls, or consider migrating tags into a GTM container. See Understanding late consent signals.
Verify your deployment
After enabling GTG:
- Verify GTG enrollment in Tag Assistant. See Verifying GTG enrollment.
- Verify consent defaults are applied before measurement occurs. See Understanding late consent signals.
- Check for consent-related warnings in Google diagnostics.
- Confirm Google Tags are firing as expected.
- Review CookieHub Action Center and scan reports for Consent Mode warnings.