{extends "pluf/ab/base.html"}
{block body}
<p class="right">» <a href="{url 'pluf_ab_funnels'}">All funnels</a></p>
<h1>Funnel {$funnel} - {$nperiod}</h1>
<p class="right">
<a{if $period == 'today'} class="strong"{/if} href="{url 'pluf_ab_funnel', array($funnel), array('p'=> 'today')}">Today</a> |
<a{if $period == 'yesterday'} class="strong"{/if} href="{url 'pluf_ab_funnel', array($funnel), array('p'=> 'yesterday')}">Yesterday</a> |
<a{if $period == '7days'} class="strong"{/if} href="{url 'pluf_ab_funnel', array($funnel), array('p'=> '7days')}">Last 7 days</a> |
<a{if $period == 'all'} class="strong"{/if} href="{url 'pluf_ab_funnel', array($funnel), array('p'=> 'all')}">All time</a>
</p>
{assign $i=1}
{foreach $stats as $step}{if $step}
{if $i>1}
<p class="right">{$step['total']} ({$step['conv']})<span class="arrow right"></span></p>
{/if}
<h2>Step {$i}: {$step['name']}</h2>
<p>
{if $i>1}
<span class="percent"><span style="width:{$step['conv1']}"></span></span>
{if $step['conv1'] != '100.00%'}<br />
<span class="margin"><span style="width:{$step['conv1']}"></span>{$step['conv1']}</span>{/if}
{else}
<span class="percent"><span style="width:100%"> </span></span>
{/if}<br />{assign $t = $step['total']}
{blocktrans $t}{$t} unique visitor.{plural}{$t} unique visitors.{/blocktrans}
</p>
{assign $i += 1}
{/if}{/foreach}
{if count($stats)}
<hr />
{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>
<p class="note">
Note that if a user skip a given step, this can make the results a bit
off.
</p>
{else}
<p>We do not have statistics for this period.</p>
{/if}
{/block}