I must add consent mode code or not?
-
Hi, I need to use consent mode describer here https://www.iubenda.com/en/help/27137-google-consent-mode I need to add this code
<script> // Initialize the data layer for Google Tag Manager (this should mandatorily be done before the Cookie Solution is loaded) window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } // Default consent mode is "denied" for both ads and analytics, but delay for 2 seconds until the Cookie Solution is loaded gtag("consent", "default", { ad_storage: "denied", analytics_storage: "denied", wait_for_update: 2000 // milliseconds }); // Further redact your ads data (optional) gtag("set", "ads_data_redaction", true); </script>
but I do not understand if your plugin write this code or I need to add this code on functions.php using ad hook?
thanks
- The topic ‘I must add consent mode code or not?’ is closed to new replies.