PathFactory-Hubspot Integration

Setting Up PathFactory-HubSpot Integration

There are 2 points of integration between PathFactory and your HubSpot Account:

  1. Identifying Visitors using Form Submissions and Email Tracking

    • PathFactory is able to identify anonymous visitors to your content tracks through standard PathFactory form or custom HubSpot form submissions

    • We can also identify visitors in the PathFactory platform (and therefore associate their engagement data with their contact info) when visitors enter your content tracks from a link within an email

  2. Sending Engagement Data from PathFactory to HubSpot

    • Use Webhooks to send data triggered by specific events, like when a visitor meets an engagement score threshold or views a particular content asset

If you want to export all available PathFactory data to a data warehouse PathFactory offers the ability to create Public API keys.

Identifying Visitors

A lead capture form is useful when you are driving unknown traffic to a PathFactory content track from a website or 3rd party site. When an unidentified visitor arrives at a content track, a lead capture form can be presented to obtain information from that visitor to identify them in both PathFactory and your Marketing Automation Platform (MAP).

There are two types of forms that we recommend when integrating with HubSpot.

  • External form from HTML

  • Standard form (created using the PathFactory form builder)

Ensure your content track visitors are being identified by following these steps:

If you are using a standard PathFactory form:

If you are using a custom HubSpot form:

  1. Build your form in HubSpot

  2. Add your form to the PathFactory platform using its updated embed code

  3. Change the form’s embed code so that it grabs the visitor’s email

    See below for the step-by-step tutorial!

Step 1: Build a form in HubSpot

  1. Use the HubSpot forms tool to create your form.

  2. Copy the form’s embed code.

    Read this article if you’re not sure where to find the embed code.

Step 2: Add the form to PathFactory

  1. In the PathFactory Form Library, create a Custom HTML Form.

  2. Use the form’s embed code that you copied from HubSpot in the Custom HTML field.

Step 3: Change the embed code

  1. You will need to make some modifications to this code when using it in PathFactory.

    These changes will allow PathFactory to grab the visitor’s email address upon form submission. This can then be used to identify the visitor within PathFactory and associate their engagement data with their email.


A sample form embed code is as follows:


Add the following before the embed code:


And add the following after the formID:

 ,    onFormSubmit: function($form) {       var email = $("input[name='email']").val();       setTimeout(function(){       window.parent.postMessage({         conversionUrl: document.location.href,         referrer: document.referrer,         email: email,         lookbookExternalForm: true       }, "*");},500)       return true;     }

The modified sample form embed code is then as follows:


Updated on July 7, 2022

Was this article helpful?

Need Support?
Can't find the answer you're looking for? Don't worry we're here to help!