Lead Management in HubSpot

To capture a lead from a website, we can use any customized form or HubSpot form in our website. we just need to add the tracking code along with the tracking code of HubSpot.

External Form Capturing: 

To capture a lead from a website, we can use any customized form or HubSpot form in our website. we just need to add the tracking code along with the tracking code of HubSpot.

Form code: 

<!--[if lte IE 8]> 

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


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



    portalId: '2717742', 

    formId: '11eeb156-60cb-4a7f-b46f-16c8a9be151d' 



Tracking Code:  

Tracking code is independent of each instance.

Navigate to Reports and gather the tracking code from Report setting. Deploy the tracking code for all the tracking pages in the website.

Whenever a person visits the page, it will be tracked in HubSpot with their corresponding history of a contact.

A Sample tracking code looks like this.  We can directly place the tracking code by customizing the html code or redirecting the code to IT team by providing instructions available here.

<!-- Start of HubSpot Embed Code --> 

  <script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/2717742.js"></script> 

<!-- End of HubSpot Embed Code -->

Verifying installation of tracking code in website: 

1.Verifying HubSpot ID (Hub ID). If you do not know your Hub ID, navigate to HubSpot Dashboard. Hub ID cab be seen at the top right corner (in the navigation bar).

2.Open a page on your website in the browser and right-click on the screen.

3. Select View page source or View source.

4. The next screen will show all the code that makes up your website.

5.To find out if the HubSpot tracking code is installed, use the keyboard shortcut ctrl f or cmd f to bring up the search field. Search for [Hub ID].js (for example, 401264.js).

Note: It is available to view the HubSpot Embed Code or Async HubSpot Analytics Code here. Both are HubSpot Tracking Codes and indicate that tracking code has been installed.

Tracking code Verification: 

Open a page on a website using any browser and right-click on the screen.

  • Select Inspect Element (or Inspect). There is a toolbar that appears at the bottom of your screen.
  • Click on the Network tab, and then refresh your page. Within the Network tab, it will show the Name, Method, Status, Type, etc. for all the elements loading on your webpage.
  • Click on the Name column to sort alphabetically and then scroll to the top of the list.
  • Look for [Hub ID].js in the Name column; for example: 401264.js. Under the name for the element there is a from js.hs-scripts.com and/or an instance of this .js element from js.hs-analytics.com here.If you do not know Hub ID, navigate to HubSpot account. Hub ID appears at the top right corner (in the navigation bar).

Next to [Hub ID].js you should see 304 Not Modified or 200 OK in the Status column.

Note: If there is any other status or the .js code is not found, tracking code may not be firing correctly. In that case, you need to contact HubSpot support.

Processing in HubSpot:

When a contact is created in Hubspot, an Activity History for that contact is stored—the history, like page visits, form submission with the form name, etc. HubSpot’s analytics updates for every 1-3 hours. Submitted data will not appear in your reports immediately.

To see the last time the analytics was updated, navigate to Reports > Sources.  Scroll to the bottom of the screen. There is an option Data last updated: X hours ago.

Integration process: 

Integration process involves 3 steps:

1) Installation of HubSpot package from App Exchange in Salesforce.

2) Provide the integration user credential.

3) Inclusion List in HubSpot.

HubSpot Lead Intelligence section: 

HubSpot’s lead intelligence application integrates seamlessly with many of the most widely used types of Customer Relationship Management (CRM) software.

Integrating CRM with HubSpot is important because

  • Salespeople in will be able to access and use HubSpot’s lead intelligence on leads within your CRM environment, without having to log into HubSpot.
  • Marketers in an organization can analyze which marketing campaigns are most effective at generating customers and measure which campaigns have a positive ROI.

This method of tracking success back to campaign sources is known as “Closed Loop” marketing analytics, and is unique to HubSpot. Closed loop analytics is automated, closed opportunities from your CRM system are reported back into your HubSpot lead intelligence application, and it is represented as customers in HubSpot Sources analytics.

Note: If you are a HubSpot Basic customer, you will not be able to integrate your CRM. Please consult with Account Manager for upgrade.

CRM Integration Flow: 

The flow diagram above shows how a Lead flows from HubSpot to a CRM system seamlessly. Any changes made in CRM can be pushed back to the HubSpot as well.


HubSpot is an effective inbound Marketing Automation tool that helps markets to easily analyze the ROI and immediate or future interactions with the customers.

About MST

At MST Solutions our cornerstone is to adapt, engage and create solutions which guarantee the success of our clients. The talent of our team and experiences in varied business verticals gives us an advantage over other competitors.

Recent Articles

Work with us.

Our people aren’t just employees, they are key to the success of our business. We recognize the strengths of each individual and allow them time and resources to further develop those skills, crafting a culture of leaders who are passionate about where they are going within our organization.