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 Steps 5 and 6. 
  10. You're set! Your pixel will now track visits to every landing page where the pixel code exists.

 


 

Setting Up Events Tracking for your Facebook Pixel

 You can select which events you want to track with your Facebook Pixel. Events are actions that occur on your website that result from either paid Facebook ads or organic Facebook search methods. Facebook has an interface to allow you to set up standard events without much hassle. Follow the steps below to set up standard events tracking for your landing page to track any click, form confirmation, and thank you note that you’ve set up.

  1. Navigate your way to your Facebook Pixel page.
  2. Click the Set Up button at the top right-hand corner of the screen. A new dialog box will appear.
  3. In the Set Up Your Pixel dialog box, click Manually Install your Code.
  4. Click the Continue button at the bottom right-hand corner of the dialog box.
  5. Scroll down to Step Two and click the toggle image3.png  button for every one of the events that you’d like to track. This will load a code snippet.
  6. Copy the code snippet provided by clicking on the code snippet.
  7. Click the Done button at the bottom right-hand corner of the dialog box.
  8. image7.png
  9. Navigate back over to your Unbounce landing page and click the Javascripts javascriptsbutton.png button at the bottom of the page.
  10. Find the existing Facebook pixel code that you previously installed and click that installation.
  11. image2.png
  12. Paste your newly copied code to the bottom of your previous code.
  13. image5.png

    Note:

    You must put the event code after the pixel code or else the event tracking will not work.
  14. Click the Save Code button at the bottom right-hand corner of the dialog box.
  15. Save and Republish your Page.

Event tracking is now enabled for your Facebook Pixel!

Note:

If you are using a Form Confirmation Dialog Box and would like to track conversions on that dialog box, you will need to add this tracking script to the Javascript area of the Form Confirmation Dialog Box as well (See Picture Below).

image8.png


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?
43 out of 71 found this helpful