Optimize GTM Web
Mis à jour
One of the main advantages of Sirdata's server-side infrastructure is the ability to load the Google Tag Manager (GTM) Web script directly from your server-side host. This method allows you to:
Bypass ad blockers that traditionally block GTM scripts
Bypass Safari private browsing restrictions on iOS, which limit third-party tracking
When loading GTM Web from the server-side host, several optimization options are available:
This option loads the CMP (Consent Management Platform) directly from the GTM Web script, which optimizes Consent Mode. Consent signals are available earlier in the page lifecycle, improving the accuracy of tag conditioning.
This option optimizes event sequences in the dataLayer. By reordering dataLayer entries before GTM initialization, it ensures that:
Data declarations come first
CMP consent events are processed before tag triggers
The gtm.js start signal is correctly positioned
This notably prevents "Not Set" data issues in GA4, which occur when tags fire before configuration variables are available.
This option delays GTM execution until the user's consent choice is known (either retrieved from a previous session or after an explicit user action on the CMP).

The trade-off: a slight delay in GTM execution. Since the GTM script is preloaded (<link rel="preload">), the execution delay after the consent signal is negligible.
The immense advantage: when GTM executes after the consent choice is known, tag conditioning is greatly simplified. You can simply use the built-in tag conditioning, based on Google Consent Mode V2.
In GTM, go to your tag configuration, then in the Consent Settings (BETA) section → Additional Consent Checks → select Require additional consent for tag to fire.

You can specify the required consents, for example:
ad_storage — required for advertising tags
ad_personalization — required for ad personalization
You can add additional conditions as needed.
Mis à jour