Title: Script blocking and Elementor pro
Last modified: October 29, 2024

---

# Script blocking and Elementor pro

 *  [Just_a_girl](https://wordpress.org/support/users/just_a_girl/)
 * (@just_a_girl)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/script-blocking-and-elementor-pro/)
 * I enabled script blocking without adding any blocked scripts. Then went to Elementor-
   > custom code to enter my gtag.js. I got a message that wouldn’t allow me to 
   save the cusom code that appeared as it could be from the pressidium cookie consent
   plugin. ( I was not able to reproduce this, so I am not sure if it was actually
   this pluggin causing it)
   Then I went back into the pressidium settings, disabled
   script blocking and was able to update the custom code in Elementor with my gtag.
   js. I went back to pressidium, enbled script blocking and added blocked script
   [https://www.googletagmanager.com/gtag/js](https://www.googletagmanager.com/gtag/js)
   However, it is not blocking the google analytics script and I see the google 
   analytics cookies are being stored in the browser
    -  This topic was modified 1 year, 7 months ago by [Just_a_girl](https://wordpress.org/support/users/just_a_girl/).

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

 *  Thread Starter [Just_a_girl](https://wordpress.org/support/users/just_a_girl/)
 * (@just_a_girl)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/script-blocking-and-elementor-pro/#post-18103493)
 * I’ve also just tried to enter the gtag.js into my Elementor header as a HTML 
   section and adding it directly to the theme header.php file, but no luck blocking
   it on the pageload before giving any consent.
    -  This reply was modified 1 year, 7 months ago by [Just_a_girl](https://wordpress.org/support/users/just_a_girl/).
 *  Thread Starter [Just_a_girl](https://wordpress.org/support/users/just_a_girl/)
 * (@just_a_girl)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/script-blocking-and-elementor-pro/#post-18103717)
 * It seems the issue is with speed optimizer by siteground.
   I’m not able to exclude
   block-scripts.js as it is not on the lists of scripts I can exclude from javascript
   minification. It only detects consent-mode.js and bundle.client.js
 * Any suggestions?

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

The topic ‘Script blocking and Elementor pro’ is closed to new replies.

 * ![](https://ps.w.org/pressidium-cookie-consent/assets/icon-256x256.png?rev=2928033)
 * [Pressidium Cookie Consent](https://wordpress.org/plugins/pressidium-cookie-consent/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pressidium-cookie-consent/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pressidium-cookie-consent/)
 * [Active Topics](https://wordpress.org/support/plugin/pressidium-cookie-consent/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pressidium-cookie-consent/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pressidium-cookie-consent/reviews/)

 * 2 replies
 * 1 participant
 * Last reply from: [Just_a_girl](https://wordpress.org/support/users/just_a_girl/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/script-blocking-and-elementor-pro/#post-18103717)
 * Status: not resolved