1. In your HubSpot account, click the settings icon settings in the main navigation bar.
2. In the left sidebar menu, navigate to Website > Pages.
3. 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.
(https://knowledge.hubspot.com/hubfs/Knowledge_Base_Images/Content/Content_Settings/header-fb-pixel.png?t=1541101107787)
4. In the Site footer HTML section, paste the <noscript> portion of the pixel code.
(https://knowledge.hubspot.com/hs-fs/hubfs/Knowledge_Base_Images/Content/Content_Settings/footer-fb-pixel.png?t=1541101107787&width=1039&height=550&name=footer-fb-pixel.png)
*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.
5. Click Save to apply your changes.
6. 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.
Source: https://knowledge.hubspot.com/articles/kcs_article/cos-pages-editor/how-do-i-install-the-facebook-pixel