Pluf Framework

Pluf Framework Commit Details


Date:2010-04-10 09:45:15 (15 years 26 days ago)
Author:Loic d'Anterroches
Branch:develop, master
Commit:9384edc574f3c4202890861d452997cb5b225e8f
Parents: 93554e74eb1de2e849e8fd550c8bcf9146811d07
Message:Improved the stats in the funnel analysis.

Changes:

File differences

src/Pluf/AB/Funnel.php
131131
132132
133133
134
135
136
134137
135138
136139
......
150153
151154
152155
156
157
158
159
160
161
162
163
164
165
166
167
153168
154169
155170
                if ($prop and !isset($steps[$step]['props'])) {
                    $steps[$step]['props'] = array();
                }
                if ($prop and !isset($log['p'][$prop])) {
                    continue;
                }
                $steps[$step]['total'] = (isset($steps[$step]['total'])) ?
                    $steps[$step]['total'] + 1 : 1;
                if ($prop) {
                $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);
                if ($prop) {
                    $steps[$i]['sprops'] = array();
                    foreach ($steps[$i]['props'] as $v => $t) {
                        $pv = isset($steps[$i-1]['props'][$v]) ? $steps[$i-1]['props'][$v] : 0;
                        $steps[$i]['sprops'][$v] = array($t, $pv);
                        if ($pv) {
                            $steps[$i]['sprops'][$v][] = round(100*(float)$t/(float)$pv,2).'%';
                        } else {
                            $steps[$i]['sprops'][$v][] = 0;
                        }
                    }
                }
            }
        }
        return $steps;
src/Pluf/templates/pluf/ab/funnel.html
3838
3939
4040
41
41
4242
43
43
44
4445
4546
4647
<input type="submit" name="s" value="Filter" />
</form>
{/if}
{elseif isset($step['props'])}{assign $stepprops = $step['props']}
{elseif isset($step['props'])}{assign $stepprops = $step['sprops']}
{foreach $stepprops as $k=>$t}
<p>{$k}: {$t}</p>
<p><strong>{$k}</strong><br/>
{$t[0]} out of {$t[1]} visitors{if $t[2]}({$t[2]}){/if}</p>
{/foreach}
{/if}
</td>

Archive Download the corresponding diff file

Branches

Tags

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