Marketo MA enables integration between a Drupal site and Marketo marketing automation software. Specifically it adds the necessary javascript for tracking pageviews and enables lead data to be captured via user hooks and webforms.

Project Page: http://drupal.org/sandbox/jyokum/1949342

Git Repo: http://drupalcode.org/sandbox/jyokum/1949342.git

The Marketo Munchkin module is similar in its ability to add basic javascript tracking but provides no option for taking advantage of Marketo's SOAP API and any sort of request queuing. Marketo MA also add deep integration with Webforms which is not available in the Munchkin module. I have reached out to the current maintainers to explore options on how these modules could work together but no response as of yet.

Utilization of Marketo's SOAP API for basic lead tracking is a building block for a deeper integration with Marketo and it's lead / campaign management capability and is a significant differentiator from the munchkin module. With the Marketo MA module administrators have the ability to ensure data is captured and is done so in a way that does not jeopardize performance. Lead data can be captured and queued up for delivery later as well as stored for future viewing. This also breaks the dependancy on javascript as it is not required for SOAP based interaction.

Reviews of other projects

This project is currently being included in the Demo Framework distribution

Comments

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://ventral.org/pareview/httpgitdrupalorgsandboxjyokum1949342git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

jyokum’s picture

Corrected most errors reported by automated review tool. Did not address issues in includes/marketo_ma.soap.inc as it is a file provided by Marketo.

jyokum’s picture

Status: Needs work » Needs review
chason’s picture

Status: Needs review » Needs work

Manual Review:
Well written and commented code. Nicely done. Installed without a hitch. I found a few things worth noting:

  • Should variable_set('marketo_ma_webform_fields', $value) need to be included in marketo_ma_webform_install()? The variable_del('marketo_ma_webform_fields') function is called in marketo_ma_webform_uninstall() and marketo_ma_uninstall().
  • Consider changing hash type on line 198 in marketo_ma.module to 'sha256' versus 'sha1' as recommended here - http://drupal.org/node/845876.
  • When clicking Retrieve from Marketo button on admin/config/search/marketo_ma with all default form values set, the system returns the following javascript dialog stating an AJAX HTTP error code 200 occurred.
jyokum’s picture

Status: Needs work » Needs review

Thanks for the review. All items from [#4] have been addressed.

  • Removed unnecessary marketo_ma_webform_uninstall()
  • Left 'sha1' as the hash type as this is a Marketo requirement
  • Updated form so button is only enabled once settings are configured
chason’s picture

Status: Needs review » Needs work

@jyokum - thanks for removing the hook_uninstall() and disabling the form button. I tested and works as expected. The 'sha1' hash type requirement makes sense. I ran the code through ventral once more and it looks like there are still formatting errors (not including the marketo_ma.soap.inc as what you stated makes sense): http://ventral.org/pareview/httpgitdrupalorgsandboxjyokum1949342git

Everett Zufelt’s picture

This looks quite good. Clear demonstration of your knowledge of Drupal APIs and coding standards. Below are some recommendations, some of which may have aready been addressed. I'd be ready to mark the application as RTBC once the first issue is dealt with.

File: marketo_ma.soap.inc

Please make sure that this file can be released as GPL. If not it will need to be removed from the repository and hosted elsewhere.

File: marketo_ma.info

You only need to include a JS file using the scripts[] directive of an info file if you want the script loaded on every page of a site.

scripts[] = js/marketo_ma.js

file: marketo_ma_webform.module

Does this allow the use of the email key when it may not be set?

* Check to see if an Email field has been provided. If not, we will try
* to use the current logged in user info
*/
if (!isset($data['Email']) || $data['Email'] == '') {
global $user;
if (isset($user->mail)) {
$data['Email'] = $user->mail;
}
}

marketo_ma_add_lead($data['Email'], $data);
}

File: marketo_ma.module

Comments should be complete sentences, including a period. Recurring in the different files.

/**
* @file
* Drupal Module: Marketo MA
*/

If there are no help text strings ready you should consider omitting this function.

function marketo_ma_help($path, $arg) {

Consider some additional description in the docblock to help others understand the purpose of this function. Also, please remove the commented line of code.

/**
* Implements hook_page_alter().
*/
function marketo_ma_page_alter(&$page) {
$marketo_ma_data = marketo_ma_get_queue();
// drupal_alter('marketo_ma_data', $marketo_ma_data);

The first key should be the module name, not marketo, this helps avoid namespace collision (happens elsewhere as well.

drupal_add_js(array(
'marketo' => array(

Are you sure you want to log each lead capture? This appears in a few places.

watchdog('marketo', 'Associating lead !email [@method]

@data

', array('!email' => $lead['email'], '@method' => 'munchkin', '@data' => print_r($lead['data'], TRUE)));

File: marketo_ma.inc

If these constants were defined in the marketo_ma.module you wouldn't need to explicitly include this file.

File: marketo_ma.js

yYou can reduce namespace collisions by using the module name as the behaviors namespace.

(function($) {
Drupal.behaviors.marketo = {

You should include this function in your module's behavior namespace for better encapsulation, and to keep the global namespace clean.

function marketoMunchkinFunction(leadType, data, hash) {

jyokum’s picture

Status: Needs work » Needs review

Items mentioned in #7 have been addressed.

  • Created custom soap client to avoid GPL concerns with Marketo supplied file.
  • left scripts[] in place as I believe it is appropriate
  • added check for existence of $data['Email'] before trying to use it
  • removed help hooks which provided no value
  • corrected namespace issues
  • added config setting for turning on/off extra watchdog logging

Only issue reported by ventral.org at this point is related to @inheritdoc which I believe to be correct per standards http://drupal.org/node/1354#inheritdoc

Everett Zufelt’s picture

Status: Needs review » Reviewed & tested by the community

Good work. This module looks like it will be useful to the community, and you have demonstrated clear understanding of Drupal APIs and practices, including accessing and understanding community documentation.

jyokum’s picture

Found that SoapClient has its own proxy settings that need to be set for some sites. I've added configuration options for these settings in commit 9df5dd3f3cc2c0489bca0414b891602d5a05c01e. Not sure what the procedure is for introducing changes to a module that is currently going through the approval process.

Everett Zufelt’s picture

This is still RTBC after changes mentioned above.

Everett Zufelt’s picture

Priority: Normal » Critical

This issue has been in RTBC for over 2 months, raising priority based on https://drupal.org/node/539608

jyokum’s picture

Issue summary: View changes

added link to code reviews completed

jyokum’s picture

Issue summary: View changes

additional code review added

jyokum’s picture

Issue summary: View changes

Adding section name for review bonus per https://drupal.org/node/1975228

jyokum’s picture

Issue tags: +PAreview: review bonus

review bonus tag added per https://drupal.org/node/1975228

klausi’s picture

Status: Reviewed & tested by the community » Postponed (maintainer needs more info)

This sounds like a feature that should live in the existing marketo_munchkin project. Module duplication and fragmentation is a huge problem on drupal.org and we prefer collaboration over competition. Please open an issue in the marketo_munchkin issue queue to discuss what you need. You should also get in contact with the maintainer(s) to offer your help to move the project forward. If you cannot reach the maintainer(s) please follow the abandoned project process.

If that fails for whatever reason please get back to us and set this back to RTBC.

mlncn’s picture

Status: Postponed (maintainer needs more info) » Fixed

The issue description explains pretty well why it is a different project from Marketo Munchkin: both providing different features and using a different approach. Seems they would remain separate modules, and unless someone might use both approaches at the same time, these are not good candidates for living in the same project package.

As jyokum has demonstrated solid maintainer responsibility, i've granted him vetted git user access and getting this out of the new maintainer project review queue.

Thanks greatly to chason and Everett Zufelt for the code reviews.

Congratulations, jyokum, on demonstrating sufficient quality of code and proficiency with Git to join the ranks of vetted Git users, the project maintainers.

The Git instruction tab on your project is one of your new best friends, and please mind your issue queue. Thanks for contributing!

klausi’s picture

@mlncn: please use the promotion template from https://groups.drupal.org/node/184389 :

Thanks for your contribution!

I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!

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. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

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

Anonymous’s picture

Issue summary: View changes

addtional review added