|
| 1 | +## 2.0.0-beta1 |
| 2 | +May 29th, 2018 |
| 3 | + |
| 4 | +This beta release introduces APIs for Feature Management. It also introduces some breaking changes listed below. |
| 5 | + |
| 6 | +### New Features |
| 7 | +- Introduced the `isFeatureEnabled` API to determine whether to show a feature to a user or not. |
| 8 | +``` |
| 9 | +$isEnabled = $optimizelyClient->isFeatureEnabled('my_feature_key', 'my_user', $userAttributes); |
| 10 | +``` |
| 11 | + |
| 12 | +- You can also get all the enabled features for the user by calling: |
| 13 | +``` |
| 14 | +$enabledFeatures = $optimizelyClient->getEnabledFeatures('my_user', $userAttributes); |
| 15 | +``` |
| 16 | + |
| 17 | +- Introduced Feature Variables to configure or parameterize a feature. There are four variable types: `String`, `Integer`, `Double`, `Boolean`. |
| 18 | +``` |
| 19 | +$stringVariable = $optimizelyClient->getFeatureVariableString('my_feature_key', 'string_variable_key', 'my_user'); |
| 20 | +$integerVariable = $optimizelyClient->getFeatureVariableInteger('my_feature_key', 'integer_variable_key', 'my_user'); |
| 21 | +$doubleVariable = $optimizelyClient->getFeatureVariableDouble('my_feature_key', 'double_variable_key', 'my_user'); |
| 22 | +$booleanVariable = $optimizelyClient->getFeatureVariableBoolean('my_feature_key', 'boolean_variable_key', 'my_user'); |
| 23 | +``` |
| 24 | + |
| 25 | +### Breaking changes |
| 26 | +- The `track` API with revenue value as a stand-alone parameter has been removed. The revenue value should be passed in as an entry in the event tags dict. The key for the revenue tag is `revenue` and the passed in value will be treated by Optimizely as the value for computing results. |
| 27 | +``` |
| 28 | +$eventTags = ['revenue' => 4200]; |
| 29 | +
|
| 30 | +$optimizelyClient->track('event_key', 'user_id', $userAttributes, $eventTags); |
| 31 | +
|
1 | 32 | ## 1.5.0
|
2 | 33 | - Added support for notification listeners.
|
3 | 34 | - Added support for IP anonymization.
|
|
10 | 41 | - Added the forced bucketing feature, which allows customers to force users into variations in real time for QA purposes without requiring datafile downloads from the network. The following APIs are introduced:
|
11 | 42 | ```
|
12 | 43 | /**
|
13 |
| -* Force a user into a variation for a given experiment. |
14 |
| -* |
15 |
| -* @param $experimentKey string Key identifying the experiment. |
16 |
| -* @param $userId string The user ID to be used for bucketing. |
17 |
| -* @param $variationKey string The variation key specifies the variation which the user |
18 |
| -* will be forced into. If null, then clear the existing experiment-to-variation mapping. |
19 |
| -* |
20 |
| -* @return boolean A boolean value that indicates if the set completed successfully. |
21 |
| -*/ |
| 44 | + * Force a user into a variation for a given experiment. |
| 45 | + * |
| 46 | + * @param $experimentKey string Key identifying the experiment. |
| 47 | + * @param $userId string The user ID to be used for bucketing. |
| 48 | + * @param $variationKey string The variation key specifies the variation which the user |
| 49 | + * will be forced into. If null, then clear the existing experiment-to-variation mapping. |
| 50 | + * |
| 51 | + * @return boolean A boolean value that indicates if the set completed successfully. |
| 52 | + */ |
22 | 53 | ```
|
23 | 54 | ```
|
24 | 55 | public function setForcedVariation($experimentKey, $userId, $variationKey);
|
25 | 56 |
|
26 | 57 | /**
|
27 |
| -* Gets the forced variation for a given user and experiment. |
28 |
| -* |
29 |
| -* @param $experimentKey string Key identifying the experiment. |
30 |
| -* @param $userId string The user ID to be used for bucketing. |
31 |
| -* |
32 |
| -* @return string|null The forced variation key. |
33 |
| -*/ |
| 58 | + * Gets the forced variation for a given user and experiment. |
| 59 | + * |
| 60 | + * @param $experimentKey string Key identifying the experiment. |
| 61 | + * @param $userId string The user ID to be used for bucketing. |
| 62 | + * |
| 63 | + * @return string|null The forced variation key. |
| 64 | + */ |
34 | 65 | public function getForcedVariation($experimentKey, $userId);
|
35 | 66 | ```
|
36 | 67 |
|
|
0 commit comments