Geo Style
Conditionally apply internal or external styles, based on one or more conditions you have defined with the visitor data properties.
Last updated
Was this helpful?
Conditionally apply internal or external styles, based on one or more conditions you have defined with the visitor data properties.
Last updated
Was this helpful?
Geoflow evaluates the conditions defined in the Geo Style data attribute against the visitor data properties. If the conditions match (returns true), the internal or external styles will be applied. Otherwise, they will be left as-is and not applied.
By default, Geoflow will apply the styles if any conditions you have defined match (return true). You can override this default behaviour by applying the Geo Match data attribute.
Attribute Name | Attribute Value | Which Page Element? |
---|---|---|
The type attribute is required to prevent the browser from automatically running the CSS.
The condition name is case-sensitive and must match the 'Property Variable' for that visitor data property in the Visitor Data Properties table.
The case sensitivity and validity for the condition value depend on the data type. For example, when defining a condition based on a country code, the value must be an ISO Alpha-2 Code.
Any value other than 'all' added for the Geo Match data attribute will have no effect.
*ββββ βAttribute names with a red asterisk are required; all others listed in the table are optional.
type*
text/geoflow
<style> or <link>
data-geo-style*
conditionName:conditionValue
<style> or <link>
data-geo-match
all
Any element with the Geo Style data attribute.