Integrates with HubSpot's Leads API and Webforms to submit potential sales leads to HubSpot for their analytics systems.

For example, a Webform handle signups for a free newsletter about your product, and the results will be sent to HubSpot to be handled by their automated email campaign systems. The module also integrates with the HubSpot JavaScript tracking code so you know when potential customers come back to your site.

Unfortunately one needs a HubSpot account to test this, and they're not free. I have tested the submission in various ways, however, and it works well.

Project page: http://drupal.org/sandbox/digett/1188558
Git repo: http://git.drupal.org/sandbox/digett/1188558.git

Some examples of what HubSpot does:
http://examples.hubspot.com/customer-examples/?Tag=Lead+Nurturing
http://www.hubspot.com/products/lead-nurturing/

Comments

artis’s picture

Assigned: Unassigned » artis

I'll add comments as I review the module.

Step 1: I've installed the module and run the Coder module against it.

Coder Review Feedback:

hubspot.module
Line 63: Use "elseif" in place of "else if"
else if (!empty($r['Error'])) {

alexreinhart’s picture

I've just pushed a fix to that. I'm also working on adding some more documentation via hook_help().

artis’s picture

Double check that your verbs that start the documentation are in present tense.

Example:
hubspot.install

line 4: Should be 'Ensures' instead of 'Ensure'
line 8: Should be 'Implements' instead of 'Implement'

artis’s picture

It is common practice in Drupal code to place a comma after the last element of an array that has been broken across multiple lines to prevent parsing errors if another element is added later.

I noticed missing comma's on all the multi-line arrays.

Example:
hubspot.module

lines 13-20

  $items['admin/config/content/hubspot'] = array(
    'title' => 'HubSpot integration settings',
    'description' => 'Set up HubSpot integration and leads insertion.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('hubspot_admin_settings'),
    'access arguments' => array('administer site configuration'),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'hubspot.admin.inc'
  );
artis’s picture

Copied from http://drupal.org/node/161085:

Even if your module doesn't have a need for the hook_install() function, it is common to display a note confirming that the module is installed and ready for action, often providing a link to the administration/configuration page for your module (if it exists). The hook_install function belongs in your module's .install file.

<?php
/**
* Implements hook_install().
*/
function mymodule_install() {
  drupal_set_message(st("Your Module settings are available under !link",
    array( '!link' => l('Administer > Site configuration > Your Module ',  'admin/settings/yourmodule/settings' ) )
  ));
}
?>

Note that you should use st() rather than t() within .install files.

artis’s picture

Also implement a hook_uninstall to delete the variables that the module creates.

artis’s picture

Status: Needs review » Needs work
artis’s picture

More feedback from the Coder module:

File: hubspot.module

Line 61: Use an indent of 2 spaces, with no tabs

array('@msg' => strip_tags($r['Data']), '%form' => $node->title), WATCHDOG_INFO);
Line 65: Use an indent of 2 spaces, with no tabs

array('@error' => $r['ErrorMessage'], '%form' => $node->title), WATCHDOG_ERROR);

Line 76: Use an indent of 2 spaces, with no tabs

array('@error' => $r['Data'], '%form' => $node->title), WATCHDOG_ERROR);

Line 96: Use an indent of 2 spaces, with no tabs

array('@form' => $params['node_title']));

Line 101: Use an indent of 2 spaces, with no tabs

array('@form' => $params['node_title']));

Line 108: Use an indent of 2 spaces, with no tabs

array('@url' => url('admin/config/content/hubspot', array('absolute' => TRUE))));

alexreinhart’s picture

Status: Needs work » Needs review

Okay, the module now has hook_install, hook_uninstall, and hook_disable. Code comments have been moved to present tense. Missing commas have been added.

I think the Coder module's indentation complaints are false positives, though, since the extra indentation is required to make the lines line up correctly when wrapping.

artis’s picture

Assigned: artis » Unassigned
Status: Needs review » Reviewed & tested by the community

A thorough search of d.o resulted in no other Hubspot related modules.

This modules works as described in all the tests I preformed. It also now abides by all of the Drupal standards and security standards that I saw.

I will recommend this module for Full Project promotion.

Full Disclosure:
Alex (module creator) and I work for the same company. However, I did not participate in the development of this module before beginning my review here.

alexreinhart’s picture

Incidentally -- the project is owned by the "Digett" user here on Drupal.org, and I'm a co-maintainer. The way I understand it, Digett will have to be granted permission to promote it rather than me.

sreynen’s picture

Status: Reviewed & tested by the community » Postponed

I'm moving this to "postponed" because I think we need to talk more about who gets access here. alexreinhart has demonstrated an ability to maintain a full project, but Digett has not, so it doesn't seem right to me to give Digett access based on alexreinhart's work. I'm going to seek a second opinion on this, but my first thought is that alexreinhart should take control of the project, possibly by transferring it to a new sandbox via Git.

sreynen’s picture

alexreinhart, can you please clarify who controls the Digett account? Specifically, is that just you, just someone else, or a shared account between you and someone else?

alexreinhart’s picture

The Digett account is my boss's account. However, I've created a sandbox under my account to own the module:

http://drupal.org/sandbox/alexreinhart/1206412

I suppose if it becomes necessary for my boss to take ownership of the project or add other maintainers I can add the Digett account as a co-maintainer.

I'll transfer over any open issues in the module if my ownership is okay -- thanks for the note about drupal_http_request, by the way, as I didn't know it existed.

sreynen’s picture

Status: Postponed » Fixed

That sounds good.

I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.

Thanks for your contribution and welcome to the community of project contributors on drupal.org.

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. As someone who has recently completed an application, your input would be especially useful in the code review group as we work to improve this process.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.