i wanna install facebook pixel into m website
i am asked to
Copy the code below and paste it between the <head> and </head> in your website code. The pixel will track visits to every page of your website.
My Question
1. which file should i install it? since that i need to put in every page of my website
2. can i put in JS script?
3. i tried putting in JS script, however, it doesnt work , possible because i also copy <script> </script> into the js file?
Code:
<!-- 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', 'NUMBER');
fbq('track', "PageView");</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=NUMBER&ev=PageView&noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->
Bookmarks