From dee7801d1b8462da568d4bb5add5e1b8716c3105 Mon Sep 17 00:00:00 2001 From: Andrea Vos Date: Sun, 11 Sep 2022 00:42:20 +0200 Subject: [PATCH] [ads] add the other ezoic consent code --- components/CookieConsent.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/CookieConsent.vue b/components/CookieConsent.vue index 75405d043..8a318ef80 100644 --- a/components/CookieConsent.vue +++ b/components/CookieConsent.vue @@ -84,6 +84,12 @@ export default { ezstandalone.setIsPWA(); ezstandalone.setDisablePersonalizedStatistics(!this.consent); ezstandalone.setDisablePersonalizedAds(!this.consent); + if (typeof ezConsentCategories === 'object' && typeof __ezconsent === 'object') { + window.ezConsentCategories.preferences = this.consent; + window.ezConsentCategories.statistics = this.consent; + window.ezConsentCategories.marketing = this.consent; + __ezconsent.setEzoicConsentSettings(window.ezConsentCategories); + } ezstandalone.define(Object.values(adPlaceholders)); ezstandalone.enable(); ezstandalone.display();