How to block cookies and trackers with JavaScript rewrite
This guide explains you how to block cookies and plugins with Secure Privacy using Javascript rewrite.
To block cookies and trackers you need to change the attributes of the script tags on your website. Follow these steps to change the attributes.
- Apply the attribute sp-consent="PLUGIN NAME" to the script/image tags on your website. Depending on where you have installed the plugins, this may be inside a module, plugin or directly on your website. Make sure that you write the exact plugin name, which appears on your Scan Report.
- On script tags change the attribute 'type' from 'text/javascript' to 'text/plain'.
- If you are using a pixel tracker (image trackers), then change the attribute “src” from “src” to “data-src”.
Here is an example of how it would look after you have modified a Google Analytics script.
Normal script tags look like this:
<script type="text/javascript"> code…
</script>
Using script type re-writing, you need to change the scripts to:
<script type="text/plain" sp-consent="Google Analytics"> code…
</script>

What Is a Privacy Program? Complete Guide for 2026
You're collecting more data than ever. Your marketing team tracks conversions. Your product logs user behavior. Your sales CRM stores customer details. And somewhere in legal, someone's fielding data access requests with a spreadsheet and prayer.
- Legal & News
- Data Protection

Global Cookie Consent Trends 2026: What You Need to Know
Cookie consent will change dramatically by 2026. The European Commission wants to require one-click reject buttons. Regulators worldwide are cracking down on dark patterns. And despite wide adoption, 67% of Consent Mode v2 setups fail to meet compliance standards. These changes are happening right now and impacting how companies collect consent across different regions, platforms, and devices.
- Legal & News
- Data Protection

GDPR Compliance in 2026: The Complete Guide
If your organization processes EU resident data, you need to understand what changed between 2024 and 2026, how emerging technologies like AI create new compliance obligations, and which automation tools transform manual processes into scalable systems. The regulatory landscape no longer tolerates reactive compliance approaches.
- Legal & News
- Data Protection
- GDPR