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

  1. Go to the Pixels section of Facebook Ads Manager and click Create a Pixel.

  2. Name your pixel and enter the URL of your landing page. A new dialog box will appear. 

  3. In the Set up your Pixel dialog box, select Manually Install the Code Yourself. A new dialog box will appear. 

  4. Copy the Pixel code in Step 2 of the Install Pixel Code dialog box by clicking on the code snippet. 
  5. Back in the Unbounce builder, navigate to the page where you'd like to install and click the Javascripts javascriptsbutton.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" 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 Save Code button in the bottom right hand corner of the dialog box. 
    pixel-script.png
  7. Select the Form Confirmation Dialog tab in the top right-hand corner of the builder. 
  8. form-confirmation-dialog.png
  9. Repeat the instructions in Step 6. 
  10. You're set! Your pixel will now track visits to every landing page where the pixel code exists.

Adding a Lead Conversion

A lead conversion tells Facebook that the loading of a certain page indicates a user expressing interest in your offering. You can add this where ever you want to track a lead conversion, such as the Form Confirmation Dialog.

  1. Go to the Pixels section of Facebook Ads Manager and click "Set Up Pixel".
  2. Click "Manually Install the Code Yourself".
  3. Scroll down and click "Continue".
  4. Click "Generate Lead", and select the code to copy it to the clipboard.
  5. In the Builder, click "Form Confirmation Dialog".
  6. form-confirmation-dialog.png
  7. Select the "Javascripts" tab and select the javascript that contains the pixel code you inserted in "Adding a Facebook Pixel".

        Page_Builder_Javascript_Tab.png

    6. Hit enter after "fbq('track', "PageView");" and paste the event code

    7. Delete the two extra script tags and click "Save Code.
facebook_pixel_code_lead_conversion.gif

   8. Select "Head" for placement and click "Save Code".

  9. Presto! Your pixel will now track conversions on every landing page where the pixel code    exists. 


Glossary

Pixel: 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


Was this article helpful?
34 out of 57 found this helpful