COOKIES. CONSENT. COMPLIANCE
secure privacy badge logo
June 23, 2019

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.

  1. 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.
  2. On script tags change the attribute 'type' from 'text/javascript' to 'text/plain'.
  3. 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>

image

iOS vs tvOS Consent Management: Key Differences for Privacy Compliance

Your development team builds Apple apps for both iPhone and Apple TV platforms — then you discover consent management requirements differ fundamentally between devices. iOS vs tvOS consent management transforms privacy compliance from a straightforward SDK integration into a multi-platform challenge, requiring separate UX strategies, storage architectures, and technical approaches for each environment.

  • Legal & News
  • Data Protection
image

How Android TV Consent Differs from Mobile Apps (and How to Stay Compliant)

Your development team builds Android apps for both mobile and TV platforms — then you discover consent management requirements differ fundamentally between devices. The difference between Android mobile consent management and Android TV consent management transforms compliance from a straightforward SDK integration into a multi-platform challenge, requiring separate UX strategies, identifier handling, and technical architectures for each environment.

  • Legal & News
  • Data Protection
image

Cookieless Tracking Technology: Privacy-First Analytics for 2025

Your marketing team relies on analytics to measure campaign performance, optimize conversions, and understand customer journeys — then you discover third-party cookies are disappearing across all major browsers. Cookieless tracking technology transforms this digital marketing crisis from a measurement blackout into an opportunity, enabling accurate analytics and personalization without third-party cookies while maintaining GDPR compliance.

  • Legal & News
  • Cookie Consent