In this article, we explained how you can add conditions to your deployment. In the following article, we will elaborate a bit more on the JS Variable condition.
The values you set in in the conditions are stored as a String. This has some implications if you want to check for a Boolean value in the variable on your page.
JS Variable if the condition is true
Let’s say your specified variable, var1 is true. Adding the condition var1=true will not work, as “true” != true. If var1 is true (boolean), you could use the condition var1=1.
JS Variable if the condition is false
Let’s say your specified variable, var1 is false. Adding the condition var1=false will not work, as “false” != false. If var1 is false (boolean), you could use the condition var1=0.