Step 2: Create a split and target users

Step 1: Set your split name and information

To create your first split, click on the “splits” icon in the left navigation and click the button labeled “create split”. From there enter the split name.

Select the traffic type “user” to get started. Traffic types give you the ability to split on different levels of your customers - (e.g. For B2B software, you could create the traffic type "account" or “user”). If you’d like, you can create additional traffic types in settings. Learn more about traffic types. We will refer to the traffic type “user” throughout the rest of this document.

Owners, Tags, and the Description make it easy to sort, filter, and locate the features your team is rolling out. By default administrators and the creator of the split will be considered its owners. Utilize groups with this owner field to organize your splits across your team. Learn more about owners and tags.

Step 2: Add your split to an environment

To configure your Split for a particular environment, select the environment and then click the “add rules” button. Once you click “add rules” you will be able to create and define targeting rules including treatments.

Step 3: Decide who sees what version of your split

Treatments are the different variants or versions of your split that you serve to your users. When you click “add rules” you will be shown the targeting tab for a particular split. You can use this targeting tab to assign your treatments. We preset "on" and "off" for each new split. You can edit these treatment names and/or add additional treatments.

You can use the next three sections - whitelist, traffic allocation, and targeting rules - to explicitly assign treatments or target based on dependencies or demographic data as attributes.

Whitelist: This section allows you to explicitly assign individual users or groups of users to one treatment.

Traffic allocation (advanced): This section allows you to randomly assign a percentage of your users to be evaluated by the rules below. This feature is recommended for more advanced experimentation use cases.

Targeting rules: This section allows you to build out if/else-if statements to use demographic data as attributes to assign treatments to users and/or build dependencies with other features you manage in Split.

The final section default rule, serves as a catch-all for the users not targeted in prior sections. We preset the default rule to "off" to allow you to deploy in a safe state. The default shown below the default rule is used for anyone not included in traffic allocation, or as the safest treatment should you need to kill the split. Learn more about the default treatment.

Click save changes to configure the rules for this split in the environment you selected. Learn more about targeting.

Now that you've set up this split's targeting rules, let's take a look at how this split would work in your code. To split a feature, you can copy and wrap the provided code snippet around your feature's treatments. You can find the code snippet in the syntax in the menu next to Save Changes. Select the language of your application and use the "getTreatment" method to decide which treatment is served to your users. Below is an example in Javascript. Learn more in the basic use section of each SDK reference guide (Javascript example).

To help verify that treatments are being served to your users, click over to the “live impressions” tab. There you can see a stream of impressions or SDK evaluations. Impressions occur whenever a visitor is assigned a treatment (i.e. “variations”) for a split. These Impressions are generated by SDKs each time getTreatment is called. They are periodically sent back to Split's servers where they are stored and can be accessed for later use. Learn more about impressions.