Once an A/B testing block has been created, we want to render it on the frontend. We have some existing rendering through custom components for our existing experiments, but @roborourke has identified that markup/elements may not be great.
We might want to bring this closer to how personalisation works instead. Personalisation has a container custom element, and variant custom elements; it then conditionally chooses which of these to render. We want to do a similar thing, except by using our random selection instead of based on audiences.
The handling for events will "mash the logic together" 8)
Acceptance criteria:
[x] A/B testing block dynamically selects variant based on weighting
[x] ... renders the selected variant into the page
[x] ... tracks the block's client ID with all associated events
[x] ... tracks the number of block loads, views, and conversions
[x] Output of the block uses nested variant components, instead of data attributes (i.e. same as personalisation blocks)
Once an A/B testing block has been created, we want to render it on the frontend. We have some existing rendering through custom components for our existing experiments, but @roborourke has identified that markup/elements may not be great.
We might want to bring this closer to how personalisation works instead. Personalisation has a container custom element, and variant custom elements; it then conditionally chooses which of these to render. We want to do a similar thing, except by using our random selection instead of based on audiences.
The handling for events will "mash the logic together" 8)
Acceptance criteria: