How it works
Each time you create an A/B Test in Preferr, a React component is generated. You'll use this component to wrap two child components, which serve as the variants for your test.
The A/B test component randomly renders one of its two children, and then begins recording impressions and conversions for that component.
Even through React rerenders frequently, Preferr will persist the "winning" component for each of your visitors so that they don't see a UI that is constantly changing.
A visitor will be presented with one of the variants of your A/B Tests as they navigate and interact with your site or app.
It's strongly recommended that you identify your visitors with extra information like a name and email address using Preferr's identify function. Doing so will allow you to glean better insights into what your visitors prefer in your UI.
An impression is recorded everytime a visitor encounters one of your A/B Tests. The variant that they see increments its impressions and that impression is tied to the visitor.
A/B testing isn't only about impressions and clicks. Preferr lets you record conversions any time you'd like using the function Preferr.convert(). This allows you to handle more complex testing scenarios like how much time a visitor spends on a page. Of course, you can also call convert to track button clicks or form submissions as well.