Easiest method to install Facebook Pixel

by Steven Kong   Last Updated February 02, 2018 11:09 AM

Complete coding illiterate here so forgive my incompetence.

Trying to install Facebook Pixel in my store, would simply copy & pasting my pixel code into here work?

enter image description here

Any help and advice are greatly appreciated.



Answers 1


I believe that by pasting the Pixel code Facebook gives you from the <!-- Facebook Pixel Code --> to the <!-- End Facebook Pixel Code --> would paste the relevant code before the header, and providing you follow the rest of the documentation here you should be fine. Best of luck. I should note that use the code that Facebook gives you, not the below code I've left this in for other developers to read.

<!-- 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');
// Insert Your Facebook Pixel ID below. 
fbq('init', 'FB_PIXEL_ID');
fbq('track', 'PageView');
</script>
<!-- Insert Your Facebook Pixel ID below. --> 
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=FB_PIXEL_ID&amp;ev=PageView&amp;noscript=1"
/></noscript>
<!-- End Facebook Pixel Code -->
John C
John C
February 02, 2018 10:57 AM

Related Questions


facebook pixel configurable products

Updated December 18, 2017 19:09 PM

M2 Tracking progress via API

Updated December 03, 2017 08:09 AM

importing and exporting tracking

Updated January 25, 2018 06:09 AM


Is it good to use bitnami for magento 2

Updated September 01, 2016 08:05 AM