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 American Privacy Rights Act: The Federal US Data Privacy Bill's Essentials
Discover the ins and outs of the American Privacy Rights Act (APRA), a proposed federal privacy law in the US. Learn about its implications for businesses, compliance obligations, consumer rights, and how it compares to existing regulations.
- USA
Understanding the New Zealand Privacy Act 2020 and Its Information Privacy Principles
Explore the intricacies of the New Zealand Privacy Act 2020, its Information Privacy Principles, and their impact on businesses. Learn about compliance requirements, consumer rights, and enforcement mechanisms.
EDPB Opinion on Meta "Pay or Okay" and What It Means for Your Operations in the EU
Dive into the European Data Protection Board's (EDPB) opinion on Meta's 'Pay or Okay' model and its ramifications for businesses in the EU. Understand the requirements, alternatives, and potential impacts on large online platforms and media publishing businesses.
- Europe GDPR