Components
Experiment

Experiment

The <Experiment /> component is used to wrap a set of <Variant /> components. It will render one of the variants at random, unless the visitor is a returning visitor. In that case, the previously shown variant will be displayed again within a 24-hour period.

When a variant is selected and displayed to your visitor, the <Experiment /> component sends an event to the analytics server known as an impression.

Props

  • experimentId string required

The Id is given in the testnix dashboard.

  • experimentHash string required

The Hash is given in the testnix dashboard.

  • children JSX Elements required

Children must be <Variant /> component.