pluf2

pluf2 Commit Details


Date:2010-04-10 11:27:56 (14 years 8 months ago)
Author:Loic d'Anterroches
Branch:master
Commit:2f8fb90ebd6d024ad9ebb7d471ffdfddd4f750e2
Parents: 6babdf56bea2463f6e2e347ab8cd26654fdb25c4
Message:Fixed a corner case when no stats are available.

Changes:

File differences

src/Pluf/AB/Funnel.php
148148
149149
150150
151
152
153
154
151
152
153
154
155
156
157
155158
156159
157160
}
$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]) {
src/Pluf/templates/pluf/ab/funnel.html
7070
7171
7272
73
73
7474
7575
7676
7777
7878
7979
80
80
8181
8282
83
84
83
84
8585
8686
8787
{assign $i = $i-1}
<p><strong>{$stats[$i]['total']}</strong> out of {$stats['1']['total']} visitors reached step {$i} of this funnel.
This is a completion rate of <strong>{$stats[$i]['conv1']}</strong>.</p>
{if count($props) and isset($stats[$i]['sprops1'])}
<div class="propsstats">{assign $stepprops = $stats[$i]['sprops1']}
<h2>Visitor Property {$prop} </h2>
{foreach $stepprops as $k=>$t}
<p><strong>{$k}</strong>: {assign $nn = $t[1]}
{$t[0]} out of {blocktrans $nn}{$nn} visitor{plural}{$nn} visitors{/blocktrans}{if $t[2]} ({$t[2]}){/if}
{/foreach}</p>
</div>
</div>{/if}
<p class="note">
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}
</p>
{else}
<p>We do not have statistics for this period.</p>

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.09120s using 13 queries.