Install Facebook event codes on your pages
Last updated: January 19, 2023
You can install Facebook event codes on your pages to track specific actions visitors take on your site on Facebook.
Before you get started
Before you install your Facebook event code, please note the following:
- Facebook event codes will not work if you installed the Facebook pixel with the HubSpot Ads tool.
- If you want to add Facebook event codes to your pages, you must install the Facebook pixel code manually by adding it to the footer HTML of your website pages.
- However, if you install the Facebook pixel code manually, you will not be able to create Facebook website audiences from HubSpot.
- In most instances, Facebook event codes will conflict with other codes on your page when added to the Head HTML. In order to ensure the Facebook even code fires correctly, add it to the Footer HTML.
Install your Facebook event code
To install a Facebook event code on your page:- In your HubSpot account, navigate to your landing pages or website pages.
- In the dashboard, hover over the page and click Edit.
- Click the Settings tab.
- Click to expand Advanced Options.
- In the Footer HTML section, paste the Facebook event code.
- In the upper right, click Publish or Update.

Necessary disclosure: HubSpot will automatically place Facebook event codes on your website pages where the HubSpot tracking code is present. These event codes send and track information about your website visitors back to Facebook, which enables conversion tracking.
Thank you for your feedback, it means a lot to us.
Related content
-
Create and sync ad conversion events with your Google Ads account
After connecting your Google Ads account, you can create events to sync your CRM lifecycle stage changes from...
Knowledge Base -
Sync leads from your lead ad forms to HubSpot
After connecting your Facebook, LinkedIn, or Google ad account to HubSpot, your existing lead ad campaigns...
Knowledge Base -
Install pixels from external ad networks
After connecting your Facebook Ads, Google Ads, or LinkedIn Ads account, you can install pixels from these...
Knowledge Base