COS-Pages-Editor

How do I install the Facebook pixel?

Last updated: April 16, 2018

Available For:

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

The steps below walk through installing the Facebook pixel base code in your content settings and the Facebook event code on your pages.

1. Install the Facebook pixel base code

  • In your HubSpot Marketing Hub BasicProfessional, or Enterprise account, navigate to Content > Content Settings.
  • Scroll to the Site header HTML section and paste the Facebook pixel base code. Do not include the <noscript> portion of the pixel code here.

  • In the Site Footer HTML section, paste the <noscript> portion of the pixel code.
footer-fb-pixel

Please note: the <noscript> section at the end of your Facebook pixel code must be pasted into the footer HTML to avoid invalid HTML from being generated on the page.

  • Click Save at the bottom left.
  • 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 reads Active, your base code has been installed correctly. This can take several minutes to update.

2. Install the Facebook event code on your page

  • 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, then scroll down and click to expand the Advanced Options
  • Paste the Facebook event code in the Footer HTML section.
  • Click Update or Publish in 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?