diff --git a/src/Pluf/AB/Funnel.php b/src/Pluf/AB/Funnel.php index ab74ffc..5f0be7a 100644 --- a/src/Pluf/AB/Funnel.php +++ b/src/Pluf/AB/Funnel.php @@ -148,10 +148,13 @@ class Pluf_AB_Funnel } $t1 = $steps[1]['total']; $tprops = array(); - foreach ($steps[1]['props'] as $v => $t) { - $tprops[$v] = $t; // some properties are set only in the - // middle of the funnel, we get the - // value in the step. + if (isset($steps[1]['props'])) { + foreach ($steps[1]['props'] as $v => $t) { + $tprops[$v] = $t; + // some properties are set only in the + // middle of the funnel, we get the + // value in the step. + } } for ($i=2;$i<=20;$i++) { if ($steps[$i] and $steps[$i-1]) { diff --git a/src/Pluf/templates/pluf/ab/funnel.html b/src/Pluf/templates/pluf/ab/funnel.html index 3daf8dd..c11f836 100644 --- a/src/Pluf/templates/pluf/ab/funnel.html +++ b/src/Pluf/templates/pluf/ab/funnel.html @@ -70,18 +70,18 @@ {assign $i = $i-1}

{$stats[$i]['total']} out of {$stats['1']['total']} visitors reached step {$i} of this funnel. This is a completion rate of {$stats[$i]['conv1']}.

- +{if count($props) and isset($stats[$i]['sprops1'])}
{assign $stepprops = $stats[$i]['sprops1']}

Visitor Property {$prop}

{foreach $stepprops as $k=>$t}

{$k}: {assign $nn = $t[1]} {$t[0]} out of {blocktrans $nn}{$nn} visitor{plural}{$nn} visitors{/blocktrans}{if $t[2]} ({$t[2]}){/if} {/foreach}

-
+{/if}

Note that if a user skip a given step, this can make the results a bit -off. For the overall property funnel statistics, the first step where a given -appears is used as the base value. +off.{if count($props)} For the overall property funnel statistics, the first step where a given +appears is used as the base value.{/if}

{else}

We do not have statistics for this period.