• “gdpr[allowed cookies]” Array question…

    When looking at the “gdpr[allowed cookies]”cookie Array in browser’s inspector > Storage > Cookies …

    Are the cookies listed in the array the actual cookies being used? They are not listed as actual, separate cookies in the inspector… they are only listed in the array. I can see the cookies in the *array* toggle on and off with the Cookies Used: ON or OFF in the Privacy Preference Center, but the cookies do not appear otherwise in the inspector. Is this expected behavior? I’m not sure if only the array is changing here.

    I have 3 cookies… _gat_gtag_UA_XXXXXXXXX_X, _gid, _ga …set as cookies used for Analytics section, with their Status set to: Checked

    Necessary cookies are set as: gdpr[allowed_cookies], gdpr[consent_types] with their Status set to : Required

    As per the KB, I’m using this in functions.php :

    add_action( 'wp_head', 'my_google_opt_out' );
    function my_google_opt_out() {
      if ( ! is_allowed_cookie( '_ga' ) ) {
        ?>
        <script>
          window['ga-disable-UA-XXXXXXXXX-X'] = true; // Don't forget to replace X for your actual UA numbers.
        </script>
        <?php
      }
    }

    Thanks fo any advice here.

  • The topic ‘gdpr[allowed cookies]: Array cookie question’ is closed to new replies.