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>

Client Consent Lifecycle Automation: Streamlining Compliance & Trust
Client consent is no longer a static checkbox buried in terms of service agreements. Modern privacy regulations demand dynamic, granular, and continuously managed consent processes that adapt to changing preferences, evolving regulations, and complex multi-channel customer interactions
- Legal & News
- Data Protection
- GDPR
- CCPA

Automated RoPA for Schools: Simplifying GDPR Compliance in Education
Your school is drowning in spreadsheets tracking student data across dozens of systems while struggling to demonstrate GDPR compliance to increasingly vigilant regulators. Manual Records of Processing Activities maintenance consume valuable staff time, create compliance gaps, and leave your institution vulnerable to privacy violations that could result in significant fines and reputational damage.
- Legal & News
- Data Protection
- GDPR
- CCPA

Consent Management API Integration: Complete Guide for Developers & Compliance Teams
Your development team is drowning in privacy requirements while struggling to implement compliant consent management across web, mobile, and server-side systems. Tag-only implementations are breaking, consent states aren't syncing, and compliance teams can't generate the audit trails regulators demand.
- Legal & News
- Data Protection
- GDPR
- CCPA