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:
- Create your campaign and duplicate it as many times as needed - no need to a copy for the Control Group.
- 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
- 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:
- Campaign 1 - Buckets: 100-399
- Campaign 2 - Buckets: 400-699
- 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.
- Name the campaigns accordingly for each variant and they are ready for launch.
- 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:
- Create your A/B test
- Add whichever Messages (from the legacy Messaging page) or Variables you would like.
- Create a Webhook message in the legacy Messaging page. Leave the URL field in the composer empty.
- Set he audience to the same audience of the A/B test
- Duplicate the Webhook message multiple times - one for each A/B test variant, including the control group. Name them accordingly.
- 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)
- 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.
- 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