Facebook Pixel Code

The Facebook pixel code is comprised of two elements:

1. Base Code

According to the Facebook Pixel documentation, it is recommended that you add the Base code for the Facebook Pixel to all the pages of your website where your landing page will appear.

2. Standard Event Code

The Standard Event code will be added to your landing page.

An example of the Facebook Pixel code is displayed in the attachment below.

There are several different approaches you can choose to add the Facebook Pixel.

1. Add Pixel in Forms

BenchmarkONE allows you to put two types of tracking pixels for each form via behavior step in the landing page.

  • View Pixel
    These are triggered when a visitor views your form.

  • Subscribe Pixel
    These are triggered when a visitor successfully subscribes to your form. You can also pass in the subscriber's email address by typing [EMAIL].

2. Add Pixel in Landing Pages

In your landing page, you can put tracking pixels to track when the landing page is viewed or when the user has subscribed via HTML block.

  • Main Page Pixels
    These are triggered when a visitor views your landing page.

  • Thank You Page Pixels
    These are triggered when a visitor successfully subscribes using a form in your landing page.

3. Site Tracking

Follow the steps below to add tracking pixels at a site-level.

Step 1: Click on the Manage Site link in the top navigation bar.

Step 2: Click on Tracking in the left menu panel.

Step 3: Add the View Pixel and Subscribe Pixel in the Site Tracking section.

Step 4: Click on the Save Site Tracking button at the bottom.

Note: These are global pixels that are fired when any of your forms or landing pages is viewed, or when a visitor subscribes. If you have existing pixels on your forms or landing pages, those will fire in addition to the following.

Facebook Tracking 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', 'Pixel ID goes here');
fbq('track', 'Lead');
</script>

Note: Add the Pixel ID to be fired to the Facebook tracking pixel code above.

Did this answer your question?