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

Data Broker Registration Explained (2026): How to Register Under U.S. Privacy Laws

Data brokers occupy a peculiar position in the privacy landscape: they are often the most consequential handlers of personal information that consumers have never heard of. A person may carefully manage what they share with their bank, their employer, and the apps on their phone — and still find their name, home address, income range, health interests, and browsing behavior for sale across hundreds of databases they never interacted with.

  • Legal & News
  • Data Protection
image

EU AI Act Implementation Sprint: A 90-Day Playbook for Enterprise Compliance

The EU AI Act is no longer a regulation on the horizon. Prohibited AI practices have been enforceable since February 2025. General-purpose AI obligations have applied since August 2025. And on 2 August 2026 — five months from now — the full weight of high-risk AI system requirements under Annex III comes into force, bringing with it a penalty structure that exceeds even the GDPR: up to €35 million or 7% of global annual turnover for the most serious violations, and up to €15 million or 3% for non-compliance with high-risk obligations.

  • AI Governance
image

React Native Consent SDK: Implement Mobile Consent Management

Adding a consent banner to a React Native app is straightforward. Implementing consent management that actually controls data collection — where no third-party SDK fires a network request before the user has responded, where consent state persists correctly across sessions, and where every decision is logged for regulatory audit — is a different engineering problem.

  • Mobile Consent