The control treatment is a reserved treatment in Split. You cannot create a treatment named control. The control treatment is returned by the SDK in the following scenarios:
-
The targeting rules for a split are not defined. If you place your code behind a split and push your code to production without defining the targeting rules for that split in the web console, the SDK does not have any information on the rules or even the possible treatments of this split. In this scenario, the SDK returns the control treatment.
-
The SDK does not have the feature cached. If a split's definition is not already cached and a treatment is evaluated for that split, then the SDK returns control. The reasons this could happen are:
-
The SDK hasn't finished downloading the initial set of split and segments definitions when
getTreatment
is called. This happens when callinggetTreatment
before SDK_READY event fires after initializing the SDK. -
A running SDK is asked to evaluate a newly defined split, but the definition has not been cached.
-
-
The SDK encounters an exception. SDKs are designed to never throw exceptions or errors. If the SDK encounters an exception, it returns the control treatment.
Tip
When evaluating which treatment to show to a customer, we recommend handling the control treatment in the same way as the default treatment.
Comments
0 comments
Please sign in to leave a comment.