' . esc_html__('No data yet for this funnel.', 'wp-slimstat') . '
';
return;
}
$step_one_visitors = (int) ($steps[0]['visitors'] ?? 0);
?>
$step) :
$visitors = (int) ($step['visitors'] ?? 0);
$pct = (float) ($step['pct'] ?? 0);
$dropoff = (int) ($step['dropoff'] ?? 0);
$unreachable = !empty($step['unreachable']);
$width = $step_one_visitors > 0 ? max(2, (int) round(($visitors / $step_one_visitors) * 100)) : 0;
$step_num = $index + 1;
// One formatted percentage, reused by the visible label and aria-valuetext
// so the two can never drift (mirrors $pctLabel in goals-funnels.js).
$pct_label = number_format_i18n($pct, ((float) $pct == (int) $pct) ? 0 : 1);
$dropoff_pct = 0;
if ($index > 0 && !empty($steps[$index - 1]['visitors'])) {
$dropoff_pct = round(($dropoff / max(1, (int) $steps[$index - 1]['visitors'])) * 100, 1);
}
?>
-
(%)
style="width:%;"
role="progressbar"
aria-valuemin="0"
aria-valuemax="100"
aria-valuenow=""
aria-valuetext=""
aria-label="">
0 && $dropoff > 0) : ?>