You are here

function acquia_lift_personalize_campaign_wizard_targeting_help in Acquia Lift Connector 7.2

Section help callback for targeting section.

File

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

Code

function acquia_lift_personalize_campaign_wizard_targeting_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['targeting']['title']['#instructions']);
  $help_text = '';
  $help_text .= '<p>';
  $help_text .= t('Audiences are the groups of people to whom you want to display your personalization\'s different variations.');
  $help_text .= '</p><p>';
  $help_text .= t('For example, you can create an audience called "Visitors from Los Angeles aged 18-25", and then target them with the "Winter Vacation" variation. The variation or variations in the pre-made Everyone/Everyone Else audience are displayed to visitors that do not meet any audience criteria.');
  $help_text .= '</p><p>';
  $help_text .= t('If a visitor qualifies for more than one audience, they will be placed into the first audience displayed on the page that matches, based on the displayed page order. For example, if Acquia Lift displays the audiences as "Group A" and "Group B" and both audiences qualifiy, the visitor is placed into Group A.');
  $help_text .= '</p><p>';
  $help_text .= l(t('Learn more about audiences'), 'https://docs.acquia.com/lift/drupal/who', 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_who.png',
    '#alt' => t('Structure of a personalization with targeting.'),
    '#text' => $help_text,
    '#collapsed' => array_search('targeting', $dismissed) !== FALSE,
    'dismiss' => array(
      '#type' => 'button',
      '#name' => 'dismiss_targeting',
      '#value' => t('OK, got it'),
      '#ajax' => array(
        'callback' => 'acquia_lift_personalize_campaign_wizard_help_ajax',
        'progress' => array(),
      ),
      '#limit_validation_errors' => array(),
    ),
  );
}