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>
The Maryland Online Data Privacy Act (MODPA): The Essentials
Discover the essentials of the Maryland Online Data Privacy Act (MODPA) and its impact on businesses. Learn about data minimization principles, consumer rights, compliance requirements, and penalties.
- USA
Top Osano Alternative: Why Secure Privacy CMP is the Superior Choice in 2024
Discover why businesses are turning to Secure Privacy CMP as the superior alternative to Osano in 2024. Explore its focus on compliance, ease of use, additional features, and cost-effectiveness, empowering you to achieve comprehensive data privacy compliance without compromise.
- Cookie Consent
Best iubenda Alternative for 2024: Secure Privacy CMP
Explore why Secure Privacy CMP emerges as the superior alternative to iubenda in 2024. Learn about its focus on compliance, granular control, user insights, customization options, and dedicated support, empowering businesses to achieve robust data privacy compliance effortlessly.
- Cookie Consent