We have had requests from our customers using React / Redux who would like to use Convert to create AB experiments and experiences.
There is one method detailed here that you might want to consider.
In the following paragraphs we will describe another method that we have tested and verified as working.
The method recommended here will prevent you from needing to rebuild the application every time you deploy an AB test or personalization. However, there are some caveats:
- You cannot utilize the Visual Editor WYSIWYG features.
- Testing and deployment of personalizations has to be done by developers.
When running one experiment at a time
The convertHook() should include all your changes in the following way:
The convertHook can be used when you don't want to edit your React / Redux modules.
Here is an example how this function needs to be called within your React app, in this case in the App.js file:
This method is not compatible if running multiple experiments simultaneously. However, you will not need to change the code modules every time you launch a new experiment.
Running multiple experiments simultaneously
In this option, you will have to edit your modules to call each experiment specifically using code similar to the following:
window._conv_q = window._conv_q || ;
You can find more information on how this code works here.
The modules would look like the following:
This method, however, will require that you edit your modules every time you implement a new experiment, but allows you to run multiple experiments at the same time.
Launching the experiments
You can find different methods available to you to launch experiments with your React app in the following Single Page Apps article.