Bucket the visitor into a given variation ID or index.
Syntax
window["optimizely"].push(bucketVisitor);Parameters
| Parameter and Type | Child Attribute | Description | 
|---|---|---|
| bucketVisitor BucketObject | N/A | An object with the type | 
| type | Child attribute of type BucketObject | The argument indicating that you are using the bucketVisitor function. Required. | 
| experimentId | Child attribute of type BucketObject | The ID of an experiment you want to bucket a visitor for. Required. | 
| variationIndex | Child attribute of type BucketObject | The index of the variation you want to bucket the visitor in. Don't use this field when you use the variationId field. | 
| variationId | Child attribute of type BucketObject | The ID of the variation you want to bucket the visitor in. Don't use this field when you use the variationIndex field. | 
Example Call
window["optimizely"].push({
  "type": "bucketVisitor",
  "experimentId": "6661191859",
  "variationIndex": 1
});Description
Bucket the visitor into a given variation.
NoteAt this time, once an experiment > variation mapping for a given visitor has been set, it will not be changed unless this method is used again. The function can be used by providing either a
variationIndexor avariationId.
The association of the experiment to the variation you select will not be changed unless the method is used again. However, the visitor could be bucketed into a different experiment next time they visit, if the API is not used again.