Flags in code
To define experimental changes in your site code, you can use special flags. They can be applied to any element on your site. Each flag is a "key-value" pair. For example, as part of your experiment, you can set the color of a button: color=red
.
In this type of experiment, data processing occurs as follows. The point in time at which you can get flag data depends on how your site processes data:
Client-side rendering
You can get flags after processing the page's code, but before rendering the UI. You can also make an asynchronous request for the flags and change the button color after retrieving the value. In this case, the site user may briefly see the page source code when the flag value is applied.
Server-side rendering
You can get flags when response is being created. Varioqub is fast enough to not slow down your site. In this case, you need to:
-
Explicitly pass the user ID and, when you get a new ID (along with flags), set it in the HTTP response.
-
Pass the technical data for the Yandex Metrica tag to the frontend and set it in the corresponding tag field. To learn more, see Usersplit API.
Use cases
-
You want to introduce a new product line (for example, your bank wants to issue a new line of credit cards).
Flags can help you implement changes gradually: add one feature, test it, and — if this feature proves effective — roll it out across the entire product.
-
You have recently opened a new branch of your flower shop network. You want to understand how a personalized offer for new buyers will affect your conversion rate.
To do this, you can assign a property to the selected audience, based on which you will provide a personal discount.
Experiment type
Select Flags.
Setting up page variants
-
If you want to test several variants of text or design, click Add variant. This will add another variant for you to set up within your experiment. The variants will alternate with each other over the course of the experiment.
-
Specify flags for each variant: enter key-value pairs in the Key and Value fields. You may skip specifying flags for the control variant.
To add another flag to the variant, click Add flag.
-
Click Save.
The examples of connecting Varioqub and creating experiments using flags are available on GitHub:
Troubleshooting and questions
I'm trying to create an experiment, but all the fields are locked.
The condition I want to apply isn't available in the Varioqub interface.