×

Install Facebook Events in HubSpot

Install Facebook Event Codes on HubSpot Pages

Connecting your Facebook ad tracking with HubSpot lets you measure conversions, optimize campaigns, and understand how visitors interact with your website. This guide walks you through installing the Facebook pixel base code and event codes on HubSpot pages so your ads and reports stay accurate.

How Facebook Event Tracking Works in HubSpot

Before you add anything to your site, it is important to understand how Facebook event tracking works with your HubSpot content tools.

Facebook uses two main components for tracking:

  • Base pixel code: loads the Facebook pixel on your page and tracks page views.
  • Event code: sends specific actions to Facebook, such as lead submissions or purchases.

When both are installed on your HubSpot pages, you can:

  • See which ads drive traffic and conversions.
  • Build custom audiences based on behavior.
  • Optimize campaigns for leads and other actions.

Prepare Your Facebook Pixel for HubSpot

To start, confirm that you have access to a Facebook pixel in your Meta Business Manager. You will need the base pixel code snippet to add it to HubSpot.

  1. Open Facebook Events Manager in your Meta Business account.
  2. Select or create the pixel you want to use.
  3. Navigate to the section that shows the pixel installation instructions.
  4. Copy the entire base pixel code snippet to your clipboard.

Keep this snippet handy; you will paste it into your HubSpot settings in the next step.

Add the Facebook Pixel Base Code in HubSpot Settings

To ensure the Facebook pixel loads on every page, install the base code in your HubSpot site settings. This is typically a one-time setup.

  1. In your HubSpot account, go to Settings.
  2. In the left sidebar, navigate to Website > Pages.
  3. Select the domain where you want the Facebook pixel to load.
  4. Open the Templates or Site header HTML section (label may vary slightly by account).
  5. Paste the Facebook base pixel code into the global header field so it appears on all HubSpot pages for that domain.
  6. Click Save or Publish to apply your changes.

After this step, your pixel base code will run on supported HubSpot pages across the selected domain, capturing page views for Facebook reporting.

Add Facebook Event Code on Individual HubSpot Pages

For more detailed tracking, you may want to fire specific Facebook events on certain HubSpot pages, such as landing pages or thank-you pages.

Typical events include:

  • Lead when a form is submitted.
  • CompleteRegistration for sign-ups.
  • Purchase after a transaction is completed.

To add an event manually to a specific HubSpot page:

  1. In your HubSpot account, navigate to Marketing > Website > Website pages or Landing pages.
  2. Hover over the page you want to edit and click Edit.
  3. Open the page settings, then locate the Advanced options or Additional code snippets area.
  4. In the Head HTML or Footer HTML section (as recommended by your Facebook pixel instructions), paste the event code snippet that corresponds to the action you want to track.
  5. Update the event parameters as needed, such as value or currency, according to your Facebook documentation.
  6. Click Update or Publish to push the changes live.

Make sure that the event code is added only on the pages where the action is considered complete, for example, a thank-you page after a form submission.

Use HubSpot Forms with Facebook Events

If you are using native HubSpot forms on your landing pages, you might want to send a Facebook event each time a contact submits a form.

Trigger Facebook Events from HubSpot Form Submissions

There are two main approaches to connecting HubSpot forms with Facebook events:

  • Fire events on the form thank-you page.
  • Use custom JavaScript callbacks on the embedded form.

The simplest option is to:

  1. Set your HubSpot form to redirect to a dedicated thank-you page after submission.
  2. Install the Facebook event code (for example, a Lead event) only on that thank-you page.

This way, every time the form is submitted and the visitor lands on the thank-you page, the event is triggered and recorded in Facebook without additional coding on the form itself.

Verify Facebook Pixel Events on HubSpot Pages

Once the pixel and event codes are installed in HubSpot, it is essential to verify that everything is firing correctly.

Use the Meta Pixel Helper

Facebook provides a Chrome extension, Meta Pixel Helper, that checks if the pixel and events are loading on your pages.

  1. Install the Meta Pixel Helper extension from the Chrome Web Store.
  2. Open a published HubSpot page where the pixel should be installed.
  3. Click the extension icon in your browser.
  4. Review the list of pixels and events detected, including any warnings or errors.

If the tool shows your pixel ID and the expected events, your installation is working correctly.

Check Events Manager for HubSpot Traffic

You can also confirm activity in Facebook Events Manager:

  1. Open Facebook Events Manager in your Meta Business account.
  2. Select your pixel.
  3. Check the incoming events to confirm that traffic from your HubSpot pages is being tracked.

You should see event types such as PageView and any custom or standard events you configured for your HubSpot content.

Best Practices for Facebook Tracking in HubSpot

To keep tracking clean and reliable, follow these best practices when working with HubSpot and Facebook event codes:

  • Install the base pixel code only once in your global HubSpot settings to avoid duplicates.
  • Limit event code snippets to pages where the specific action is completed.
  • Name events consistently so you can report across multiple HubSpot campaigns.
  • Test changes in a staging or test page before updating your primary HubSpot pages.

Proper organization makes it easier to manage large numbers of landing pages and campaigns inside your HubSpot account.

Troubleshooting Facebook Event Code in HubSpot

If your Facebook events are not firing as expected on HubSpot pages, run through the following checks:

  • Confirm that the base pixel code is placed in the global header for the correct HubSpot domain.
  • Verify that no other scripts are blocking or overwriting your Facebook code.
  • Ensure event code syntax matches the latest Facebook documentation.
  • Use Meta Pixel Helper to identify JavaScript errors or duplicate pixels.
  • Republish your HubSpot pages after making any code changes.

You can also compare the page source in your browser with the code you pasted into HubSpot to confirm that everything is being rendered correctly.

More Resources for HubSpot and Facebook Ads

For deeper technical details, always review the official HubSpot documentation on installing Facebook event codes here: HubSpot Facebook event code guide. It outlines the most current supported methods and any product-specific notes.

If you need strategic help with setting up conversion tracking, aligning campaigns, or improving performance beyond basic configuration inside HubSpot, you can also consult specialists at Consultevo for implementation and optimization services.

By carefully installing the Facebook pixel base code and relevant event codes on your HubSpot pages, you gain more accurate reporting, better optimization signals, and a clearer view of how your advertising drives measurable business results.

Need Help With Hubspot?

If you want expert help building, automating, or scaling your Hubspot , work with ConsultEvo, a team who has a decade of Hubspot experience.

Scale Hubspot

“`

Verified by MonsterInsights