In order to do that, please follow the steps below:
- Create the experiment, as usual, except in the Experiment Locations, 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 this:
If you were to add this initially to a Location, the experiment will not automatically fire because the condition 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:
- the experiment condition becomes true; for the above condition you could just add code like the following on your source page:
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