Meta
Facebook Pixel
The most widely used retargeting and conversion tracking pixel.
The Facebook Pixel is a small piece of JavaScript code from Meta that you place on your website. It lets you measure the effectiveness of your advertising by tracking actions people take on your site after clicking your Facebook ads.
Why you need it
Without the Facebook Pixel, you cannot run retargeting campaigns, create Lookalike Audiences from your customers, or accurately measure ROAS from Meta ads. It is the foundation of all Meta advertising performance.
How to install
Go to Meta Events Manager → Data Sources → Add → Web → Facebook Pixel. Copy the base code and paste it between the <head> tags of every page on your site. Alternatively, install via Google Tag Manager using the Facebook Pixel tag template.
How to verify
Install the Meta Pixel Helper Chrome extension. Visit your website and click the extension icon — it will show which pixels are firing and which events are being tracked. You can also verify in Meta Events Manager under the Test Events tab.
Common issues
Duplicate pixel initialisation is the most common problem — it inflates conversion counts. Ensure fbq("init") is called exactly once per page. Also check that PageView fires immediately after init, and that Purchase events include value and currency parameters.
Installation 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', 'YOUR_PIXEL_ID');
fbq('track', 'PageView');
</script>
<noscript>
<img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=YOUR_PIXEL_ID&ev=PageView&noscript=1"/>
</noscript>
<!-- End Facebook Pixel Code -->Replace YOUR_PIXEL_ID with your actual ID from the platform's ads manager.
Frequently asked questions
How do I check if my Facebook Pixel is installed?
Use PixelSpy by entering your domain above. Alternatively, install the Meta Pixel Helper Chrome extension and visit your site — it will confirm whether the pixel is firing.
Can I have multiple Facebook Pixels on one site?
You can, but it is rarely correct. Multiple pixel IDs should only be used when tracking across separate ad accounts. Two identical pixel IDs initialised twice will double-count all events.
What is the Facebook Pixel base code?
The base code loads fbevents.js from connect.facebook.net and calls fbq("init", "YOUR_PIXEL_ID") followed by fbq("track", "PageView"). This must appear in every page's <head> section.