How to Add Facebook Pixel to Your Website

Modified on Tue, Dec 6, 2022 at 7:08 AM


If you are using a Facebook Pixel to track events for your ads, you will want to add the Pixel code to your funnel and funnel steps.

What you will need:

  • Facebook Pixel Code
  • Events you want to track

Step 1: Add Pixel Code to Funnel

  • Copy the main pixel code from your Facebook Events Manager
  • Navigate to your Funnel.
  • Click Settings --> Paste in your Pixel Code to the Head Tracking Code Section.



  • Save your changes.

Step 2: Add in Event Specific Code to Individual Pages

  • Choose the Step where the event in question is occurring (e.g. Lead would occur after an Opt In)
  • Edit the Step.
  • Choose Settings --> Tracking Code.
  • Click Footer Code and paste in the Event Code.
  • Save your Changes.


RESOURCES:

Facebook Pixel Code (insert your ID in the IDHERE part of the 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', ‘IDHERE’);

  fbq('track', 'PageView');

</script>

<noscript><img height="1" width="1" style="display:none"

  src="https://www.facebook.com/tr?id=IDHERE’&ev=PageView&noscript=1"

/></noscript>

<!-- End Facebook Pixel Code -->

Facebook Event Code: 

 <script>

    fbq('track', ‘EVENTHERE');

  </script>

List of Facebook Standard Events: 

https://developers.facebook.com/docs/facebook-pixel/reference#standard-events

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article