The Privacy Suite for WordPress

Changing JavaScript for Consent Purposes

Get compliant today in the European Union, United States, Canada, United Kingdom, Australia & South Africa with the only Privacy Suite for WordPress that offers a fully-featured plugin for Worldwide Compliance.

You might need to add JavaScript to your website, only it should only be trigger when a certain type of consent has been given. There are 3 options:

  1. Add the JavaScript snippet to our Script Center. Either in the first snippet box or, if you have an asynchronous snippet, you can use the second snippet box.
  2. Use Google Tag Manager for this purpose. You can use the Complianz event triggers for this purpose.
  3. Add JavaScript however you like, but change the actual snippet to adjust for Complianz.

We will discuss option number 3 in this article.

Before we start. We removed the <> from all script tags so we can show the code. Please remember when trying to copy/paste our example.

Changing the snippet so Complianz won’t block before consent.

If you want to tell Complianz it should not block your javascript add the following property:

Changing the snippet so Complianz will activate on Statistics.

If you want to tell Complianz it should block your javascript until consent for statistics is set use:

Changing the snippet so Complianz will activate on Marketing.

If you want to tell Complianz it should block your javascript until consent for marketing is set use:

For example, a Facebook pixel as shown above:

Recent articles

The Privacy Suite for WordPress
Get compliant today with the only Privacy Suite made for WordPress

Categories

Popular articles

LGPD Brazil and WordPress

The “Marco Civil” and the Brazilian General Data Protection Law (LGPD) In Complianz 5.4 we will add full support for the Civil Rights Framework for

Read More

Join our mailing list - 8 Tips & Tricks in your inbox over the next 8 weeks!