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>

Privacy Team & Role Management: Our Governance Solution
Privacy compliance failures often happen because of unclear responsibilities rather than technical problems. When team members don't have defined roles, important tasks get missed while compliance requirements remain unmet.
- Legal & News
- Data Protection
- LATAM
- Chile

Chile's New Data Protection Law: 2025 Compliance Guide for Businesses
Chile has changed its data protection laws completely with the new Law No. 21,719, replacing a 25-year-old privacy system with a modern GDPR-style regulatory structure. This important legislation becomes fully active on December 1, 2026, creating major compliance duties for organizations around the world.
- Legal & News
- Data Protection
- LATAM
- Chile

Mexico Privacy Law (LFPDPPP): A 2025 Guide to Compliance
Companies operating in Mexico face major changes to privacy laws after significant updates to the Federal Law on Protection of Personal Data Held by Private Parties in 2025. These changes bring stricter compliance rules and large penalties reaching millions of pesos for Mexico privacy law violations.
- Legal & News
- Data Protection
- Mexico