COS-Pages-Editor

How to install the Facebook ad conversion code or Facebook pixel

Last updated: January 13, 2017

Available For:

Marketing: Basic, Pro, Enterprise
Sales: N/A

Follow these instructions to install the Facebook ad conversion code or Facebook pixel on a HubSpot COS page.

 

 Facebook Ad Conversion code

Please note that Facebook is making a change to the Facebook Conversion Pixel in 2016. You can learn about the changes here.

To install the Facebook Ad Conversion pixel on a page:
  • Navigate in HubSpot Marketing to Content > Landing Pages or Website Pages, locate the page in question and access it for editing. Please be mindful that this code should be added on the final page of your offer.
  • Once in the page editor, go to the Settings tab, scroll down to Advanced Options and click on Edit Head HTML.
User-added image
  • Paste the Facebook Conversion code in the Head HTML box, and click on Save.
  • Click Update.
  • Note: in some instances, this code may conflict with other code on your page when added to the Head HTML. If you find that the Facebook ad conversion code is not working correctly, try adding it into the footer HTML instead (by clicking Edit Footer HTML instead of Edit Head HTML). 

    For more information, view Facebook's help document. 

 

Facebook Pixel

If you are implementing Standard Events with the Facebook Pixel, Facebook recommends to implement the Standard Event code within the pixel base code on the specific page that the event should fire. 

  • Navigate in HubSpot Marketing to Content > Landing Pages or Website Pages, locate the page in question and access it for editing. Paste in your Facebook pixel base code with the standard event code included as mentioned here.

  • Click Save > Update
  • If you would like to install the Facebook pixel base code sitewide, nagivate to Content > Content Settings > Page Publishing, and paste the code into the Site Header HTML. If your base code has been implemented sitewide already, you can then add a specific event code to your page's head HTML.

  • Once implemented, check that your pixel is working by following the steps from Facebook here.