What is the order of operations when a force parameter is applied?
This is a question I've wondered about for some time, but the particular use-case that has led me to ask here, is a manually activated experiment that is being activated by another 100% experiment with a single variation (v0).
In order to force the variation that we wish to see to appear, we've stacked two force parameters on top of each other:
.. where 12345678 is the ID for the 100% experiment with only one variation (=0) which is activating the experiment with the ID of 87654321 .
The KB article, "Force a specific variation to run", says this about manually activated experiments:
"If you are Manually activating your experiment, the optimizely_x parameter will not activate your experiment. Your experiment will need to be turned on in order for you to force your variations."
This leads me to two questions:
Stacking force parameters in this way, actually does seem to work at times, but not consistently. I'm guessing that there may be some type of race condition when doing this, where Optimizely attempts to run the variation of the second experiment before it has been activated by the 100% activation experiment. 1) Could this be the case or does anyone see any other issue with this method that I'm missing?
2) Overall, when appending the force parameter to a URL, how does this alter Optimzely's order of operations? In a more normal situation where one parameter, or in "stacking" kind of situation like I've mentioned here? The above is one use-case where this question is pertinent, but I've had a number of other situations where understanding how force parameters affect code execution would be useful, especially with manually or conditionally activated experiments.
Thanks in advance for any insight y'all can give!
Jr Web Developer
Thanks for reaching out to Optimizely!
Let's tackle your questions one by one.
1) Could this be the case or does anyone see any other issue with this method that I'm missing?
Normally, they should be activated one after the other. Now because the experiment 12345678 activates 87654321 which itself is also activated by the force parameter this may lead, as you mentionned, to different behaviors depending on what code runs first on pageload.
2) Overall, when appending the force parameter to a URL, how does this alter Optimzely's order of operations?
In a nutshell, this will completely overwrite any of the Optimizely Order of Operations. On pageload, Optimizely will not take into account URL targeting, Audiences or Traffic Allocation settings and will simply execute the experiment and variation filled in in the query parameter. As far as Activation Mode, manual activation will not work and conditional activation will only work if the condition is met.
Feel more than free to reply back with any additional questions at all.