Support » Plugin: GDPR Cookie Compliance (CCPA ready) » Facebook Pixel Opt in

  • Resolved annoy

    (@annoy)


    Hallo, sorry for my dumb Question first πŸ˜‰ I have your Plug In used and also have the Facebook for Woocommerce Plugin on my Side. So i guess i have to have an Opt In for Facebook Pixel which runs on the Side. But i really have no idea what to do to get this working, can you please help me out with that? Thank you soooo much and greetings from Germany.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Moove Agency

    (@mooveagency)

    Hi @annoy,

    Thanks for using our plugins.

    Our plugin is compatible with Facebook for Woocommerce plugin, you can add the following code snippet to your functions.php

    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' );

    Hope this helps.

    Thread Starter annoy

    (@annoy)

    Thank you very much. Ok, i have this code now placed in the Functions.php of my Child Theme. So i guess now i have to activate the Third Party Cookies in your Plugin? And than, do i have to place a code in Head, Body or Footer? Thank you very much

    Thread Starter annoy

    (@annoy)

    Or did i missed something?

    Plugin Author Moove Agency

    (@mooveagency)

    Hi @annoy,

    The code snippet was created to disable the Facebook Pixel script if the Third-Party cookies are accepted by your visitors.

    We just checked your site, and the third party cookies are not enabled in GDPR Cookie Compliance -> 3rd Party Cookies settings screen.
    You can choose ONE of the following options
    1. You can enable the 3rd party cookies and in the the “Head scripts” you can add the following script: <script></script> otherwise the validation doesn’t allow to save and turn on this cookie category. If you choose this option, the code shouldn’t be updated in your functions.php and please ignore the second code snippet.
    2. Alternatively, you can keep the implementation as it is, but the code snippet should be updated and insert the Facebook Pixel tracking code based on Strictly Necessary Cookies value:

    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( 'strict' );
      endif;
      return $enable_fb_wc;
    }
    add_action( 'gdpr_force_reload', '__return_true' );

    Hope this helps.

    Thread Starter annoy

    (@annoy)

    Yes that worked, thank you so much!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Facebook Pixel Opt in’ is closed to new replies.