Skip to main content

Configure your Axeptio setup for Google Tag Gateway (GTG)

Using Google Tag Gateway (GTG)? Discover its impact on consent and how to adapt your Axeptio configuration.

Written by Alexandre Dias Da Silva

This article is relevant to you only if you use 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 you to serve Google tags (gtag.js, gtm.js) from your own domain instead of googletagmanager.com. Concretely, GTG transforms third-party scripts into first-party scripts.

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

Once GTG is activated, 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 requests.

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

Unlike server-side tagging (which requires a dedicated GTM server), GTG is activated with 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 — that is, if the default command and/or the TCF stub load after Google tags have already started — this is called late consent.

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

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

  • Axeptio integration via manual 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 it injects the script

If you have followed our integration recommendations — both on the Axeptio integration method and on the 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 problem: by serving gtm.js from your own domain, the script potentially loads faster (no external DNS resolution), which reduces tolerance for loading order issues. GTG thus acts as a revealer: it makes visible a problem that could 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 modifies how the script is loaded, not what it does once loaded.

How to verify if you use GTG?

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

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

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

In the page source code

  1. Open the page in question in a browser.

  2. Display the source code (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:https://your-domain.com/gtm.js?id=GTM-XXXXXXTag NOT served via GTG:https://www.googletagmanager.com/gtm.js?id=GTM-XXXXXX

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

The script name may have been customized. GTG allows you to change the name of the container file (default gtm.js). If this name has been changed, searching the source code will yield nothing. In this case, use the Network + Initiator method described below.

In the browser Network tab

  1. Open the 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 of 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

Special case: custom container name

GTG allows you to change the container file name (default gtm.js). If you have customized this name — or if you don't know whether it has been modified — searching for gtm.js in the Network tab will return no results. Here's how to proceed in this case:

Note: Axeptio cannot automatically detect if GTG is activated — there is no public API for this. This verification is therefore always manual.

Step 1 — Verify the tag's original URL

If the tag is served from a URL starting with https://www.googletagmanager.com/, GTG is not activated. You can stop here.

If the loading URL is different (own domain or unknown), proceed to the next step.

Step 2 — Identify the network request of the tag in question

  1. Navigate the site and open developer tools (F12 or Cmd+Option+I).

  2. Go to the Network tab.

  3. Identify an HTTP request emitted by the tag in question. For Google Analytics (GA4), filter for example on the word collect — GA4 data collection requests contain this term.

⚠️ This step is the trickiest. The request may be partially obfuscated depending on tag configuration. If you can't find it, search for requests to Google Analytics or Google Ads domains (analytics.google.com, google-analytics.com, doubleclick.net).

Step 3 — Trace back to the initiating URL

  1. Click on the request identified in step 2.

  2. Open the Initiator tab.

  3. The call stack displays the chain of calls that triggered this request. Trace back to the source script: this is the one corresponding to the tag loaded via GTG (or not).

If this source script is served from your own domain (and not googletagmanager.com), GTG is activated for this tag.

In the Google Tag Manager interface

  1. From the GTM home page, click on the Google tags tab.

  2. Click on the Google tag in question.

  3. In the left menu, go to Admin → Google tag gateway.

  4. A panel opens with a Domains table. Look at the Status column: - First-party → GTG is active for this domain - Not started → GTG is not yet configured for this domain

If your domain does not appear in this table at all, GTG is not activated.

What to do with this result?

  • If none of your Google tags are served via GTG: no GTG action needed. Continue using Axeptio as you do 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 use GTG

Axeptio helps you detect late consent issues

Shake — Google Consent Mode Check automatically performs one site scan per month to detect late consent issues. Available to all Axeptio customers.

  • Results are visible directly from your back-office, in the Google Consent Mode Check section.

  • A PDF report is sent automatically at the end of each scan.

  • It is not possible to manually trigger a scan before the next 30-day deadline.

Shake does not detect GTG directly (no public API allows this), but it identifies problematic symptoms (late consent, missing signals) and guides you toward actions to take.

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

Late consent issues related to GTG are caused by a tag loading order that is beyond 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 integration recommendations and you do not observe late consent — no action is required, your configuration is compliant.

If you use 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 by sending cookieless pings (limited measurement). Once consent is obtained, full measurement resumes; if consent is denied, only cookieless pings are retained.

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

  • Enable Data Transmission Controls in your Google tag settings according to your needs — Google documentation

  • Global Consent Defaults are automatically managed by Axeptio.

Why this option is recommended:

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

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

Points to note:

  • Verify that your Google tags support advanced mode.

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

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

📖 For detailed configuration of advanced Consent Mode with Axeptio, consult our dedicated support article: Configure Google Consent Mode v2

Option B — Migrate all tags into a GTM container then deploy GTM via GTG

This option is for you if you don't use GTM — manual script or Axeptio CMS plugin (WordPress, Drupal, Shopify, etc.).

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

  • Enable GTG at the GTM container level, not at the individual tag level.

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

Points to note:

  • Requires implementing GTM. Axeptio must be configured with the "Consent Initialization - All Pages" trigger.

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

Option C — Manual GTG configuration

What this involves:

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

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

Points to note:

  • Requires technical expertise on the server/CDN side.

  • Loading order is entirely your responsibility — a configuration error can reintroduce the problem.

  • See Google documentation for manual configuration.

Quick decision matrix

Situation

Recommended option

You want the most robust and easiest to maintain solution

Option A — Advanced mode

You don't use 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 to maintain full control without changing consent mode

Option C — Manual GTG

You don't know where to start

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

Consent in regions where the banner is not displayed

This section is relevant to you if you have configured Axeptio to restrict banner display to certain regions (for example, EEA only, via a geographic exclusion zone) and you are following Option A (advanced consent mode).

What happens when a visitor arrives from an excluded region

When Axeptio is configured with a geographic exclusion zone, visitors outside this zone do not see a banner. In this case, Axeptio automatically emits a consent update: granted signal for all four consent types (ad_storage, analytics_storage, ad_user_data, ad_personalization) upon page load, without waiting for interaction.

This behavior ensures measurement continuity: Google tags need a consent signal even in regions where no banner is displayed. Axeptio handles this automatically — no additional configuration is needed on your part.

Prerequisite: this automatic behavior requires the Consent Mode v2 screen to be enabled in your Axeptio banner. Without this screen, Axeptio cannot emit any consent signal, even granted. → Configure Google Consent Mode v2

Important: Axeptio must be loaded on all pages, including in excluded regions

For the granted signal to be emitted, Axeptio must be loaded on the page even in regions where the banner is hidden. If your implementation conditions Axeptio loading based on the visitor's region (for example by removing the script tag for visitors outside EEA), no consent signal will be sent and Google tags will function without consent state — which is not compliant.

The correct pattern is as follows: load Axeptio on all pages, configure the exclusion zone in Axeptio settings, and let Axeptio hide the banner while emitting the consent signal.

Relationship with Data Transmission Controls and Global Consent Defaults

Data Transmission Controls (DTC) and Global Consent Defaults (GCD) are parameters configured directly in Google Ads, Google Analytics, or Google Tag Manager. They control the behavior of Google tags while awaiting or after receiving a consent signal — but they do not themselves produce a consent signal. It is always Axeptio that emits it.

Concretely:

  • DTC and GCD work correctly only if Axeptio is loaded and emits signals on all pages.

  • If you have set global GCD to denied for all regions as a safety measure, the granted signal emitted by Axeptio for regions without a banner will indeed override this default — this is the correct and expected behavior.

Appendix — References and documentation

Axeptio documentation

Google documentation

The Google pages above are the authoritative sources. In case of any discrepancy, Google pages are authoritative.

Did this answer your question?