You are here

function acquia_lift_personalize_campaign_wizard_goals_help in Acquia Lift Connector 7.2

Section help callback for goals section.

File

./acquia_lift.admin.wizard.inc, line 1417
acquia_lift.admin.wizard.inc Functions specific to the Acquia Lift alteration of the campaign creation wizard.

Code

function acquia_lift_personalize_campaign_wizard_goals_help(&$form, $form_state, $agent_data, $editable) {
  global $user;
  $dismissed = isset($user->data['acquia_lift_help_dismiss']) ? $user->data['acquia_lift_help_dismiss'] : array();
  unset($form['goals']['title']['#instructions']);
  $help_text = '';
  $help_text .= '<p>';
  $help_text .= t('Goals are the actions that you want your visitors to take based on this personalization.');
  $help_text .= '</p><p>';
  $help_text .= t('Examples of goals include clicking through on a link in the personalization, filling out a form on a later page, or completing a purchase. Completion of goals will determine the conversion rate that will display in reports for this personalization.');
  $help_text .= '</p><p>';
  $help_text .= l(t('Learn more about goals'), 'https://docs.acquia.com/lift/drupal/why', array(
    'attributes' => array(
      'target' => '_blank',
    ),
  ));
  $help_text .= '</p>';
  return array(
    '#type' => 'container',
    '#theme' => 'acquia_lift_wizard_section_help',
    '#image' => drupal_get_path('module', 'acquia_lift') . '/images/help/section_why.png',
    '#alt' => t('Structure of a personalization with goals.'),
    '#text' => $help_text,
    '#collapsed' => array_search('goals', $dismissed) !== FALSE,
    'dismiss' => array(
      '#type' => 'button',
      '#name' => 'dismiss_goals',
      '#value' => t('OK, got it'),
      '#ajax' => array(
        'callback' => 'acquia_lift_personalize_campaign_wizard_help_ajax',
        'progress' => array(),
      ),
      '#limit_validation_errors' => array(),
    ),
  );
}