The Google Tag Manager is loaded immediately on page load. However, it does not send any events unless the user has allowed cookies. GTM is only activated after the user gives consent via the cookie banner, in compliance with GDPR and other privacy regulations.

 

This is the Advanced Consent Mode that we implemented, as referenced in the link.

When you implement consent mode in its advanced version, Google tags load when a user opens the website or app. The tags load the consent mode API and do the following:

1. Set default consent states. By default, consent may be denied, unless you set your own defaults. While consent is denied, the Google tags send cookieless pings.

2. Wait for user interaction with the banner and update consent states. Only when a user grants consent to data collection, Google tags send the full measurement data. 

 

Ref: https://developers.google.com/tag-platform/security/concepts/consent-mode