Pluf Framework

Pluf Framework Commit Details


Date:2010-03-24 16:42:44 (14 years 8 months ago)
Author:Loic d'Anterroches
Branch:develop, master
Commit:ad3da80bf689e27ad2bfad4b4aa76759e27d39ab
Parents: 8b45e0493a3aea95c8a2e35b34b83a06e0f06d81
Message:Fixed the percentage stats for the step completion.

Changes:

File differences

src/Pluf/AB/Funnel.php
105105
106106
107107
108
108109
109110
110
111
112
111
112
113
114
113115
114116
115
116117
117118
118119
}
}
// Now, compile the stats for steps 2 to n
$t1 = $steps[1]['total'];
for ($i=2;$i<=20;$i++) {
if ($steps[$i] and $steps[$i-1]) {
//$steps[$i]['conv'] = sprintf('%d', (float)$steps[$i-1]['total']/$steps[$i]['total']*100.0);
$steps[$i]['conv'] = sprintf('%01.2f%%', (float)$steps[$i-1]['total']/$steps[$i]['total']*100.0);
$steps[$i]['conv1'] = sprintf('%01.2f%%', (float)$steps[$i-1]['total']/$steps[1]['total']*100.0);
$tp = $steps[$i-1]['total'];
$tn = $steps[$i]['total'];
$steps[$i]['conv'] = sprintf('%01.2f%%', 100.0 - (float)($tp-$tn)/$tp*100.0);
$steps[$i]['conv1'] = sprintf('%01.2f%%', 100.0 - (float)($t1-$tn)/$t1*100.0);
}
}
return $steps;
}
}

Archive Download the corresponding diff file

Branches

Tags

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