Working with Facebook Pixels

If enabled in CMP settings, the CMP can automatically call Facebooks “fbq” function with the consent status.

For further details see Facebook's Developer page.

Implementing Facebook GDPR Pixel logic

In order to implement the GDPR logic for Facebook pixels you should set the Facebook Pixel code to revoke the consent:

  //your existing facebook code:
  (window, document,'script','');
  // this line is new:
  fbq('consent', 'revoke'); 
  // rest of your existing facebook code:
  fbq('init', 'Your Facebook Pixel ID');
  fbq('track', 'PageView');

This way Facebook will not automatically set cookies or process data. The CMP can then enable this tracking later.

The CMP will automatically send consent=grant status when CMP > Settings > Show advanced settings > Facebook is enabled (picture 1 below) and Facebook is choosen as a custom vendor in the CMP's whitelist settings (picture 2 below):

Please note: Please do not add Facebook manually as a new vendor but always use the existing Facebook vedor from the list in order to ensure the features is working properly.

Back to top