• Hi,

    can you please help me how to adjust Consent Mode v2.

    This is the instruction how to adjust the Consent Mode v2:

    https://developers.google.com/tag-platform/security/guides/consent?consentmode=advanced#update-consent

    Can you please tell me which code should i integrate for funkctional consent mode v2.

    This is the example code:

    <script>
    // Define dataLayer and the gtag function.
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}

    // Set default consent to 'denied' as a placeholder
    // Determine actual values based on your own requirements
    gtag('consent', 'default', {
    'ad_storage': 'denied',
    'ad_user_data': 'denied',
    'ad_personalization': 'denied',
    'analytics_storage': 'denied'
    });
    </script>
    <!-- Google tag (gtag.js) -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=TAG_ID">
    </script>
    <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}

    gtag('js', new Date());
    gtag('config', 'TAG_ID');
    </script>

    <!-- Create one update function for each consent parameter -->
    <script>
    function consentGrantedAdStorage() {
    gtag('consent', 'update', {
    'ad_storage': 'granted'
    });
    }
    </script>
    <!-- Invoke your consent functions when a user interacts with your banner -->
    <body>
    ...
    <button onclick="consentGrantedAdStorage">Yes</button>
    ...
    </body>

    Thank you,

    Darko Pe?anac

    https://www.zadarko.hr

    The page I need help with: [log in to see the link]

  • You must be logged in to reply to this topic.