Using Feature flags

Yes, my head is 2 steps forward.

now you have the A/B test and how do you now know if A or B is better.

You would need to do someting special in the frontend to get that data you need exept if it was for example. redirects to an other page.