You are here

function hubspot_help in HubSpot 3.x

Same name and namespace in other branches
  1. 8 hubspot.module \hubspot_help()
  2. 6.2 hubspot.module \hubspot_help()
  3. 6 hubspot.module \hubspot_help()
  4. 7 hubspot.module \hubspot_help()

Implements hook_help().

File

./hubspot.module, line 13
Sends Webform results to HubSpot's Forms API.

Code

function hubspot_help($route_name) {
  $output = '';
  switch ($route_name) {
    case 'help.page.hubspot':
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('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. Further information is
        available in the Drupal <a href="http://drupal.org/node/1195370">handbook pages for this module.</a>') . '</p>';
      $output .= '<h3>' . t('Creating a HubSpot Webform') . '</h3>';
      $output .= '<p>' . t("To have a Webform's data sent to HubSpot for leads tracking, complete the following steps:") . '</p>';
      $output .= '<ol>';
      $output .= '<li>' . t('Connect to your HubSpot account from the HubSpot settings page (links below).') . '</li>';
      $output .= '<li>' . t('From the Webform tab of any webform you will now see the HubSpot "subtab" link below. Click
       on that link.') . '</li>';
      $output .= '<li>' . t('On that page you will see a dropdown listing all of your HubSpot forms (set up from
        HubSpot.com). Select the form you want to map to this Webform.') . '</li>';
      $output .= '<li>' . t('Finally, just go through each Webform fields and map them to the HubSpot form fields
        available in each dropdown. Click save and you\'re done!') . '</li>';
      $output .= '</ol>';
      $output .= '<p>' . t('The Webform will now automatically send any submissions directly to HubSpot form you
        configured.') . '</p>';
      $output .= '<h3>' . t('HubSpot Javascript tracking code') . '</h3>';
      $output .= '<p>' . t('HubSpot supports using a JavaScript tracking system to analyze potential leads on your site.
        You can get the JavaScript code from your HubSpot settings, under External Site Traffic Logging, and paste it
        into the HubSpot integration settings page in Drupal to have it automatically included on every page.') . '</p>';
      break;
    case 'hubspot.form_settings':
      $output .= '<p>' . t("To post this form's results to HubSpot you will need to select the HubSpot form and map the\n        webform fields to the available HubSpot fields.") . '</p>';
      break;
  }
  return $output;
}