Facebook Pixel
Facebook Pixel
Start by checking with the SEO department if it would be possible to add the pixel directly in GTM. If this is not possible and the regex /connect.facebook.net/ does not work, you will have to manually adjust the code to add the following arguments ( t.setAttribute(‘data-cookiecategory’,’analytics’ );t.type=’text/plain’) in bold in the following code:
!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.setAttribute('data-cookiecategory','analytics' );t.type='text/plain'
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', '1673691169409448'); fbq('track', 'PageView');