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.