Privacy
GDPR
To handle GDPR compliance, there are two options:
- Using the free Ezoic TCF 2.2 consent management platform (Recommended)
- Connect to an existing TCF 2.2 consent management platform
To learn more about GDPR and how Ezoic comes into play, feel free to checkout this support article!
Using the Ezoic CMP (Recommended)
- Add the following script to the head of your website before any ad / tracking code.
1<script src="https://the.gatekeeperconsent.com/cmp.min.js" data-cfasync="false"></script>
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, Ezoic 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 the code snippet 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.
1<script>
2 var ezstandalone = window.ezstandalone || {};
3 ezstandalone.cmd = ezstandalone.cmd || [];
4 ezstandalone.cmd.push(function() {
5 ezstandalone.enableConsent();
6 ezstandalone.showAds(101, 102);
7 });
8</script>