Where to insert the Facebook pixel code?

Hi guys.
I have my Facebbok pixel code. Is it possible to insert it in write.as? If so, in what way?

Hi guys.
I tried tweaking the Facebook Pixel code and finally got it working.
The Facebook platform detects this without problems. Just replace “your ID code” in the following code.
If any of you know the Java language I would be glad you can improve this 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.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 ID code’);
fbq(‘track’, ‘PageView’);
src=“https://www.facebook.com/tr?id=your ID code&ev=PageView&noscript=1”;

A greeting…

Luca

1 Like

It could be that the previous Facebook Pixel code contains errors as I used “copy and paste” to share it in this forum without using the correct preformatted text function. Here is the exact 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.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', 'YourIDcode');
fbq('track', 'PageView');
src="https://www.facebook.com/tr?id=YourIDcode&ev=PageView&noscript=1";

Hi,

Add your Facebook pixels code within the header tags of your website.

Do you want to tell me that it is possible to access the Writer.as Header Tag without transforming the Facebook HTML pixel code into JavaScript?