# Dynamic Keys

### 1. **Using Dynamic Keys (Redirect Popup Template)**

The **Dynamic Keys** feature in the **Redirect Popup Template** allows you to personalise the popup content shown to visitors based on their location and store information. This helps you create a more engaging and localized user experience.

#### **Available Dynamic Keys**

| Dynamic Keys                                      | Description                                                                |
| ------------------------------------------------- | -------------------------------------------------------------------------- |
| **\[country-name]**                               | Displays the visitor’s **country name** (e.g., *United States*, *France*). |
| **\[country-code]**                               | Displays the visitor’s **country code** (e.g., *US*, *FR*)                 |
| **\[store-name]**                                 | Displays **store name** as configured in the rule.                         |
| **\<span class='fi fi-\[country-code]'>\</span>** | Displays the **country flag** corresponding to the visitor’s location.     |
| **\<span class='fi fi-us'>\</span>**              | Displays the static **country flag** to all visitors                       |

<figure><img src="https://2119731643-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lo5KC5Ta6Fs1-alV4Av%2Fuploads%2FgwP0h7SZwlcerLAZovcu%2FRedirect-2.png?alt=media&#x26;token=d1823d3f-06ba-4ab5-a144-e9c68e0fc290" alt=""><figcaption></figcaption></figure>

> You can use these keys in your popup message — within the Heading, Body, and Button sections. For example, in the Body section, you can include a key with the following content:\
> \
> \&#xNAN;*“It looks like you’re visiting from \[country-name].*\
> *Would you like to shop at our \[store-name] store for a better experience?”*

<figure><img src="https://2119731643-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lo5KC5Ta6Fs1-alV4Av%2Fuploads%2FYYYe84ZM88ZTpsgNqcro%2FRedirect-3.png?alt=media&#x26;token=f36e2ab7-68b7-46ec-9a77-19749a7c993c" alt=""><figcaption></figcaption></figure>

### **2. How It Works**

When a visitor lands on your store, the app automatically detects their location and replaces the dynamic keys with the relevant data in real time.

This allows you to display the visitor's country and the respective flag.

<figure><img src="https://2119731643-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lo5KC5Ta6Fs1-alV4Av%2Fuploads%2Fqb9AdrZ1Iis0tbhqfXkf%2FRedirect-1.png?alt=media&#x26;token=95df8872-6a40-4871-81bb-ba1c2f7cd630" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note:** In the pop-up within the **Template Editor** section, the countries shows **Canada** and the **United States** as default.

The visitor’s country data **\[country-name]** and **\[country-code]** configured in the rule is displayed when the **👁️ Live Preview button** is clicked.

The **\[store-name]** key displays information of **store name** when the rule is triggered.&#x20;
{% endhint %}

### 3. Quick Video

{% embed url="<https://vimeo.com/1136847885?fe=ci&fl=sv&share=copy>" %}

{% hint style="info" %}
If you encounter any issues, please contact us at **<help@spicegems.com>**
{% endhint %}
