Split Testing Conditional

nrep

Well-known member
Is there an easy way to use an XF conditional to do 50/50 split testing? I'm sure I've done this before in XF, but I can't for the life of me remember how. I think it was a conditional that checked to see if the current time ended in an even number.

Can anyone guide me in the correct way to do this? :)
 
Would this work?

Code:
<xen:set var="$rand">{xen:calc '({$serverTime} % 2) + 1'}</xen:set>

<xen:if is="{$rand} == 1">
TEST1
<xen:else />
TEST2
</xen:if>
 
Back
Top Bottom