In general, the Facebook Pixel is employed to track user behavior, including page views and conversions, on your website, transmitting this data to Facebook. Utilizing the collected data, you can create custom audiences, execute remarketing campaigns, and adjust campaign targeting. This includes automatically excluding users who have performed "conversions," such as making purchases, filling out forms, or adding products to their cart.
Given the regulatory frameworks of GDPR and the cookie law, it's imperative to obtain explicit consent from users for these activities.
In this article, we'll explore how to ensure compliance of the Facebook Pixel with GDPR regulations using the MyAgilePrivacy WordPress plugin. Here's a step-by-step guide:
Solution 1 - automatic scan
You have the option to utilize the advanced "Cookie Shield" feature.
This mode automatically detects the Facebook Pixel software. By setting the Shield to "Learning" mode, the plugin will browse through your website's pages, configuring the settings accordingly. Alternatively, you can opt for manual configuration if desired.
Solution 2 - manual configuration
Part 1 - identify the code of your Pixel
As a first step, locate your Facebook Pixel code.
It will look something like this below:
Part 2 - Locating the Cookie for the Facebook Pixel on the MyAgilePrivacy Cookie List
Navigate to the "MyAgilePrivacy" section in the WordPress admin menu, then select "Cookie List." Here, you'll find a list of cookies imported upon plugin installation.
Initially, they'll be in draft status. Ensure to publish only the cookies required for your website.
On this screen you will see a series of columns:
- Cookie Name: the name of the Cookie
- Is Necessary: indicates whether or not the cookie is essential to site navigation. If rejecting the cookie makes the site unusable, then it is essential. You will find this information pre-filled in the cookie details.
- Auto Update: indicates whether the cookie reference text (which we will see in a moment) remains automatically updated or not. If the setting is on "yes," we will automatically take care of updating the cookie reference texts to keep everything up to date according to GDPR regulations.
- Installation Type: tells you the insertion type chosen for the cookie. This value will be changed depending on the type of inclusion needed, and we will see this together within the guides.
To install the Facebook Pixel cookie, search the list for the one with the title "Facebook Remarketing (Facebook, Inc.)" and click on it.
The detail page contains pre-filled informational text and 2 blank fields where the code can be entered.
The pre-filled text is visible in the cookie policy, and it is that information that is automatically updated to be up-to-date and compliant when the "Allow Automatic Update" setting is set to "yes."
Immediately below the text, you will find the option to select the "Type of Installation" (Javascript and Noscript, or Raw).
Leave "Javascript-noscript code" selected, and you will see immediately after 2 fields:
- Javascript Activation Code - where to enter the main code for Facebook Pixel
- NoScript code - where to enter any NoScript code
Part 3 - Entering the Facebook Pixel Code
Now all you need to do is to enter the Facebook Pixel code, identified at the beginning, within the two fields, according to the directions in the image below.
To do this correctly remember that you must enter the code WITHOUT the opening and closing tags <script> e </script> and without the opening and closing tags <noscript> e </noscript>.
Remember to save and publish the Cookie by pressing the blue "Publish" button in the upper right corner.
Final part - verification of proper operation
Verify the proper installation of the Facebook Pixel on your site using tools provided by Google or Facebook. Visit any page on your website to confirm that the Facebook pixel remains inactive until users explicitly consent to cookie installation. They can do so by clicking "I agree" on the cookie acceptance bar or by activating the Facebook cookie in the "Customize" section.