Page cover image

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.

How Does It Work?

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.

How To Implement

Attribute Name
Attribute Value
Which Page Element?

data-geo-text*

propertyName

Any Element (See Below)

data-geo-opacity

N/A

Any element with the Geo Text data attribute.

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.

Examples

Attribute Value

countryName

Description

The element's text content will be changed to the visitor's country name (e.g. Canada).

Attribute Value

city

Description

The element's text content will be changed to the visitor's city (e.g. Melbourne).

Attribute Value

deviceType

Description

The element's text content will be changed to the visitor's device type (e.g. Mobile).

Attribute Value

OS

Description

The element's text content will be changed to the visitor's OS (e.g. Windows).

Last updated

Was this helpful?