Facebook for WooCommerce is the official WordPress plugin from Facebook that connects your WooCommerce website to Facebook. With this plugin you can install the Facebook Pixel, upload your online shop catalogue and create a shop on your Facebook page, which allows you to easily display dynamic ads. In this article, we show you how you can use Borlabs Script Blocker to block the cookie and get permission to use the plugin on your website in accordance with the GDPR. Let's get started.
Step 1: Add Script Blocker
From the Borlabs Cookie menu, click Script Blocker, then click Add New.
DEFINE PAGE AND SEARCH PHRASE
To make work easier, enter the words connect.facebook.net and wc-facebook-pixel-event in the Search phrases field and separate both words with a comma.
After your page has been scanned and you have clicked Next, you must set an ID and Name for your Script Blocker.
For ID enter facebook and as name Facebook. You can set the Status to ON right away.
Click on Create Script Blocker to create the Script Blocker.
Step 2: Create Cookie
It's nearly done. Click on Cookies in Borlabs Cookie and then on Add New in the Cookie Group Marketing.
In Services, you now select Facebook Pixel and click Next.
Borlabs Cookie fills in all necessary data. Scroll down to Additional Settings and enter something in the Pixel ID field. This field is mandatory, but we don't need it.
Under Opt-in Code, insert the code (remove the existing code first) that you have just copied from the For Cookies field in the Script Blocker.
In the field Fallback Code insert the following code:
Click on Save all settings. Done.
Facebook Pixel is now initially blocked and only if the visitor agrees to the Cookie for Facebook, Facebook Pixel is unblocked and tracking takes place.