Geo Text
Replace the text content for any element based on a visitor data property. For example, the visitor's country name or currency symbol.
Last updated
Was this helpful?
Replace the text content for any element based on a visitor data property. For example, the visitor's country name or currency symbol.
Last updated
Was this helpful?
Apply the Geo Text data attribute to an element, using a value corresponding to a visitor data property, to dynamically update its text content. Ensure the element has appropriate default text in the event an error occurs or the property is not available.
To prevent potential content flashing, you can apply the Geo Opacity data attribute. When the element's text content changes, its opacity will be set to 1. Take things further by adding custom CSS to your page that targets elements with this data attribute so you can integrate a transition.
Attribute Name | Attribute Value | Which Page Element? |
---|---|---|
The property name is case-sensitive and must match the 'Property Variable' for that visitor data property in the Visitor Data Properties table.
While the Geo Text data attribute can technically be added to virtually any HTML element, you may experience an unintended or adverse result with certain elements.
No value is needed for the Geo Opacity data attribute; any value added will have no effect.
*ββββ βAttribute names with a red asterisk are required; all others listed in the table are optional.
data-geo-text*
propertyName
Any Element (See Below)
data-geo-opacity
N/A
Any element with the Geo Text data attribute.
countryName
The element's text content will be changed to the visitor's country name (e.g. Canada).
city
The element's text content will be changed to the visitor's city (e.g. Melbourne).
deviceType
The element's text content will be changed to the visitor's device type (e.g. Mobile).
OS
The element's text content will be changed to the visitor's OS (e.g. Windows).