Title: Blocking 3rd party scripts
Last modified: March 19, 2024

---

# Blocking 3rd party scripts

 *  Resolved [devmvo](https://wordpress.org/support/users/devmvo/)
 * (@devmvo)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/blocking-3rd-party-scripts/)
 *     ```wp-block-code
       Hello,
       I'm trying to remove tawk chat and Mailerlite pop-up which is fired without consent.
   
       1. I added both into Cookiedatabase.org - Cookie descriptions from Wizard.
       2. I tried to add a script into Script Center for Tawk.to:
       document.addEventListener('DOMContentLoaded', function() {
         var scripts = Array.from(document.getElementsByTagName('script'));
         scripts.forEach(function(script) {
           if (script.src.includes('embed.tawk.to')) {
             script.type = 'text/plain';
           }
         });
       });
   
       But it doesn't work. Hopefully you will be able to see my mistakes.
   
       Premium subscription
   
       NOTE: writing a message directly from WordPress is not sent.
       ```
   

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Jarno Vos](https://wordpress.org/support/users/jarnovos/)
 * (@jarnovos)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/blocking-3rd-party-scripts/#post-17513906)
 * Hi [@devmvo](https://wordpress.org/support/users/devmvo/),
 * You can add the Tawk script on your site as you would normally do, and then tell
   Complianz to block this script by using the **“Block a script, iframe or plugin”**
   field under _Complianz -> Integrations -> Script Center_.
 * In the case of Tawk, you can enter `Tawk_API` as the “URL that should be blocked
   before consent”. You should end up with [a configuration like this (screenshot).](https://i.ibb.co/5rYxJFj/Scherm-afbeelding-2024-03-20-om-08-05-49.png)
 * After which the Tawk script will only be loaded after accepting the banner.
 * Kind regards, Jarno

Viewing 1 replies (of 1 total)

The topic ‘Blocking 3rd party scripts’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jarno Vos](https://wordpress.org/support/users/jarnovos/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/blocking-3rd-party-scripts/#post-17513906)
 * Status: resolved