# Dynamic text

> Put the visitor's country, state, date and other details into a rule's text with variables such as {{country}} and {{state}}.

Variables put facts about the visitor into an action's text. Write `Free delivery to {{country}}` once, and each visitor sees their own country.

## Inserting a variable

Type the variable in a text field, or use the **{ }** button next to a field to pick one.

## Variables

| Variable | Becomes | Example |
| --- | --- | --- |
| `{{state}}` | State or region name | Bavaria |
| `{{country}}` | Country name | Germany |
| `{{country_code}}` | Two-letter country code | DE |
| `{{continent}}` | Two-letter continent code | EU |
| `{{timezone}}` | The visitor's timezone | Europe/Berlin |
| `{{language}}` | The browser's language | de-DE |
| `{{date}}` | Today's date, in the visitor's format | 19.9.2026 |
| `{{time}}` | The time now, in the visitor's format | 14:05:09 |

`{{continent}}` is a code (`NA`, `SA`, `EU`, `AS`, `AF`, `OC` or `AN`), or `OTHER` when the country is unknown.

## Where variables work

In almost every text an action shows: titles, content, button text and links, redirect URLs, countdown messages, social proof messages, a rating's question and thank-you message, the consent banner's text, **Replace Text**, **Insert HTML**, **Swap Image** addresses, **Prefill Form** values, and even **Custom JavaScript**. In Custom JavaScript a value is written so that it cannot end the string it sits in: `'{{state}}'` stays one string for *Valle d'Aosta*.

## When a value is unknown

A variable the widget can't fill becomes empty text: `Free delivery to {{state}}` reads *Free delivery to* for a visitor whose state is unknown.

Give it a fallback after a bar, and that is written instead: `Free delivery to {{state|your area}}` reads *Free delivery to your area*.

You can also add a condition that guarantees the value is known. *Country is one of* the countries you deliver to does that for `{{country}}`, because location conditions never match a visitor who can't be placed.

> [!TIP]
> Location is looked up from the visitor's IP address. Country is almost always known; the state is missing more often. Prefer `{{country}}` in text every visitor will see.

---

Source: https://geoengage.app/docs/rules/dynamic-text
