/** * This function prints the list of goals (a set of cards). It also * prepares the "card" template, which is used by the JavaScript code * for adding new cards. * * Each kind of possible goal (the form for adding it) is also printed * by this function. */ protected function print_goals() { $handler = '<i class="handler dashicons-before dashicons-menu"><br></i>'; ?> <div id="new-action-templates"> <?php require_once NELIOAB_UTILS_DIR . '/html-generator.php'; ?> <div class="action page" style="display:none;"> <?php echo $handler; $options = NelioABHtmlGenerator::get_page_searcher('new-action-page-searcher', false, 'no-drafts', array(), false); $this->print_post_or_form_action('page', $options, !$this->is_global); ?> <a href="javascript:;" class="delete"><?php _e('Delete'); ?> </a> </div> <div class="action post" style="display:none;"> <?php echo $handler; $options = NelioABHtmlGenerator::get_post_searcher('new-action-post-searcher', false, 'no-drafts', array(), false); $this->print_post_or_form_action('post', $options, !$this->is_global); ?> <a href="javascript:;" class="delete"><?php _e('Delete'); ?> </a> </div> <div class="action wc-order-completed" style="display:none;"> <?php echo $handler; $options = NelioABHtmlGenerator::get_post_searcher_based_on_type('new-wc-order-completed-searcher', false, 'no-drafts', array(), false, array('product')); $text = __('An order containing the product %1$s is completed.', 'nelioab'); printf($text, $options); ?> <a href="javascript:;" class="delete"><?php _e('Delete'); ?> </a> </div> <div class="action external-page" style="display:none;"> <?php echo $handler; $name = sprintf('<input type="text" class="name" placeholder="%s" style="max-width:120px;">', __('Name', 'nelioab')); $url = sprintf('<input type="text" class="url" placeholder="%s" style="max-width:200px;">', __('URL', 'nelioab')); $options = '<select class="url_mode">'; $options .= sprintf('<option value="exact">%s</option>', __('whose URL is', 'nelioab')); $options .= sprintf('<option value="starts-with">%s</option>', __('whose URL starts with', 'nelioab')); $options .= sprintf('<option value="contains">%s</option>', __('whose URL contains', 'nelioab')); $options .= sprintf('<option value="ends-with">%s</option>', __('whose URL ends with', 'nelioab')); $options .= '</select>'; if (!$this->is_global) { $indirect = '<select class="direct">'; if ($this->tests_a_page) { $indirect .= ' <option value="1">' . __('from the tested page', 'nelioab') . '</option>'; $indirect .= ' <option value="0">' . __('from any page', 'nelioab') . '</option>'; } else { $indirect .= ' <option value="1">' . __('from the tested post', 'nelioab') . '</option>'; $indirect .= ' <option value="0">' . __('from any page', 'nelioab') . '</option>'; } printf(__('A visitor accesses %4$s the page %1$s, %2$s %3$s', 'nelioab'), $name, $options, $url, $indirect); } else { printf(__('A visitor accesses the page %1$s, %2$s %3$s', 'nelioab'), $name, $options, $url); printf('<input type="hidden" class="direct" value="0" />'); } ?> <a href="javascript:;" class="delete"><?php _e('Delete'); ?> </a> </div> <div class="action form-submit cf7" style="display:none;"><?php echo $handler; $options = NelioABHtmlGenerator::get_form_searcher('new-cf7-form-searcher', false, array(), false); $this->print_post_or_form_action('cf7-submit', $options, !$this->is_global); ?> <a href="javascript:;" class="delete"><?php _e('Delete'); ?> </a> </div> <div class="action form-submit gf" style="display:none;"><?php echo $handler; $options = NelioABHtmlGenerator::get_form_searcher('new-gf-form-searcher', false, array(), false); $this->print_post_or_form_action('gf-submit', $options, !$this->is_global); ?> <a href="javascript:;" class="delete"><?php _e('Delete'); ?> </a> </div> <div class="action click-element" style="display:none;"><?php echo $handler; $name = sprintf('<input type="text" class="value" placeholder="%s" style="max-width:200px;">', __('Matcher', 'nelioab')); require_once NELIOAB_MODELS_DIR . '/goals/actions/click-element-action.php'; $options = '<select class="mode">'; $options .= sprintf('<option value="%s">%s</option>', NelioABClickElementAction::ID_MODE, __('whose ID is', 'nelioab')); $options .= sprintf('<option value="%s">%s</option>', NelioABClickElementAction::CSS_MODE, __('that matches the CSS Selector rule', 'nelioab')); $options .= sprintf('<option value="%s">%s</option>', NelioABClickElementAction::TEXT_MODE, __('that contains the text', 'nelioab')); $options .= '</select>'; printf(__('A visitor clicks on an element %1$s %2$s', 'nelioab'), $options, $name); ?> <a href="javascript:;" class="delete"><?php _e('Delete'); ?> </a> </div> </div> <div style="display:none;"> <span id="defaultNameForMainGoal" style="display:none;"><?php _e('Default', 'nelioab'); ?> </span> <?php $this->print_beautiful_box('goal-template', '<span class="form" style="font-weight:normal;">' . ' <input type="text" class="new-name">' . ' <a class="button rename">' . __('Save') . '</a>' . '</span>' . '<span class="name" style="display:none;">' . ' <span style="width:25%;max-width:120px;float:right">' . ' <input style="width:100%;" type="number" min="1" class="benefit" placeholder="' . sprintf(__('Benefit - %1$s%2$s', 'nelioab'), NelioABSettings::get_conv_unit(), NelioABSettings::get_def_conv_value()) . '" />' . ' </span>' . ' <span class="value">' . __('Unnamed Goal', 'nelioab') . '</span>' . ' <small class="isMain" style="display:none;font-weight:normal;">' . __('[Main Goal]', 'nelioab') . '</small><br>' . ' <div class="row-actions">' . ' <span class="rename"><a href="javascript:;">' . __('Rename') . '</a></span>' . ' <span class="sep">|</span>' . ' <span class="delete"><a href="javascript:;">' . __('Delete') . '</a></span>' . ' </div>' . '</span>', array($this, 'print_new_card_content')); ?> </div> <div id="goal-list"></div> <h2 style="text-align:center;margin-top:-10px;"><a class="add-new-h2" href="javascript:;" onClick="javascript:NelioABGoalCards.create();"><?php _e('Add Additional Goal', 'nelioab'); ?> </a></h2> <?php }
public static function print_def_conv_value_field() { $field_name = 'def_conv_value'; $value = sprintf('<input type="text" id="%1$s" name="nelioab_settings[%1$s]" value="%2$s" placeholder="%3$s" $4%s style="max-width:5em;" />', $field_name, NelioABSettings::get_def_conv_value(), NelioABSettings::DEFAULT_CONVERSION_VALUE, self::get_basic_details()); $field_name = 'conv_unit'; ob_start(); printf('<select id="%1$s" name="nelioab_settings[%1$s]" %2$s>', $field_name, self::get_basic_details()); ?> <?php $val = NelioABSettings::CONVERSION_UNIT_DOLLAR; ?> <option value='<?php echo $val; ?> '><?php echo $val; ?> </option> <?php $val = NelioABSettings::CONVERSION_UNIT_EURO; ?> <option value='<?php echo $val; ?> '<?php if (NelioABSettings::get_conv_unit() == $val) { echo ' selected="selected"'; } ?> ><?php echo $val; ?> </option> <?php $val = NelioABSettings::CONVERSION_UNIT_POUND; ?> <option value='<?php echo $val; ?> '<?php if (NelioABSettings::get_conv_unit() == $val) { echo ' selected="selected"'; } ?> ><?php echo $val; ?> </option> <?php $val = NelioABSettings::CONVERSION_UNIT_YEN; ?> <option value='<?php echo $val; ?> '<?php if (NelioABSettings::get_conv_unit() == $val) { echo ' selected="selected"'; } ?> ><?php echo $val; ?> </option> <?php $val = NelioABSettings::CONVERSION_UNIT_BITCOIN; ?> <option value='<?php echo $val; ?> '<?php if (NelioABSettings::get_conv_unit() == $val) { echo ' selected="selected"'; } ?> ><?php echo $val; ?> </option> </select> <?php $unit = ob_get_contents(); ob_end_clean(); printf(__('%1$s %2$s', 'nelioab', 'conversion-unit-and-value'), $unit, $value); ?> <div class="the-descr" style="display:none;"><span class="description"><?php _e('Define a default value (in money units) for your conversions. This value could be, for instance, the average benefit you obtain every time a visitor converts (that is, she buys a product or subscribes to a service). The conversion value can be overwritten when adding goals into an experiment.', 'nelioab'); ?> </span></div><?php }
protected function print_the_real_alternatives() { // REAL ALTERNATIVES // ----------------------------------------- $exp = $this->exp; $the_themes = wp_get_themes(); if ($this->results == null) { $alt_results = null; $ori_conversions = 0; } else { $alt_results = $this->results->get_alternative_results(); $ori_conversions = $alt_results[0]->get_num_of_conversions(); // in this function, the original alternative is NOT used $alt_results = array_slice($alt_results, 1); } $conversions_label = __('Conversions', 'nelioab'); $pageviews_label = __('Pageviews', 'nelioab'); $conversion_views_label = __('Conversions / Views', 'nelioab'); $conversion_rate_label = __('Conversion Rate', 'nelioab'); $alternative_label = __('Alternative', 'nelioab'); $colorscheme = NelioABWpHelper::get_current_colorscheme(); $color = $colorscheme['primary']; $base_color = $color; $i = 0; foreach ($exp->get_alternatives() as $alt) { $i++; $action_links = array(); $name = $this->trunk($alt->get_name()); $icon = $this->get_experiment_icon($exp); $id = $alt->get_id(); $graphic_id = 'graphic-' . $id; if ($alt_results != null) { $alt_result = $alt_results[$i - 1]; $pageviews = $alt_result->get_num_of_visitors(); $conversions = $alt_result->get_num_of_conversions(); $conversion_rate = $alt_result->get_conversion_rate(); $improvement_factor = $alt_result->get_improvement_factor(); } else { $pageviews = 0; $conversions = 0; $conversion_rate = 0.0; $improvement_factor = 0.0; } $alt_conversion_views = $conversions . ' / ' . $pageviews; $aux = $ori_conversions * $this->goal->get_benefit() * $improvement_factor / 100; $print_improvement = true; // format improvement factor if ($improvement_factor < 0) { $arrow = 'fa-arrow-down'; $stats_color = 'red'; $improvement_factor = $improvement_factor * -1; } else { if ($improvement_factor > 0) { $arrow = 'fa-arrow-up'; $stats_color = 'green'; } else { // $improvement_factor = 0.0 $arrow = 'fa-none'; $stats_color = 'black'; $print_improvement = false; } } if ($aux > 0) { $gain = sprintf(__('%1$s%2$s', 'nelioab', 'money'), NelioABSettings::get_conv_unit(), number_format_i18n($aux, 2)); } else { $gain = sprintf(__('%1$s%2$s', 'nelioab', 'money'), NelioABSettings::get_conv_unit(), number_format_i18n($aux * -1, 2)); } $alt_conversion_rate = number_format_i18n(floatval($conversion_rate), 2) . ' %'; $alt_improvement_factor = number_format_i18n(floatval($improvement_factor), 2) . ' %'; $alternative_number = $i; $winner_color = ''; if ($this->is_winner($alt->get_id())) { $icon = $this->get_winner_icon($exp); $color = $colorscheme['winner']; $winner_color = 'style="background-color:' . $colorscheme['primary'] . ';color:' . $colorscheme['foreground'] . ';"'; } else { $color = $base_color; } $theme = null; $theme_image = '#'; foreach ($the_themes as $t) { if ($t['Stylesheet'] == $alt->get_value()) { $theme = $t; $theme_image = $t->get_screenshot(); break; } } if ($theme != NULL && $exp->get_status() == NelioABExperiment::STATUS_FINISHED) { $img = '<span id="loading-' . $alt->get_value() . '" class="dashicons dashicons-update fa-spin animated nelio-apply"></span>'; $aux = sprintf(' <a class="apply-link button" href="javascript:nelioab_confirm_overwriting(\'%1$s\', \'%2$s\', \'%3$s\');">%4$s %5$s</a>', $alt->get_value(), $theme['Stylesheet'], $theme['Template'], $img, __('Apply', 'nelioab')); array_push($action_links, $aux); } $buttons = implode(' ', $action_links); if (!$print_improvement) { $gain = ''; $alt_improvement_factor = ''; } $result = <<<HTML \t\t\t\t<div class="nelio-alternative alternative-{$i} postbox nelio-card"> \t\t\t\t\t<div class="alt-info-header" {$winner_color}> \t\t\t\t\t\t{$icon} \t\t\t\t\t\t<span class="alt-title">{$name}</span> \t\t\t\t\t</div> \t\t\t\t\t<div class="alt-info-body"> \t\t\t\t\t\t<div class="alt-screen hover-img-fade" id="{$id}" style="color:{$color};"> \t\t\t\t\t\t\t<img class="alt-theme-img" src="{$theme_image}" width="320" height="240"> \t\t\t\t\t\t\t\t<div class="alt-name"> \t\t\t\t\t\t\t\t\t{$alternative_label} \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t<div class="alt-number"> \t\t\t\t\t\t\t\t\t{$alternative_number} \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t</div> \t\t\t\t\t\t<div class="alt-stats"> \t\t\t\t\t\t\t<div class="alt-stats-graphic" id="{$graphic_id}"></div> \t\t\t\t\t\t\t<div class="alt-status"> \t\t\t\t\t\t\t\t<div class="alt-cv"> \t\t\t\t\t\t\t\t\t<span class="alt-cv-title">{$conversion_views_label}</span> \t\t\t\t\t\t\t\t\t<span class="alt-cv">{$alt_conversion_views}</span> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t<div class="alt-cr"> \t\t\t\t\t\t\t\t\t<span class="alt-cr-title">{$conversion_rate_label}</span> \t\t\t\t\t\t\t\t\t<span class="alt-cr">{$alt_conversion_rate}</span> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t<div class="alt-stats" style="color:{$stats_color};"> \t\t\t\t\t\t\t\t\t<span class="alt-if"><i class="fa {$arrow}" style="vertical-align: top;"></i>{$alt_improvement_factor}</span> \t\t\t\t\t\t\t\t\t<span class="alt-ii"><i class="fa {$arrow}" style="vertical-align: top;"></i>{$gain}</span> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t</div> \t\t\t\t\t</div> \t\t\t\t\t<div class="alt-info-footer"> \t\t\t\t\t\t<div class="alt-info-footer-content"> \t\t\t\t\t\t\t{$buttons} \t\t\t\t\t\t</div> \t\t\t\t\t</div> \t\t\t\t</div> \t\t\t\t<script> \t\t\t\tjQuery(document).ready(function() { \t\t\t\t\tdrawAlternativeGraphic('{$graphic_id}', \t\t\t\t\t\t{$conversions}, \t\t\t\t\t\t'{$conversions_label}', \t\t\t\t\t\t'{$color}', \t\t\t\t\t\t{$pageviews}, \t\t\t\t\t\t'{$pageviews_label}'); \t\t\t\t}); \t\t\t\t</script> HTML; echo $result; } }
protected function print_the_real_alternatives() { // REAL ALTERNATIVES // ----------------------------------------- $exp = $this->exp; if ($this->results == null) { $alt_results = null; $ori_conversions = 0; } else { $alt_results = $this->results->get_alternative_results(); $ori_conversions = $alt_results[0]->get_num_of_conversions(); // in this function, the original alternative is NOT used $alt_results = array_slice($alt_results, 1); } $conversions_label = __('Conversions', 'nelioab'); $pageviews_label = __('Pageviews', 'nelioab'); $conversion_views_label = __('Conversions / Views', 'nelioab'); $conversion_rate_label = __('Conversion Rate', 'nelioab'); $alternative_label = __('Alternative', 'nelioab'); $colorscheme = NelioABWpHelper::get_current_colorscheme(); $color = $colorscheme['primary']; $base_color = $color; $i = 0; foreach ($exp->get_alternatives() as $alt) { $i++; $name = $this->trunk($alt->get_name()); $icon = $this->get_experiment_icon($exp); $id = $alt->get_id(); $graphic_id = 'graphic-' . $id; if ($alt_results != null) { $alt_result = $alt_results[$i - 1]; $pageviews = $alt_result->get_num_of_visitors(); $conversions = $alt_result->get_num_of_conversions(); $conversion_rate = $alt_result->get_conversion_rate(); $improvement_factor = $alt_result->get_improvement_factor(); } else { $pageviews = 0; $conversions = 0; $conversion_rate = 0.0; $improvement_factor = 0.0; } $alt_conversion_views = $conversions . ' / ' . $pageviews; $aux = $ori_conversions * $this->goal->get_benefit() * $improvement_factor / 100; $print_improvement = true; // format improvement factor if ($improvement_factor < 0) { $arrow = 'fa-arrow-down'; $stats_color = 'red'; $improvement_factor = $improvement_factor * -1; } else { if ($improvement_factor > 0) { $arrow = 'fa-arrow-up'; $stats_color = 'green'; } else { // $improvement_factor = 0.0 $arrow = 'fa-none'; $stats_color = 'black'; $print_improvement = false; } } if ($aux > 0) { $gain = sprintf(__('%1$s%2$s', 'nelioab', 'money'), NelioABSettings::get_conv_unit(), number_format_i18n($aux, 2)); } else { $gain = sprintf(__('%1$s%2$s', 'nelioab', 'money'), NelioABSettings::get_conv_unit(), number_format_i18n($aux * -1, 2)); } $alt_conversion_rate = number_format_i18n(floatval($conversion_rate), 2) . ' %'; $alt_improvement_factor = number_format_i18n(floatval($improvement_factor), 2) . ' %'; $alternative_number = $i; $winner = false; $winner_color = ''; if ($this->is_winner($alt->get_id())) { $icon = $this->get_winner_icon($exp); $color = $colorscheme['winner']; $winner_color = 'style="background-color:' . $colorscheme['primary'] . ';color:' . $colorscheme['foreground'] . ';"'; $winner = true; } else { $color = $base_color; } $action_links = $this->get_action_links($exp, $alt->get_id(), $winner); $buttons = implode(' ', $action_links); if (!$print_improvement) { $gain = ''; $alt_improvement_factor = ''; } $result = <<<HTML \t\t\t\t<div class="nelio-alternative alternative-{$i} postbox nelio-card"> \t\t\t\t\t<div class="alt-info-header" {$winner_color}> \t\t\t\t\t\t{$icon} \t\t\t\t\t\t<span class="alt-title">{$name}</span> \t\t\t\t\t</div> \t\t\t\t\t<div class="alt-info-body"> \t\t\t\t\t\t<div class="alt-screen no-hover" id="{$id}" style="color:{$color};"> \t\t\t\t\t\t\t\t<div class="alt-name"> \t\t\t\t\t\t\t\t\t{$alternative_label} \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t<div class="alt-number"> \t\t\t\t\t\t\t\t\t{$alternative_number} \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t</div> \t\t\t\t\t\t<div class="alt-stats"> \t\t\t\t\t\t\t<div class="alt-stats-graphic" id="{$graphic_id}"></div> \t\t\t\t\t\t\t<div class="alt-status"> \t\t\t\t\t\t\t\t<div class="alt-cv"> \t\t\t\t\t\t\t\t\t<span class="alt-cv-title">{$conversion_views_label}</span> \t\t\t\t\t\t\t\t\t<span class="alt-cv">{$alt_conversion_views}</span> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t<div class="alt-cr"> \t\t\t\t\t\t\t\t\t<span class="alt-cr-title">{$conversion_rate_label}</span> \t\t\t\t\t\t\t\t\t<span class="alt-cr">{$alt_conversion_rate}</span> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t\t<div class="alt-stats" style="color:{$stats_color};"> \t\t\t\t\t\t\t\t\t<span class="alt-if"><i class="fa {$arrow}" style="vertical-align: top;"></i>{$alt_improvement_factor}</span> \t\t\t\t\t\t\t\t\t<span class="alt-ii"><i class="fa {$arrow}" style="vertical-align: top;"></i>{$gain}</span> \t\t\t\t\t\t\t\t</div> \t\t\t\t\t\t\t</div> \t\t\t\t\t\t</div> \t\t\t\t\t</div> \t\t\t\t\t<div class="alt-info-footer"> \t\t\t\t\t\t<div class="alt-info-footer-content"> \t\t\t\t\t\t\t{$buttons} \t\t\t\t\t\t</div> \t\t\t\t\t</div> \t\t\t\t</div> \t\t\t\t<script> \t\t\t\tjQuery(document).ready(function() { \t\t\t\t\tdrawAlternativeGraphic('{$graphic_id}', \t\t\t\t\t\t{$conversions}, \t\t\t\t\t\t'{$conversions_label}', \t\t\t\t\t\t'{$color}', \t\t\t\t\t\t{$pageviews}, \t\t\t\t\t\t'{$pageviews_label}'); \t\t\t\t}); \t\t\t\t</script> HTML; echo $result; } }
protected function print_experiment_status($exp, $res, $the_winner, $the_winner_confidence, $originals_conversion_rate, $best_alt, $best_alt_conversion_rate, $best_alt_improvement_factor) { if ($res) { $message = NelioABGTest::generate_status_message($res->get_summary_status()); } else { $message = NelioABGTest::generate_status_message(false); } $src = nelioab_admin_asset_link('/images/progress-no.png'); if ($best_alt > 0) { $best_alt = '(' . __('Alternative', 'nelioab') . ' ' . $best_alt . ')'; } else { $best_alt = ''; } $arrow = ''; $stats_color = 'auto'; $gain = ''; if (self::NO_WINNER == $the_winner) { $main_message = __('Testing...', 'nelioab'); if (NelioABExperiment::STATUS_RUNNING == $exp->get_status()) { $status_message = __('No alternative is better than the rest', 'nelioab'); } else { $status_message = __('No alternative was better than the rest', 'nelioab'); } } else { $main_message = __('¡Winner!', 'nelioab'); if ($the_winner == 0) { if ($the_winner_confidence >= NelioABSettings::get_min_confidence_for_significance()) { $status_message = sprintf(__('Original wins with a %1$s%% confidence', 'nelioab'), $the_winner_confidence); } else { $status_message = sprintf(__('Original wins with just a %1$s%% confidence', 'nelioab'), $the_winner_confidence); } } else { if ($the_winner_confidence >= NelioABSettings::get_min_confidence_for_significance()) { $status_message = sprintf(__('Alternative %1$s wins with a %2$s%% confidence', 'nelioab'), $the_winner, $the_winner_confidence); } else { $status_message = sprintf(__('Alternative %1$s wins with just a %2$s%% confidence', 'nelioab'), $the_winner, $the_winner_confidence); } } if ($the_winner_confidence >= NelioABSettings::get_min_confidence_for_significance()) { $src = nelioab_admin_asset_link('/images/progress-yes.png'); } else { $src = nelioab_admin_asset_link('/images/progress-yes-no.png'); } } $print_improvement = false; if (is_numeric($best_alt_improvement_factor)) { // gain $alt_results = $this->results->get_alternative_results(); $ori_conversions = $alt_results[0]->get_num_of_conversions(); $aux = $ori_conversions * $this->goal->get_benefit() * $best_alt_improvement_factor / 100; $print_improvement = true; // format improvement factor if ($best_alt_improvement_factor < 0) { $arrow = 'fa-arrow-down'; $stats_color = 'red'; $best_alt_improvement_factor = $best_alt_improvement_factor * -1; } else { if ($best_alt_improvement_factor > 0) { $arrow = 'fa-arrow-up'; $stats_color = 'green'; } else { $print_improvement = false; $arrow = 'fa-arrow-none'; $stats_color = 'black'; } } if ($aux > 0) { $gain = sprintf(__('%1$s%2$s', 'nelioab', 'money'), NelioABSettings::get_conv_unit(), number_format_i18n($aux, 2)); } else { $gain = sprintf(__('%1$s%2$s', 'nelioab', 'money'), NelioABSettings::get_conv_unit(), number_format_i18n($aux * -1, 2)); } } ?> <div id="info-status"> <span class="main-message"><?php echo $main_message; ?> </span> <img src="<?php echo $src; ?> " title="<?php echo $message; ?> " alt="<?php echo $message; ?> " class="masterTooltip animated flipInY"/> <span class="additional-message"><?php echo $status_message; ?> </span> </div> <div id="ori-status"> <span class="ori-name"><?php _e('Original', 'nelioab'); ?> </span> <div id="ori-cr"> <span class="ori-cr-title"><?php _e('Conversion Rate', 'nelioab'); ?> </span> <span class="ori-cr-value"><?php printf('%s %%', $originals_conversion_rate); ?> </span> </div> </div> <div id="alt-status"> <span class="alt-name"><?php _e('Best Alternative', 'nelioab'); ?> <?php echo $best_alt; ?> </span> <div id="alt-cr"> <span class="alt-cr-title"><?php _e('Conversion Rate', 'nelioab'); ?> </span> <span class="alt-cr"><?php printf('%s %%', $best_alt_conversion_rate); ?> </span> </div> <div id="alt-stats" style="color:<?php echo $stats_color; ?> ;"> <span class="alt-if"><i class="fa <?php echo $arrow; ?> " style="vertical-align: top;"></i><?php if ($print_improvement) { printf('%s%%', $best_alt_improvement_factor); } ?> </span> <span class="alt-ii"><i class="fa <?php echo $arrow; ?> " style="vertical-align: top;"></i><?php if ($print_improvement) { echo $gain; } ?> </span> </div> </div> <?php }