• Resolved Giovanni Invernizzi

    (@paperplanenan)


    Hello,
    my issue is about using preload function (making a static html version of pages) and giving the visitor the ability to accept (or not) cookies that need to be blocked for GDPR compliance.

    In WP Fastest Cache tab “Exclude” I’ve set this rule:
    If cookie contains -> “cookie_notice_accepted”
    And in my theme I’ve this function:

    add_action( 'wp_head', 'gdpr_tracking_codes');
    function gdpr_tracking_codes() {
      if ( function_exists('cn_cookies_accepted') && cn_cookies_accepted() ) {
        // scripts here
      }
    }

    So the issue is that if a user accepts (or not) a cookie is set and the page is not preloaded anymore.
    Does anyone know a workaround or a better solution?

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WP Fastest Cache + Cookie Notice for GDPR’ is closed to new replies.