A/B Testing || Example
<mvt:if expr="g.ab_test_mywordshere EQ 'Value1'">
show value 1
<mvt:elseif expr="g.ab_test_mywordshere EQ 'Value2'">
etc...<mvt:comment><!-- Begin: MyWordsHere AB Test --></mvt:comment>
<mvt:item name="customfields" param="Read_Basket('ab_test_mywordshere', g.ab_test_mywordshere)" />
<mvt:if expr="ISNULL g.ab_test_mywordshere">
<mvt:assign name="g.randomNumber" value="random(100)" />
<mvt:if expr="g.randomNumber GE 50">
<mvt:assign name="g.ab_test_mywordshere" value="'Value1'"/>
<mvt:else>
<mvt:assign name="g.ab_test_mywordshere" value="'Value2'"/>
</mvt:if>
</mvt:if>
<mvt:item name="customfields" param="Write_Basket('ab_test_mywordshere', g.ab_test_mywordshere)" />
<mvt:comment><!-- End: MyWordsHere AB Test --></mvt:comment><mvt:comment> Log view for all versions on the page/pages you are testing (example: PROD only, etc.)</mvt:comment>
<script>
_gaq.push([
'_trackEvent',
'AB Test - My Wording Here',
'AB Test - My Wording Here - View',
null,
null,
true
]);
<mvt:comment> Log specific version (i.e. Control, Blue Sign Up Button, Orange Sign Up Button) </mvt:comment>
_gaq.push([
'_trackEvent',
'AB Test - My Wording Here',
'AB Test - My Wording Here - &mvt:global:ab_test_mywordshere;',
null,
null,
true
]);
</script>
</mvt:if>