How to Track HubSpot Forms as Facebook Events

HubSpot does a lot really well. But like any system that does so much, when it falls short it’s incredibly frustrating.

One such item is Facebook conversion events not being natively integrated into HubSpot’s lead capture forms. If you are using HubSpot forms it’s impossible to create retargeting audiences within Facebook without tracking events.

Facebook’s answer is “use our conversions API.” On one HubSpot forum the advice was to amend the form embed code. In our opinion it’s not reasonable to expect a business to have a developer on hand to track conversions between the most popular small business CRM with a near-monopoly social network.

Fortunately, there is an easier solution — with some bonuses along the way — using Google Tag Manager (GTM).

For the purposes of this explanation, we’re assuming you have GTM installed correctly on all pages of your website, including HubSpot landing pages. If not, there are plenty of online resources to help. Also you’ll need your Facebook Pixel to be firing on all pages. It doesn’t really matter if this is installed using GTM or another method, so long as it’s working.

3 Steps to Tracking HubSpot Forms as Facebook Events

Here are the 3 steps to getting a Facebook event to fire on a successful HubSpot form completion:

  1. Create a GTM trigger that fires on HubSpot form success.
    This article details how to fire a Google Analytics event on form success. As part of this a form listener and a trigger are set up. These are what we need for the later steps.

  2. Create a GTM tag that fires on our new trigger.
    If you are tracking leads in HubSpot then all you need is to add this snippet in to a ‘Custom HTML’ tag in GTM:

    <script>
    fbq('track', 'Lead');
    </script>

    Set this tag to fire with the trigger created in step 1 and publish.

  3. Wait an hour and take a look in ‘Data Sources’ within Facebook Business Manager. You should see the ‘Lead’ event.

That’s it. You can now track conversions and create audiences based upon that conversion.

We promised bonuses — here they are:

  1. The above referenced article allows you to track HubSpot events as goals within Google Analytics. Trust us, you’ll quickly outgrow HubSpot’s own analytics if you start using digital paid media.

  2. You can use the exact same method above including the new HubSpot form trigger you created to track LinkedIn ad conversions. The GTM custom HTML tag should be:

    <script>
    window.lintrk('track', { conversion_id: 1234567 });
    </script>

    … where “1234567” should be replaced with your Linkedin ads conversion ID.

  3. You can use the trigger for Google Ads conversions.

Questions? Drop us a note!

This article was last updated in July 2022.


Paul Newnes