Title: External scripts loaded before consent
Last modified: March 1, 2025

---

# External scripts loaded before consent

 *  Resolved [baumannmusic](https://wordpress.org/support/users/baumannmusic/)
 * (@baumannmusic)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/external-scripts-loaded-before-consent/)
 * Hi all, I just installed Complianz on my clients website. In the wizzard I chose
   that Analytics should be integrated via GTM and I entered the GTM ID. To my surprise
   when I check the website in another browser, I see that GTM (a 3rd party script)
   is loaded already before any consent is given. Also the GTM service is not even
   mentioned in the _Cookie Policy_ page created by Complianz. Any ideas how to 
   load GTM after user consent and not before? Thanks!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fexternal-scripts-loaded-before-consent%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Support [leonardoiub](https://wordpress.org/support/users/leonardotamion/)
 * (@leonardotamion)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/external-scripts-loaded-before-consent/#post-18338813)
 * Hello,
 * thanks for your message.
 * After having installed the GTM script through our plugin have you followed [this guide](https://complianz.io/definitive-guide-to-tag-manager-and-complianz/)
   to correctly setup your GTM container?
 *  Thread Starter [baumannmusic](https://wordpress.org/support/users/baumannmusic/)
 * (@baumannmusic)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/external-scripts-loaded-before-consent/#post-18339524)
 * I followed step 1 and 2 of the guide. The triggers and tags will be setup by 
   our ads team. We do not need to import a container preset. Anyhow our main problem
   is, that tag manager is loaded prior to consent and I cannot find any option 
   to avoid this.
 *  Thread Starter [baumannmusic](https://wordpress.org/support/users/baumannmusic/)
 * (@baumannmusic)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/external-scripts-loaded-before-consent/#post-18339641)
 * We have now found a workaround. We deactivated GTM+Analytics integration in the
   wizard and added the GTM code manually via a custom script in the script center
   which is categorized in statistics and only loaded with consent given.
 *  Plugin Support [Antonio Candela](https://wordpress.org/support/users/antoiub/)
 * (@antoiub)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/external-scripts-loaded-before-consent/#post-18347913)
 * Hi [@baumannmusic](https://wordpress.org/support/users/baumannmusic/) ,
   What 
   you experienced, it is normal because our Cookie Solution does not delete cookies,
   but rather “blocks” the script that generates them at the source. This means 
   that the cookies you see are present in the browser cache, but they no longer
   perform their profiling function because the script that uses them is blocked
   upon rejection. Also consider that if your ADS team applied the correct triggers
   in your GTM workspace, you should not worry about whether a connection is established
   before consent, as the Complianz cookie categories will act as the main trigger
   for those tags.
 * You can easily check this from the “Network” tab of your development tools: upon
   rejecting cookies, if you refresh the page, the script that generates the cookie
   in question is blocked and does not appear in the list of scripts loaded by the
   page.
   But, if you prefer your workaround, please feel free to use it. Enhancing
   personal preferences is always a great thing!I hope this clarifies your doubts.
   Best regards, Antonio

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘External scripts loaded before consent’ is closed to new replies.

 * ![](https://ps.w.org/complianz-gdpr/assets/icon-256x256.png?rev=2881064)
 * [Complianz - GDPR/CCPA Cookie Consent](https://wordpress.org/plugins/complianz-gdpr/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/complianz-gdpr/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/complianz-gdpr/)
 * [Active Topics](https://wordpress.org/support/plugin/complianz-gdpr/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/complianz-gdpr/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/complianz-gdpr/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Antonio Candela](https://wordpress.org/support/users/antoiub/)
 * Last activity: [1 year, 2 months ago](https://wordpress.org/support/topic/external-scripts-loaded-before-consent/#post-18347913)
 * Status: resolved