Integration Tutorials /  

Hubspot

Hubspot

Track leads captured using HubSpot Forms and attribute future conversions to them.

Contents

Track Hubspot Forms

Able supports tracking of Leads captured using HubSpot Forms.

Tracking HubSpot leads allows to supplement HubSpot built-in reports and send purchase conversion to Google AnalyticsGoogle Ads and Facebook Ads, allowing to use their native reports to report on lead and purchase conversions, as well as to drastically improve audience optimization by letting ad platforms know what leads have converted into paying customers.

  1. Edit HubSpot Form Embed Code

    To start tracking form submissions, HubSpot form embed code should be extended. For example, replace:


    <script>
    hbspt.forms.create({
      portalId: "123456",
      formId: "4afa4b6f-42c5-40b0-ae4c-0d10fc2a011a"
    });
    </script>

    with


    <script>
    hbspt.forms.create({
      portalId: "123456",
      formId: "4afa4b6f-42c5-40b0-ae4c-0d10fc2a011a",
      onFormSubmit: function($form) {
       uipe('track', 'Lead', {
        keys: {
         email: $form.find('input[name="email"]').val(),
        },
        lead: {
              firstName: $form.find('input[name="firstname"]').val(),
         lastName: $form.find('input[name="lastname"]').val(),
         company: $form.find('input[name="company"]').val(),
        }
       })
      }
    });
    </script>

    The page with a form should have the Able CDP tracking code installed as well.

    Watch our video tutorial explaining how to track Hubspot Form Submissions and send them to Google Analytics using Google Global Site Tag, as well as to Able.