Setting Up Clearbit Enrichment for HubSpot Forms

Forms Enrichment is a powerful tool to dramatically increase the conversion of your HubSpot Forms. It comes in two flavors:

  • Autofill - Automatically populates fields in a form with Clearbit data based on your Field Mapping settings when a user types their email.
  • Form Shortening - Hides all Form fields until a user types in their email. Any field that could not be autofilled is shown to the user to fill in.

Once set up, you can toggle either of these on and off from

If you wish to set up Forms Enrichment on a HubSpot Website please follow these instructions. Otherwise, follow the steps below: 

1. Copy/paste the first snippet into the header of your site

In the Forms section of or Onboarding, you'll see two code snippets. The first step is to copy the larger snippet (shown below) and paste it into the header section of your website. Note that depending on how your website is built, you may need to paste this snippet on each page that includes a HubSpot form that you want to enrich.



2. Copy/paste the second snippet into the javascript for each HubSpot Form

Now we'll take the smaller of the two snippets (below) and paste it directly within the javascript for the HubSpot Form.


The javascript for the HubSpot Form you are enabling should look like this after you've completed this step. The snippet you need to add is highlighted in orange.

<!--[if lte IE 8]>
<script charset="utf-8" type="text/javascript" src="//"></script>
<script charset="utf-8" type="text/javascript" src="//"></script>
onFormReady: function($form){ window.ClearbitForHubspot.addForm($form); },
portalId: "6572437",
formId: "16c166f7-53c9-4706-b12f-a25e9a6c3630"

Note that you will have to do this for every HubSpot Form that you want enriched.


3. Enable Autofill or Form Shortening!

Now that you're set up, you can return to and toggle Autofill or Form Shortening on/off. These settings apply the same to all Forms that you enabled by pasting the two scripts on your site. If don't want to enable Autofill or Form Shortening for some Forms but not all, be sure to remove the javascript snippets from the pages with those Forms.