Cloudflare cache and fb pixel disable
-
Hi the`re, I am using your plugin with cloudflare caching.
I am using this code snippet that you suggested in a previous topic:add_filter('gdpr_cookie_script_cache','gdpr_prevent_script_cache'); function gdpr_prevent_script_cache() { return array(); } add_filter('facebook_for_woocommerce_integration_pixel_enabled', 'gdpr_cookie_facebook_wc', 20); function gdpr_cookie_facebook_wc() { $enable_fb_wc = true; if ( function_exists( 'gdpr_cookie_is_accepted' ) ) : $enable_fb_wc = gdpr_cookie_is_accepted( 'thirdparty' ); endif; return $enable_fb_wc; } add_action( 'gdpr_force_reload', '__return_true' );
to disable FB pixel when users rejects third party plugin.
The problem is this works as long as I disable cloudflare caching.
When I enable it, the website returns the same cached version of the website with the pixel code, regardless of the user setting.
Any idea of a possible workaround ?Thanks you!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Cloudflare cache and fb pixel disable’ is closed to new replies.