Self-hosted cookieconsent (v3.1.0) for KPI Creatives and its properties.
Add this before </head>:
<!-- 1. Google Consent Mode v2 defaults (sync, before any gtag.js) -->
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('consent', 'default', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied',
'functionality_storage': 'denied',
'personalization_storage': 'denied',
'security_storage': 'granted',
'wait_for_update': 500
});
</script>
<!-- 2. Your GA4 / Google Ads (after defaults) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX"></script>
<script>gtag('js', new Date()); gtag('config', 'G-XXXXXXX');</script>
<!-- 3. KPI Creatives CMP -->
<script src="https://cmp.kpicreatives.com/v1/embed.js" defer></script>
<a href="#" onclick="CookieConsent.showPreferences(); return false;">Cookie settings</a>
This page itself has the CMP running — click below to open the preferences modal:
/v1/ — cookieconsent v3.1.0 (current)© KPI Creatives. MIT-licensed components by Orest Bida.