Skip to content

Enable Script Blocking & Quarantine

Last updated: March 18, 20266 min readIntermediateBrandDeveloper

Script blocking ensures that no tracking scripts execute until your visitor gives consent. Arqam360's quarantine system intercepts scripts, requests, and cookies in real time.

How It Works

When enabled, three quarantine layers protect your visitors' privacy before consent is given:

  • ScriptQuarantine — Uses MutationObserver to intercept and remove tracker <script> elements before execution
  • RequestQuarantine — Proxies window.fetch and XMLHttpRequest to queue requests to tracker domains
  • CookieQuarantine — Intercepts document.cookie setter to block non-essential cookie writes

Enable Script Blocking

1

Go to Widget settings

Navigate to Widget → Compliance Settings in your dashboard.

2

Enable 'Enforce Script Blocking'

Toggle the switch to enable quarantine mode.

3

Test thoroughly

Visit your site in incognito and verify all scripts are blocked until consent.

Bypass for Specific Scripts

javascript
<!-- Add data-consentiq-bypass to skip quarantine -->
<script data-consentiq-bypass="true" src="your-essential-script.js"></script>
Script blocking can break website functionality if not configured properly. Always test thoroughly after enabling. Essential scripts should use the data-consentiq-bypass attribute.
Use your browser's Network tab to verify that blocked requests appear only after consent is granted.

Was this article helpful?