Integrating with the Facebook Pixel

Follow

A Facebook Pixel is a small piece of javascript code that you can copy and paste into pages along your conversion funnel to track both page views and conversions.

Adding a Facebook Pixel

Adding a Facebook pixel to your landing page requires 4 steps: 

Step 1: Create your Facebook Pixel

Step 2: Install your Facebook Pixel code on your Unbounce landing page

Step 3: Set up your Pixel tracking events in Facebook

Step 3.5: Set up your Pixel tracking events on your form confirmation dialog (optional)

Step 4: Test your Pixel events (optional)

 

Step 1: Create your Facebook Pixel. 

  1. Log in to your Facebook Events Manager account. 
  2. Click Get Started. A dialog box will appear. 
  3. Enter the name for your new pixel. Optionally, you can enter your landing page URL. Click Continue
  4. Click Set Up Pixel. A new dialog box will appear. 
  5. Select Manually Add Pixel Code to Website.
  6. Click on the pixel code to copy the code snippet.

 

Step 2: Install your Facebook Pixel code on your Unbounce landing page. 

  1. Back in the Unbounce builder, navigate to the page where you'd like to install and click the Javascripts jsbutton.png button at the bottom of the Unbounce Builder. A new dialog box will appear.
  2. In the new dialog box, paste the code that you copied from Facebook. Enter "Facebook Pixel" in the Script Name field and select the Head option in the Placement drop-down menu. Once you've completed all these steps, click the Done button in the bottom right corner of the dialog box. 
  3. Select the Form Confirmation Dialog tab in the top left corner of the builder. Note: this is necessary if you want to track form submissions. fcd.png
  4. Repeat the instructions in Steps 1 and 2. 

Note:

When pasting the Facebook Pixel script into your Form Confirmation Dialog javascript section, make sure you remove the 12th line of code if you don’t want to see a page view event when the FCD loads. linedelete.png

Note:

Please save and republish your landing page in Unbounce before adding your pixel tracking events in Facebook.

 

Step 3: Add your pixel tracking events in Facebook

  1. Click the Set Up drop-down menu in the top right corner of the screen. Select Set Up New Events
  2. Click Use Facebook’s Event Setup Tool
  3. When prompted, enter the URL for your landing page then click open website. 
  4. Your website will load in a new window. Facebook will automatically highlight any links or buttons that can be tracked. 
  5. Click on the button or URL that you’d like to track, and a Facebook dialog will pop up that will prompt you through the process of setting up your triggers and events. Follow through all the Facebook prompts to complete your setup. 
  6. Repeat this process for every button or URL for which you’d like to set up triggers or events. 

 

Step 3.5: Add your pixel tracking events on your form confirmation dialog (optional)

  1. Follow the instructions on the Facebook website for manually adding a Facebook Pixel tracking event
  2. When you get to the Install Pixel Code dialog box, locate the event you’d like to track, and expand to find the code. 
  3. Select the Track Event on Page Load option, and copy the code provided. 
  4. Go back to your Unbounce landing page, and select the Form Confirmation Dialog tab. 
  5. Click the Javascripts jsbutton.png button at the bottom of the Unbounce Builder. A new dialog box will appear.
  6. In the new dialog box, paste the code that you copied from Facebook. Enter "Facebook Pixel Tracking" in the Script Name field and select the After Body Tag option in the Placement drop-down menu. Once you've completed all these steps, click the Save Code button in the bottom. 

 

Step 4: Test your Pixel Events (Optional)

  1. Click Test Events on the right side of the screen.
  2. When prompted, enter the URL for your landing page then click open website
  3. Your landing page will load. Perform any conversion action that you’ve linked to Facebook Pixel, whether it be button click, link click, or form submission. 
  4. If your Pixel is set up correctly, you will see the event pop up in your Facebook Events tracking screen. 
Was this article helpful?
91 out of 147 found this helpful