Reverse Condition Value
Reverse the result of an evaluated condition you have defined by prepending an exclamation mark (!) to the value (e.g. countryCode:!AU).
How Does It Work?
In JavaScript, the exclamation mark is frequently used to negate a boolean expression.
When appended to a value, Geoflow will reverse the outcome of the evaluated condition. This means that if the original result is true, it will be negated to return false, and vice versa.
How To Implement
Attribute Name | Attribute Value | Which Page Element? |
---|---|---|
data-geo-visibility | conditionName:!conditionValue | Any Element |
The exclamation mark (!) must be placed after the semicolon and before the condition value.
Examples
countryCode:!AU
The element is visibile to everyone around the globe, except for those in Australia.
isMobile:true;countryCode:!CA
The element is only visible to mobile visitors or anyone not in Canada.
language:!fr
The element is visibile to anyone whose primary browser language is not currently set as French.
deviceType:!Desktop;isEU:true
The element is only visible to visitors in the European Union or anyone not on a desktop computer (e.g. Tablet and Mobile visitors).
Last updated
Was this helpful?