Send lead source data to HubSpot

Prerequisite:
đź”—Add the Leadsources script to your website
đź”—Add hidden fields to your form

We collect leads along with their source information (channel, source, campaign, term, content, landing page, and subfolder) using our form.

Our goal is to send this data to HubSpot, so you can track which leads convert into customers and identify the channels, sources, campaigns, etc. driving sales.

This helps you focus your marketing budget on what works and cut out what doesn’t.

We use Zapier to send your leads and their source data to HubSpot.

The process has 4 steps:

  1. Create Properties in HubSpot to store the lead source data
  2. Create new car in HubSpot to group the properties
  3. Set up Zapier to send new leads (and their source data) from your form to HubSpot
  4. Test the automation

Step 1: Create Properties in HubSpot #

What is a property in HubSpot?
To store lead source data for each lead in HubSpot, we need to create Properties. In HubSpot, you currently use Properties to capture details about your leads (address, name, company, etc.).

By creating new Properties, we will enable HubSpot to store the lead source data for each lead: channel, source, campaign, term, content, landing page, and landing page subfolder.

Log in your HubSpot account.

On the top right, click to the settings gear icon.

On the left panel, click Properties.

Click Create property.

The New property pop-up opens. Let’s add a first property:

  1. Property label=Channel
  2. Object type=Contact
  3. Group=Contact information
  4. On the left side, click Field type
  5. Field type=Single-line text
  6. Click Create

We have now created our first property. Let’s use the same process to create the rest of the following properties:

Property labelGroup
SourceContact information
CampaignContact information
TermContact information
ContentContact information
Landing pageContact information
Landing page subfolderContact information

Now that we have created the properties, let’s display them under a new card in the contact view.

Step 2: Create new card in HubSpot #

Now we want to group the properties under a card that we will call “Lead source”. As a result, lead source properties will be listed under the same group from the contact view.

Head back to Contacts –> Open a contact.

At the top, click Customize record.

Click Default view.

Click Add cards.

The Add middle column card editor opens. Click Create card.

Scroll down and click Property list (large).

Name the property. We will name it Lead source.

Let’s now add the 7 properties:

  1. Click on Add properties
  2. Search for Channel
  3. Check the Channel box to add the property

Search and add the rest of the properties:

  • Source
  • Campaign
  • Term
  • Content
  • Landing page
  • Landing page subfolder

Click Save –> Exit.

Head back to Contacts –> Open a contact.

Scroll down the middle column. You will find the Lead source card.

The properties are currently empty. In the next step, we will connect your form with HubSpot, so all the properties will be populated in HubSpot with the lead source data captured in your form by Leadsources.

Step 3: Send lead source data using Zapier #

Zapier is a workflow automation tool that connects different applications. In our case, we’ll create this workflow:

When a lead is captured in our form ➡️ Create Contact in HubSpot

Note: This workflow sends your new leads to HubSpot. If you’re already sending leads to HubSpot automatically, make sure this method doesn’t create duplicates. Adjust the guide as needed to fit your process.

Sign up to Zapier.com (it’s free).

Create a new Zap.

The Zap editor opens.

Click in the Trigger box.

Our trigger will be: a new lead is created in our form builder.

In our case, we use Typeform to collect leads. But you can connect another form builder.

Search for your form builder in the search bar. Select it.

Set the Trigger event as “New entry” – wording can vary.

Under Account, link your form builder account with Zapier.

Click Continue.

Under Form, select the form you want to connect.

Click Continue â€“> Click Test Trigger â€“> Click Continue with selected record.

The pop-up for the Action box opens.

Here we are going to define the Action event you want to occur on HubSpot when a new lead is generated in our form builder.

In our case, we want to Create Contact on HubSpot. Let’s go through the steps:

Search for HubSpot. Select it.

Under Action event, select Create Contact.

Under Account, link your HubSpot account with Zapier.

Click Continue.

The Configure section opens.

Here, we want to map the fields between our form builder and HubSpot. Feel free to map the data you want to send to HubSpot by clicking the + symbol next to each field.

Scroll down the Configure section until you find the lead source properties we just created: channel, source, campaign, term, content, landing page, landing page subfolder.

Let’s map the Channel field:

  1. Identify the Channel property named Contact information: Channel (perform a search if necessary)
  2. Click the + icon
  3. Select the Channel hidden field from your form (perform a search if necessary)

Now, let’s map the rest of the properties (from HubSpot) with their associated hidden fields (from your form builder):

  • Contact information: Source
  • Contact information: Campaign
  • Contact information: Term
  • Contact information: Content
  • Contact information: Landing page
  • Contact information: Landing page subfolder

Click Continue. You enter in the Test step. Click Test step.

If the test is successful, a green check is added next to the Test title.

Click Publish.

You are all set!

Step 4: Test the automation #

To test the automation:

  1. Empty the cache of your browser
  2. Visit your website from the channel of your choice. You can use this link to emulate a Google Ads click:

đź”— https://yoursite.com/landing-page?gclid=123456789&wc_clear=true&UTM_source=Google+Ads&UTM_campaign=Your+Campaign+Name&UTM_term=Keyword+Clicked&UTM_content=Ad+Name

➡️ Replace the italic URL with your landing page URL

Fill out your form and submit it.

Head back to HubSpot –> Contacts page.

If the automation was successful, you will see your new contact. Open it.

At the bottom of the middle column, you will find the Lead source card containing the 7 properties: channel, source, campaign, term, content, landing page, and landing page subfolder.

The properties have been filled out with the lead source data captured by Leadsources (channel, source, campaign, term, content, landing page, and landing page subfolder).

You can now track the source of each lead directly in HubSpot.

So when a lead turns into a customer, you can link this customer back to the channel, source, campaign, etc., that generated it.

As a result, you can adjust your marketing activities to focus on the channels, sources, campaigns, etc., that generate sales.

What are your feelings