What is Facebook Consent Mode?

Facebook Consent Mode is a feature introduced by Facebook to help website owners comply with data protection regulations, such as the General Data Protection Regulation (GDPR) in the European Union. It provides a solution for obtaining and managing user consent for Facebook Pixel, which is a tool used for tracking and measuring user interactions on websites for advertising and analytical purposes.

With Facebook Consent Mode, website owners can configure their websites to adjust the behavior of the Facebook Pixel based on the user’s consent preferences. This ensures that data is collected and used in accordance with the user’s consent status, helping website owners adhere to data protection regulations.

Cookie Compliance has fully automated integration with Facebook Consent Mode.

Implementing Facebook Consent Mode 

You can easily implement the Facebook Consent Mode without any changes to the Facebook Pixel code.

Step 1: Place the Facebook Pixel code located in the site header, just below Cookie Compliance script: 

<!-- Facebook Pixel Code -->
<script>
  !function(f,b,e,v,n,t,s)
  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
  n.callMethod.apply(n,arguments):n.queue.push(arguments)};
  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
  n.queue=[];t=b.createElement(e);t.async=!0;
  t.src=v;s=b.getElementsByTagName(e)[0];
  s.parentNode.insertBefore(t,s)}(window, document,'script',
  'https://connect.facebook.net/en_US/fbevents.js');
  fbq('init', '{your-pixel-id-goes-here}');
  fbq('track', 'PageView');
</script>

Step 2: Enable the Facebook Consent Mode in the Cookie Compliance dashboard (Configuration -> Consent).

Was this article helpful?
YesNo