Compatibility with cookie banner plugins? (GDPR)
-
Hello,
thanks for providing the plugin!
Is there a cookie banner plugin which is compatible with Woocommerce GAnalytics integration?
I tried https://www.mooveagency.com/wordpress-plugins/gdpr-cookie-compliance/ but the tracking code is loaded via ajax (admin-ajax.php)
When I add the HTML output from tracking_code_display() to the GDPR cookie compliance hook, tracking_code_display() checks for is_admin() and aborts (because is_admin() is always true for admin-ajax.php).
https://www.ads-software.com/support/topic/gdpr-cookie-compliance-hooks-code-snippets/Right now I got this to work, but it does not work with WP Super Cache e.g.:
if (gdpr_cookie_is_accepted('thirdparty') == FALSE) { $integrations = WC()->integrations->get_integrations(); remove_action('wp_head', array($integrations['google_analytics'], 'tracking_code_display'), 999999 ); }
Thanks in advance!
Best regards,
Matthias
- The topic ‘Compatibility with cookie banner plugins? (GDPR)’ is closed to new replies.