PathFactory – HubSpot Integration

You can integrate PathFactory with HubSpot and you can add Bizible to integrate all three of them. Follow the instructions below for your integration. 


PathFactory-HubSpot

To ensure seamless integration and accurate data handling between PathFactory and HubSpot, the pf_hs_contact_id parameter is designed to pull in a contact’s email when included in the query string, provided that the HubSpot connection is properly configured and the HubSpot toggle is enabled in ClientHQ. This parameter functions similarly to the existing lb_email parameter. Once the contact email is retrieved through pf_hs_contact_id, it is passed along in webhooks whenever forms are submitted or other visitor-related events occur. This process guarantees consistent data management across your systems.

Note: To enable this feature for your PathFactory integration with HubSpot, please contact your CSM.

There are two key points of integration between PathFactory and your HubSpot account:

  1. Identifying Visitors through Form Submissions and Email Tracking:

    • PathFactory can identify anonymous visitors to your content tracks via standard PathFactory forms or custom HubSpot form submissions.
    • Additionally, visitors who enter your content tracks from a link within an email can be identified in the PathFactory platform, allowing their engagement data to be associated with their contact information.
  2. Sending Engagement Data from PathFactory to HubSpot:

    • Utilize webhooks to send data triggered by specific events, such as when a visitor reaches an engagement score threshold or views a particular content asset.

Note: If you need to export all available PathFactory data to a data warehouse, PathFactory provides the option 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

    Note
    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.

    Note
    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.

    Form Library
    Form Library
  2. Use the form’s embed code that you copied from HubSpot in the Custom HTML field.
    imageForm Embed Code example

Step 3: Change the embed code

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

    Note
    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.

    imageEmbed Form example

Sample form embed code
<!--[if lte IE 8]>

<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script>

<![endif]-->

<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>

<script>

 hbspt.forms.create({

   portalId: '4224896',

   formId: '098b2c66-6676-489b-a858-5f629aabaab6'

 });

</script>
Modifications

Add the following before the embed code:

<script type="text/javascript" src="https://cdn.bizible.com/scripts/bizible.js" async=""></script>

<div></div>

<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>

And add the following after the formID:

,

  onFormSubmitted: 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;

   }
 
Modified sample form embed code

<div></div>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<!--[if lte IE 8]>
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script>
<![endif]-->
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
<script>
  hbspt.forms.create({
portalId: "4224896",
formId: "098b2c66-6676-489b-a858-5f629aabaab6",
   onFormSubmitted: 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;
    }
});

</script>


PathFactory-HubSpot-Bizible

Integrating these 3 applications is nearly the same as integrating 2 of them. To add Bizible as an integrated service with PathFactory and HubSpot, use the steps listed for the procedure above, and when you get to the modifications, add the following before the embed code:

<div></div>

<script type=”text/javascript” src=”https://cdn.bizible.com/scripts/bizible.js” async=””></script>

<script src=”https://code.jquery.com/jquery-3.2.1.min.js“></script>

For more information on Bizible integration, click here.

Updated on August 15, 2024

Was this article helpful?

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