Last updated January 6, 2016. Created on June 21, 2011.
Edited by aufumy, drupalninja99, John Carbone, drupalfever. Log in to edit this page.

The HubSpot module provides leads integration with the HubSpot API, allowing forms created with the Webform module to submit their data to HubSpot for leads tracking. It also allows you to easily embed the HubSpot JavaScript tracking code in your site to track the visits of each lead, and provides a "recent HubSpot leads" block that administrators can use to monitor their site.

The module is currently available for Drupal 6 and 7.

Installation and Configuration

Install this module as usual, then head to the HubSpot integration settings under Configuration (admin/config/services/hubspot in D7, admin/settings/hubspot in D6). If you require Webform integration, it might be a good idea to upload and install the Webform module before this module.

Drupal 7 Instructions

Copy and paste the JavaScript tracking code into the HubSpot Traffic Logging Code text area under /admin/config/services/hubspot.

If you require Webform integration or to enable the latest leads block, enter your HubSpot portal ID instead of an API key to connect your HubSpot account through OAuth authentication.

On the Webforms tab, map the forms and fields to existing HubSpot forms created on the system.

Drupal 6 Instructions

Enter your HubSpot API key and the JavaScript tracking code. Note that the API key is only required should you wish to use the latest leads block; it is not required for simply inserting leads from Webform.

You can request an API key from HubSpot through their website.

The JavaScript tracking code can be found on the HubSpot Settings page, under External Site Traffic Logging. Copy and paste it directly into the configuration page and it will automatically be inserted into your site.

Debugging

If Webform submissions don't seem to be working, check the Drupal error log ("Recent log entries" under Reports) and filter for entries of type "hubspot." Every attempt to insert a lead in HubSpot is recorded there, including full error messages if the attempt failed.

Alternately, enable the debugging system in the module's configuration page. Any HubSpot errors will then be emailed to you directly so you can diagnose the issue.

Uninstallation

If you need to uninstall the module, disable it and uninstall it completely through the Uninstall tab in the Drupal module list. When the module is disabled, the Webform module won't know how to handle the HubSpot POST URL field and may throw some errors; when you uninstall this module completely, it will automatically remove the POST URL field to prevent any issues. Alternately, you can manually remove the POST URL field from each affected Webform.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments

george@upstream.se’s picture

WIll this integration be updated now when Hubspot are updating their API.
Here's the customer information they recently emailed out:

Dear HubSpot customers,

You are being contacted because our records show that you are currently using the HubSpot Leads API.

As part of HubSpot Software's transition from Leads to Contacts, we are deprecating the Leads API. We have replaced it with the faster, more flexible and powerful Contacts API. However, we are aware that many of you will have to re-write your integrations and would like to support you in that transition. To get started, please:

1. Visit our updated API documentation http://developers.hubspot.com/docs/endpoints and Migration to Contacts API intro http://developers.hubspot.com/docs/methods/contacts/migration_overview
2. For technical assistance, use the API forum http://developers.hubspot.com/forum
3. Reply to this email and let us know when you plan on making the transition and if you need any help. We hope to help everyone make the transition in the upcoming weeks.

Thank you,
HubSpot Marketplace Team (Templates, Services, Apps and APIs!)
services@hubspot.com