Any test you would like to run.
customer_id
subject type (one which identifies unique customers in some internal database), an experiment variant will be assigned to each unique customer_id
encountered. When that customer_id
is seen again in the future, it will receive the same variant it did previously for the experiment. (that is, until a winner is declared - read about the experiment lifecycle).
metadata
section. The following properties within metadata
are shared across all resource types:
Key | Data Type | Description |
---|---|---|
id | string | Unique identifier. Case insensitive and consist of alphanumeric characters, ’-’, ’_’ or ’.’ For example: home-page-test . IDs will be stored and displayed in UPPERCASE. |
name | string | Name of the resource. |
description | string | Description of the resource. |
resourceVersion | int | Modification version for a given resource. Incremented each time the resource is updated. This will be shown when retreiving a resource, but is ignored if provided as part of a resource update. |
status | ResourceStatus | The status of the resource. |
parentKind | lab | The kind of resouce this one belongs to. Only applies to experiments, in which case the value is lab . Exclude for non experiments. |
parentId | string | The ID of the resources parent. Only applies to experiments and the ID of its parent lab. Exclude for non experiments. If an experiment does not specified a parentID , it defaults to DEFAULT . |
ResourceStatus
Status | Description | Resources |
---|---|---|
draft | The experiment exists, but is not ready to go live. | Experiment |
active | The experiment is live and making/tracking/returned assignments. | All |
winner_declared | A winner has been declared. | Experiment |
ended | The experiment has ended. No assignments are made/returned. | Experiment |
archived | The experiment has ended and is archived from view. | All |
Key | Data Type | Description |
---|---|---|
subjectType | string | ID of the Subject to use for this experiment. If not specified, will default to ANY , which allows any non-empty subject ID. |
hypothesis | string | An open field for stating the experiment hypothesis. |
links | map<string,string> | Map of links to store as metadata for the experiment. Such as links to PRDs, analysis, etc. |
variants | Variant[] | List of variants. See below. |
cohorts | Cohort[] | List of cohorts. See below. |
winningVariant | string | ID of the winning variant, once status is changed to winner_declared. |
endedReason | EndedReason | Why the experiment was ended. See below. There’s not practical use for this field, but rather is for record keeping. |
EndedReason
Key | Description |
---|---|
success | The experiment was a success, achieving statistical significance. |
tech_issue | There was a technical or implementation issue and the experiment was ended. |
no_longer_needed | The experiment is no longer needed or relevant. |
no_stat_sig | The experiment ran fine, but did not reach statistical significance. |
other |
Variant
Key | Data Type | Description |
---|---|---|
id | string | Unique ID for the variant. Case insensitive and consist of alphanumeric characters, ’-’, ’_’ or ’.’ For example: treatment-a . Variants will be stored and displayed in UPPERCASE. |
isControl | bool | Whether the variant is the control. Only one Variant may have this set per experiment. |
name | string | The name of the variant. |
description | string | Description of the variant. |
Cohort
Key | Data Type | Description |
---|---|---|
index | int | A unique integer auto-assigned to each cohort. This field is required and must be set to the next integer in sequence for her cohorts. If the previous cohort was 4 , the new cohort must have value 5 . |
variants | CohortVariant[] | List of variants in this cohort with associated context. See below. |
createdAt | timestamp | When the cohort was created. This will be set automatically for new cohorts. Be sure to maintain the original values for existing/past cohorts when updating an experiment. |
CohortVariant
Key | Data Type | Description |
---|---|---|
variant | string | ID of the Variant that’s active within the cohort. |
split | float | What percentage of traffic should see this variant. All split values within a Cohort must equal 1.000 . |
0.500
, 50% of subjects will be assigned the variant.
control
variant, but treatment-a
was declared the winner, the subject would be returned treatment-a
on subsequent requests after the status change.
This status should be used for experiments that are over, but are still depended upon by technical implementations. Once there are no dependencies on these experiment being active, it should be changed to “Ended”.
active
or winner declared
status.
In active
, they will be assigned according to the split
defined for that variant within the active cohort. If a subject is seen more than once, it will always receive the same variant it was assigned the first time.
If in the winner declared
status, all subjects will receive the winning variant, regardless of the original assignment.
index
of 2
since it’s the next in the sequence.