Support Forum › Support Forum › GDPR Cookie Compliance › metapixel is not blocked
- AuthorPosts
- November 04, 2022 @ 7:16 am
Hi,
I have added code bellow in the function.php but it does not block meta pixel (Meta pixel for WordPress -plugin) to be loaded.
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’ );Moove Agency
November 07, 2022 @ 11:22 amHello,
Thanks for using our plugins.
We checked the Meta pixel plugin source code and there are no filters used on this plugin so we can’t hook into it and enhance its functionality.
However, in your message you posted, you are using our WooCommerce Facebook Pixel hook which is related to a different plugin: https://wordpress.org/plugins/facebook-for-woocommerce/
So, if you were meant to really use the Meta pixel (and not the WooCommerce Facebook pixel), there are the following options left:
1) You can ask the Meta Pixel developers to implement a filter for tracking script.
Once done, we can create a function to manage their tracking scripts based on cookie value.2) You can remove the meta plugin and insert the Facebook pixel tracking script directly via our GDPR plugin in a standard way.
Hope this helps.
- AuthorPosts
The topic ‘metapixel is not blocked’ is closed to new replies.