mint-metrics / mojito-website

Static website for Mojito
https://mojito.mx/
BSD 3-Clause "New" or "Revised" License
6 stars 7 forks source link

Add test object parameter reference #6

Closed kingo55 closed 4 years ago

kingo55 commented 4 years ago

Hey guys,

I documented the test object parameters. I'm not 100% sure about the functionality for shared JS/CSS though.

Does this seem accurate?:

Test object: Root level

Parameter Description
css
Type: string
Optional
Shared CSS for the test object that is applied to all recipes.
JS format: Expects a JS string of CSS styles.
YAML format: Expects a relative path to a CSS file.
divertTo
Type: string
Optional
Enable divert mode to send all eligible traffic into a particular recipe's key.
id
Type: string
Required
A canonical test object ID by which subjects' assignments are recorded against.
js
Type: function
Required
Shared JS for the test object that is applied to all recipes.
JS format: Expects a valid JavaScript function on this key.
YAML format: Expects a relative path to a JS file with that function.
name
Type: string
Required
The name of the test object that's useful in tracking.
recipes
Type: object
Required
An object containing the definition of available recipes.
sampleRate
Type: number
Required
The percentage of traffic to assign into the experiment between 0 and 1 (where 1 is 100%)
state
Type: string
Required
A test object's state. Can be either:
live - in the container, accepting traffic into the experiment
staging - built into the container but not accepting traffic without a preview URL
inactive - not parsed or built into the container
trigger
Type: function
Required
A JavaScript function executed as soon as the test object is loaded and can be used to conditionally activate an experiment.
JS format: Expects a valid JavaScript function on this key.
YAML format: Expects a relative path to a JS file with that function.

localhost_3001_docs_js-delivery-test-object

3