Steps to Implement Facebook Consent Mode
If you want to use Facebook consent mode, you'll need to edit your Facebook code. It’s however easy to implement Seers Facebook Consent Mode with a few changes to the Facebook Pixel code.
- Login to your Seers account
- And click on "Cookie Consent".
- Now select the domain
- And click on “Customise”, now go to tab “Preferences”
- Scroll down until you find “Facebook Consent Mode” and turn on the toggle.
Step 1
Find the Facebook pixel code in the header on the website or get it from your Facebook account:
<!-- Meta 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', 'xxxxxxxxxxxxx');
fbq('track', 'PageView');
<!-- End Facebook Pixel Code -->
</script>
Step 2:
In your Facebook Pixel code, insert the code ( in bold) before in it call.
fbq('consent','revoke');
Step 3:
So the resulting code should look like this:
<!-- Meta 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('consent','revoke');
fbq('init', 'xxxxxxxxxxxxx');
fbq('track', 'PageView');
<!-- End Facebook Pixel Code -->
</script>
Your Facebook Consent mode will be activated.
Note:
To enable the Facebook Consent Mode, you must have Seers’ CMP code installed on your website. Which will look like this code:
<script data-key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" data-name="CookieXray"
src="https://cdn.seersco.com/banners/xxxxx/xxxxx/cb.js" type="text/javascript"></script>