Sanford Whiteman

Lightweight A/B testing using Velocity

Blog Post created by Sanford Whiteman on Jan 20, 2018

Velocity's MathTool ($math in Marketo's Script Editor) offers the convenience function random() to generate a random number in a given range.

As I suggested to user LD in this thread, you can use random()to randomly select content for quick-and-dirty A/B tests.

For example, this will choose one of 3 link titles at random for every lead in a send:


#set( $random = $math.random(0,3) )
#set( $linkText = {
  0 : "Get the best rates here!",
  1 : "Load your truck!",
  2 : "Get moving!"
<a href="" id="linkText${random}">${linkText[$random]}</a>



Read the full post on TEKNKL :: Blog →