How to prepare an A/B test to re-target users in a specific variant

If your test is already live and you haven't  followed the below steps, you can check how to target users  in one of its variants in this guide:

If you are yet to launch your A/B test, the following guide will help you prepare it, so you can easily target users in any of its variants later on. Leanplum currently has 2 ways of A/B testing:


A/B test in the Campaigns page:

To be able to target users from a specific variant, we will create multiple campaigns - one for each variant:

  1. Create your campaign and duplicate it as many times as needed - no need to a copy for the Control Group.
  2. In the Audience tab of each campaign, add the following audience rule in addition to whatever rules you already have:
    Bucket is between X and Y
  3. This rule will serve to define the range of the userbase for each A/B test variant. Each user has a bucket between 0-999. Targeting buckets 0-499 will essentially target 50% of your userbase for that campaign. Example setup:
    1. Campaign 1 - Buckets: 100-399
    2. Campaign 2 - Buckets: 400-699
    3. Campaign 3 - Buckets: 700-999
      * The above setup starts from bucket 100, as we leave buckets 0-99 as he control group that doesn't receive anything.
    4. Name the campaigns accordingly for each variant and they are ready for launch.

    5. Once you need to re-target users form one of the variants, simply target them based on he campaign enter event.
      Example: Total occurrences of Campaign 3 Enter is greater than 0


A/B test in the A/B  testing page:

  1. Create your A/B test
  2. Add whichever Messages (from the legacy Messaging page) or Variables you would like.
  3. Create a Webhook message in the legacy Messaging page. Leave the URL field in the composer empty.
  4. Set he audience to the same audience of the A/B test
  5. Duplicate the Webhook message multiple times - one for each A/B test variant, including the control group. Name them accordingly.
  6. Add all of them to he A/B test. For each variant, make sure only of the Webhook messages is enabled (its checkbox should be checked)
  7. Start the A/b test. It will send all your normal messages + the empty webhooks. The latter will have no impact on the users but will track a Sent event.

  8. Once you need to re-target users form one of the variants, simply target them based on the respective Webhook Sent event.
    Example: Total occurrences of Webhook3 Sent is greater than 0

Was this article helpful?
Have more questions? Submit a request