In order to do that, please follow the steps below:
- Create the experiment, as usual, only that in the experiment Site Area, instead of doing a match based on the URL, you would do a match based on a JS condition.
Inside the JS condition, the simplest condition you could use would be like below:
Doing so, the experiment will not automatically fire because that would be false by default; you would make it true in step 2).
- Whenever needed to run the experiment on the page, you need to make sure that:
- experiment condition becomes true; for the above condition you could just add code like:
window.runExperiment = 1;
- trigger the experiment by adding the following code (this should be placed after the code setting window.runExperiment = 1):
window._conv_q = window._conv_q || ;
*in the bold area you'd have to place the experiment ID found inside the application as explained here: http://support.convert.com/hc/en-us/articles/204506639