A/B testing

Prev Next

You can A/B test flows, buttons, checklist tasks and other Userflow content with a random attribute. Userflow gives each user a random value for that attribute, such as “A” or “B”, and you show each version only to users with the matching value.

How do I create a Random A/B attribute?

  1. Go to Settings → Attributes.  

  2. Click New attribute.  

  3. Enter a Display name such as “A/B Test Group”.  

  4. Click Create attribute.  

Random attributes are regular user attributes. See Standard Attributes for how attributes work.

Create Random A/B attribute

All users will now randomly be assigned an “A” or “B” value for their “A/B Test Group” attribute. You can see this attribute on users’ profile page.

User with A/B attribute

This is a regular attribute, so you can of course use it anywhere else you can use attributes, such as filters in segments, filtering the Analytics page and in flow conditions.

How users are assigned to an A/B group

Userflow gives each user an “A” or “B” value for a Random A/B attribute at random. A user’s group is set once and never changes, so someone in group B stays in group B.

Running more than one A/B test at the same time

A Random A/B attribute keeps each user in the same group, so every experiment that uses that attribute splits users the same way. If two A/B tests both use “A/B Test Group”, the same users see version B of both.

To keep experiments independent, create a new Random A/B attribute for each one, such as “Checklist test group” and “Welcome tour test group”. For more than two groups, use a Random Number attribute. See Split-testing with more than 2 groups.

How do I A/B test a flow?

Here’s how to A/B test a flow that’s set to auto-start for specific users.

  1. Start with the flow you already have. Rename it “Flow A” so it’s easy to tell apart (click the name at the top of the builder).

  2. Click Add condition under Auto-start flow.  

  3. Choose Attribute in the popover menu.  

  4. Pick your Random A/B attribute, for example “A/B Test Group”.

  5. Select A.  

  6. Create Flow B. The quickest way is to duplicate Flow A with the three-dot button in the top right of the builder, but Flow B can be any flow. For example, Flow A could be a modal and Flow B a speech bubble.

  7. Name it “Flow B”.

  8. In Flow B, set the “A/B Test Group” auto-start condition to B. If you duplicated Flow A, the condition is already there: click it and switch from A to B. If not, add it the same way as steps 2 to 4.

  9. Make whatever variations to Flow B that you’d like.  

  10. Publish both flows.  

Flow builder

Once the flows have been seen by enough users, you can use the Analytics page of each flow to decide which one performs best. Or use your analytics provider. When you pick a winner, unpublish the other flow, remove the “A/B Test Group” condition from the winner, and publish it again.

A/B test buttons, checklist tasks and other content

You can use a condition for the “A/B Test Group” attribute the same way in other places.

For example, one flow can have two buttons, one for each group. Add a “Hide button if” condition on each button using the “A/B Test Group” attribute.

Button testing

The same condition works in checklist tasks, Resource Center blocks and launchers.

How do I split users into more than two groups?

For more than two groups, create a Random number attribute instead:

  1. Go to Settings → Attributes.  

  2. Click New attribute.  

  3. Enter a Display name such as “Split-test Group”.  

  4. Under Between, enter the number of groups you want. If you want 3 groups, then enter 3, which will make Userflow assign a random number between 1 and 3 (both included) to each user.  

  5. Click Create attribute.  

Create Random Number attribute

Use the “Split-test Group” attribute in conditions the same way as a Random A/B attribute, with each flow set to a different number.

Split test 3

Send A/B groups to your analytics tool

When a random attribute is assigned to a user, we also track an event containing the name of the attribute and the specific value that was randomly chosen.

For Random A/B attributes, we track an event named random_ab_assigned. For Random Number attributes, we track an event named random_number_assigned.

Events

These events will be streamed into your analytics provider, such as Mixpanel, Heap, or Amplitude. If you have not set up your analytics provider yet, then see Integrations.

Both events are listed with their attributes in Userflow-generated events.

You can use these events in your analytics provider to filter users.