Avada Forums Community Forum Disable Tracking of Facebook for Woocommerce Plugin with Avada Privacy Bar

Viewing 1 post (of 1 total)
  • Author
  • helmutsteiner
    Post count: 3

    Facebook for Woocommerce adds a tracking pixel/code to WordPress which is not handled by Avada privacy options. There is code available for another cookie notice plugin to add to functions.php file to disable the tracking until the user accepts cookies:

     * Only load the Facebook pixel tracking scripts if the Cookie Notice has been accepted.
     * If Cookie Notice is not active, or the customer has not accepted, the scripts will not load.
    function check_cn_has_been_accepted( $is_enabled ) {
        if ( function_exists('cn_cookies_accepted') && cn_cookies_accepted() ) {
            return true;
        return false;
    add_filter( 'facebook_for_woocommerce_integration_pixel_enabled', 'check_cn_has_been_accepted', 10, 1 );

    See https://gist.github.com/simonporter007/8b8374502430d330f00c28e398f42019 and https://wordpress.org/support/topic/disable-facebook-pixel-until-cookies-are-accepted for reference.

    What’s the proper function to call instead of cn_cookies_accepted in the code above or how can I disable the tracking in Avada?

    Any help is much appreciated!

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.