🌎
Geoflow Docs
  • 🌎Welcome to Geoflow
  • 🔍Overview
    • Visitor Data Properties
  • ⭐Features
    • Geo Visibility
      • Define Multiple Conditions
      • Match All Conditions
      • Partially Match Condition
      • Reverse Condition Value
      • Custom Classes
    • Geo Form
      • Autofill Form Fields
      • Auto-Populate Select Fields
    • Geo Text
    • Geo Style
    • Geo Script
    • Script Extensions
      • Performance
      • Marketing Parameters
    • Optional Settings
      • Script Tag Data Attributes
      • Meta Tags
  • ⚙️Advanced
    • Code Snippets
    • Methods
      • run
      • getData
      • updateData
      • displayData
      • clearData
      • checkCondition
      • select
    • Callbacks
    • Events
    • REST API
      • Get Visitor IP
      • Get Visitor Data
      • Add Website
      • Delete Website
      • Update Website
      • List Websites
      • Get Website
  • 📄Legal
    • License Agreement
Powered by GitBook
  1. Features

Geo Style

Conditionally apply internal or external styles, based on one or more conditions you have defined with the visitor data properties.

Last updated 1 year ago

Was this helpful?

How Does It Work?

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.

How To Implement

Attribute Name
Attribute Value
Which Page Element?

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.

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 .

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 .

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.

Example

<!--
If the Visitor IS In Australia, Every Element's Font Color Will Change to Red
-->
<style type="text/geoflow" data-geo-style="countryCode:AU">

        * { color: red; }
        
</style>
Visitor Data Properties table
ISO Alpha-2 Code
⭐
Page cover image