Search
Close this search box.

Documentation

In this article

Categories

Recent articles

Changing JavaScript for Consent Purposes

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.

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:

Join 900.000 users and install The Privacy Suite for WordPress locally, automated or fully customized, and access our awesome support if you need any help!

Complianz has received its Google CMP Certification to conform to requirements for publishers using Google advertising products.