You can add the Facebook pixel in your ads settings to show targeted ads to your visitors on Facebook and Instagram. In order to install the Facebook pixel in HubSpot, you must first create a pixel in your connected Facebook account.
Install the Facebook pixel base code
- In your HubSpot account, click the settings icon settings in the main navigation bar.
- In the left sidebar, navigate to Marketing > Web pages.
- 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.
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.