[Snippet] GDPR Opt-out for Facebook for WooCommerce Plugin

If you are using the official Facebook for WooCommerce plugin, you may have recognized that it does not allow you to select if you want to use the Facebook Pixel on your store. It forces you to enable the pixel in order to also use its catalog synchronization feature.
For privacy and legal reasons, you may want to allow your visitors to opt-out of Facebook tracking. The following snippet will provide you with the needed functionality.

How to make this snippet work?

  • copy/paste the full snippet code to your child theme’s functions.php
  • put a clickable element (opt-out link) to your website (usually in the privacy policy) and add the ID “fb-opt-out” to the element

Example opt-out link code:

Get the Snippet

Find this snippet on Github.

Need Help?

Please let us know in the comments if the snippet does not work for you or if you need any help.

Share on whatsapp
Share on email
Share on facebook
Share on twitter
Share on linkedin

About the author


Join the discussion about ‘GDPR Opt-out for Facebook for WooCommerce Plugin’

Leave a Reply