Skip to main content

Adapting your Axeptio configuration for Google Tag Gateway (GTG)

Are you using Google Tag Gateway (GTG)? Learn about its impact on consent and how to adapt your Axeptio configuration.

Written by Alexandre Dias Da Silva

This article is only relevant if you are using Google Tag Gateway (GTG) on your site.

What is Google Tag Gateway and what is its impact on consent?

Google Tag Gateway (GTG) is a mechanism offered by Google that allows Google tags (gtag.js, gtm.js) to be served from your own domain instead of googletagmanager.com. In practice, GTG turns third-party scripts into first-party scripts.

Activation is done in one click from the Google Tag Manager interface: Google then injects a CDN configuration that changes the source of the script loaded on the site.

Once GTG is enabled, a tag that was previously loaded from
https://www.googletagmanager.com/gtm.js?id=GTM-XXXXXX is now loaded from ​https://your-domain.com/gtm.js?id=GTM-XXXXXX

What is GTG for?

GTG offers a lightweight alternative to server-side tracking for sites that want to:

  • Bypass adblockers that block requests to googletagmanager.com.

  • Improve performance by reducing third-party DNS lookups.

  • Strengthen tracking resilience against browser restrictions (ITP, ETP).

Unlike server-side tagging (which requires a dedicated GTM server), GTG is activated in one click from the GTM interface.

Impact on consent: the risk of late consent

For Axeptio to work correctly, two signals must be emitted before Google tags execute:

  • the Consent Mode default command (gtag('consent', 'default', {...}))

  • the TCF stub (window.__tcfapi), for sites subject to the IAB TCF v2.2 framework

If this is not the case — meaning the default command and/or the TCF stub load after Google tags have already started — this is called late consent (consentement tardif).

When consent is late, the first events sent by Google tags may be sent without the user's chosen consent state being taken into account, which violates Consent Mode implementation requirements.

This issue can occur independently of GTG, particularly in the following situations:

  • Manual Axeptio integration via script, if Axeptio is not positioned before GTM in the HTML

  • Use of the Axeptio GTM tag template without the "Consent Initialization - All Pages" trigger

  • Integration via CMS plugin, depending on how the plugin injects the script

If you have followed our integration recommendations — both for the Axeptio integration method and for Consent Mode v2 configuration — the default command is emitted before Google tags: GTG then has no impact on your configuration.

GTG can amplify this existing issue: by serving gtm.js from your own domain, the script potentially loads faster (no external DNS resolution), which reduces tolerance for script loading order issues. GTG thus acts as a magnifier: it makes visible an issue that may have gone unnoticed until now.

What GTG does not do

  • GTG does not bypass user consent choices. Consent Mode continues to adapt tag behavior based on the consent signaled by Axeptio.

  • GTG does not collect any additional data compared to gtag.js / gtm.js. GTG only changes how the script is loaded, not what it does once loaded.

How to verify if you are using GTG?

Important: GTG activation verification must be performed manually by you. Axeptio detects symptoms (late consent) but it is up to you to correlate this with GTG using the steps below.

For formal verification steps, consult the Google Tag Manager Help Center: https://support.google.com/tagmanager

In addition, here are three practical checks you can perform in a few minutes.

In the page source code

  1. Open the relevant page in a browser.

  2. View the page source (right-click → View page source or Ctrl+U / Cmd+Option+U).

  3. Search for the <script> tag that loads gtm.js or gtag/js.

Tag served via GTG:
<script async src="https://your-domain.com/gtm.js?id=GTM-XXXXXX"></script>

Tag NOT served via GTG:
<script async src="https://www.googletagmanager.com/gtm.js?id=GTM-XXXXXX"></script>

The verification criterion is the script source domain: it should be yours (e.g. https://example.com/gtm.js) and not https://www.googletagmanager.com/gtm.js.

In the browser Network tab

  1. Open browser developer tools (F12 or Cmd+Option+I).

  2. Go to the Network tab.

  3. Filter on gtm.js or gtag.

  4. Reload the page.

  5. Inspect the Domain / Initiator column for each request.

If you see your-domain.com/gtm.js?id=… → ✅ Tag served via GTG
If you see www.googletagmanager.com/gtm.js?id= → ❌ Tag not served via GTG

In the Google Tag Manager interface

Containers deployed via GTG display a badge or dedicated label in the container's Admin section. Refer to the Google Tag Manager Help documentation for exact labels: https://support.google.com/tagmanager

What to do with this result?

  • If none of your Google tags are served via GTG: no GTG action needed. Continue using Axeptio as today.

  • If some of your Google tags are served via GTG and you see a late consent warning: proceed to the section below.

If you are using GTG

Axeptio helps you detect late consent issues

  • Browser console warnings (coming soon) — when late consent is detected, Axeptio will display a warning directly in your browser console.

  • Shake Scanner — our compliance diagnostic tool analyzes your site and verifies that Consent Mode is correctly implemented. → Learn more about Shake

These tools do not detect GTG directly, but they identify problematic symptoms (late consent, missing signals).

What to do if Axeptio detects late consent and GTG is enabled?

Late consent issues related to GTG are caused by a tag loading order that is outside Axeptio's control. These issues must be resolved in your tag configuration or deployment strategy — Axeptio cannot fix them alone.

💡 If you have followed Axeptio's integration recommendations and do not observe late consent — no action is required, your configuration is compliant.

If you are using GTG and your configuration has a late consent issue, three resolution options are available, in order of decreasing recommendation.

(Recommended) Option A — Adopt advanced consent mode

Switch to advanced consent mode: Google tags fire immediately, sending cookieless pings (limited measurement). Once consent is obtained, full measurement resumes; if consent is denied, only cookieless pings are retained.

⚠️ Behavioral modeling eligibility: your GA4 property must reach a minimum threshold of 1,000 consenting visitors per day (for at least 7 of the past 28 days). Below this threshold, modeling will not activate. → Learn more

  • Enable Data Transmission Controls in your Google tag settings as needed — Google documentation

  • Global Consent Defaults are managed automatically by Axeptio.

Why this option is recommended:

  • It is the mechanism explicitly recommended by Google for GTG deployments.

  • Basic consent mode is more fragile in this context: it relies on strict control of loading order. If that is not the case, GTG can highlight this existing issue.

Points to note:

  • Verify that your Google tags support advanced mode.

  • Behavioral modeling requires 1,000 consenting visitors/day minimum.

  • Data Transmission Controls need to be configured according to your needs.

📖 For the detailed setup of advanced Consent Mode with Axeptio, see our dedicated support article: Configure Google Consent Mode v2

Option B — Migrate all tags to a GTM container and deploy GTM via GTG

This option is for you if you are not using GTM — manual script in the <head> or Axeptio CMS plugin (WordPress, Drupal, Shopify, etc.).

  • Centralize all marketing/analytics tags in a single Google Tag Manager container.

  • Enable GTG at the container level, not tag by tag.

  • The GTM container is served from your domain, and GTM manages the loading order of the tags it contains.

Points to note:

  • Requires setting up GTM if not already done.

  • Axeptio must be configured with the "Consent Initialization - All Pages" trigger to guarantee loading order.

Option C — Manual GTG setup

What it involves:

  • Set up GTG manually: host the redirect to Google's CDN yourself on your own server/CDN and explicitly control the script import order in the HTML.

  • Ensure the Axeptio tag is loaded and executed before the GTG tag.

Points to note:

  • Requires technical skills on the server/CDN side.

  • Loading order is entirely your responsibility — a misconfiguration can reintroduce the issue.

  • See the Google documentation for manual setup.

Quick decision matrix

Situation

Recommended option

You want the most robust and easiest to maintain solution

Option A — Advanced mode

You are not using GTM (manual script or Axeptio CMS plugin) and want to regain control of loading order

Option B — Migrate to GTM via GTG

You have a technical team and want full control without changing consent mode

Option C — Manual GTG

You are not sure where to start

Option A — Advanced mode (recommended by Google and Axeptio)

Appendix — References and documentation

Axeptio documentation

Google documentation

The Google pages above are the authoritative sources. In case of discrepancy, Google's pages take precedence.

Did this answer your question?