To handle GDPR compliance, there are have two options:

  1. Using the free ezoic TCF 2.0 consent management platform (Recommended)
  2. Connect to an existing TCF 2.0 consent management platform

To learn more about GDPR and how Ezoic comes into play, feel free to checkout this support article!

  1. Add the following script to the head of your website before any ad / tracking code.
1<script src="" data-cfasync="false"></script>
Warning: This code must not be delayed, otherwise personal information might be processed before consent is given.

Customizing the ezoic CMP

The ezoic CMP can be customized by visiting the privacy section within the ezoic dashboard.

Connecting a third party CMP

Handling third party GDPR settings will take some extra code. Many CMPs will have their own callbacks defined in their documentation that are called when consent is rendered, and it is advised that the CMP’s recommended method of listening for consents is used.

Mainly, standalone needs to know whether to allow personalized ads and the ability to use personalized statistics (specified by ezstandalone.setDisablePersonalizedStatistics and ezstandalone.setDisablePersonalizedAds).

In the code below, we show how to integrate standalone code into a CMP using IAB’s TCF V2 API for GDPR:

For a third party CMP that is using IAB's TCF V2 API, use the ezstandalone.enableConsent() function before calling enable and display. The enableConsent function only needs to be called once for ezstandalone. In other words, if displaying additional placeholders via displayMore or refresh, enableConsent does not have to be called again. Only use if there is a CMP on the page.

 2    var ezstandalone = window.ezstandalone || {};
 3    ezstandalone.cmd = ezstandalone.cmd || [];
 4    ezstandalone.cmd.push(function() {
 5        ezstandalone.enableConsent();
 6        ezstandalone.define(101, 102);
 7        ezstandalone.enable();
 8        ezstandalone.display();
 9    });