How do I install the Facebook pixel?

Last updated: October 23, 2017

Available For:

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

To install the Facebook pixel on a HubSpot page, follow the steps below:

1. Install the Facebook pixel base code

  • In your HubSpot Marketing account, navigate to Content > Content Settings.
  • Scroll down to the Site Header HTML section and and paste the Facebook pixel base code.
  • Click Save changes at the bottom of the section.
  • Once the code has been added, check that your pixel is working by navigating to the Pixels tab in your Facebook Ads Manager, then clicking Send Test Traffic. If your status says "Active", your base code has been installed correctly. This can take several minutes to update.

2. Install the Facebook event code on your page

  • In your HubSpot Marketing account, navigate to Content > Landing Pages or Website Pages.
  • Locate and hover over the page in the dashboard and click Edit. The Facebook event code should be added to the final page of your offer, which is usually your thank you page.
  • Click the Settings tab and scroll down to Advanced Options, then click Edit Footer HTML.
  • Paste the Facebook event code in dialog box that appears, then click Save changes.
  • Click Update or Publish at the upper right corner of the page editor.

Please note: In most instances, this code will conflict with other code on your page when added to the Head HTML. In order for it to fire correctly, please be sure to add the Facebook event code to the Footer HTML.

Was this article helpful?