A/B Testing

You could use A/B testing to test different variations of the same tour. This can help you tweak your tours and achieve the optimal onboarding experience.

1. Add HelpHero.update() script

Add a script after your after your HelpHero installation scripts.

HelpHero.update(function(user) {
  // user is already assigned variant do nothing
  if (user.variant) return null

  // assign user to variant
  return {
    variant: Math.random() >= 0.5 ? 'A' : 'B'
Note: Returning null when user is already in a variant ensures the user is only assigned to a variant once.

2. Setup Tour Variants with Funnels

Now that user is assigned to a variant, we can create two variants of a tour. The first tour will have a Funnel Step targeting variant A and the second tour targeting variant B.