# Constant

## Constants in JENTIS

**Constants** are a special type of variable in JENTIS used to define **fixed values** that remain consistent across your account and environment. They are ideal for values that do **not change dynamically** during a session, event, or user interaction.

***

### Purpose

Use **constants** to:

* Store global configuration values
* Maintain consistent settings across containers and environments
* Avoid hardcoding static values inside variables or tags

Common use cases include:

* Currency codes (e.g., `EUR`, `USD`, `CZK`)
* Language settings
* Default country or market
* Global flags (e.g., versioning, feature toggles)

***

### Characteristics

| Attribute               | Description                                                           |
| ----------------------- | --------------------------------------------------------------------- |
| **Scope**               | Account- and environment-wide                                         |
| **Definition Location** | Defined once in the **JENTIS Tag Manager (JTM)**                      |
| **Usage**               | Can be used in **any variable, trigger, tag, or transformation**      |
| **Behavior**            | Static – the value does not change unless manually updated in the JTM |

***

### Example: Currency Configuration

|              | Environment: **Live** | Environment: **Stage** |
| ------------ | --------------------- | ---------------------- |
| Container #1 | `EUR`                 | `EUR`                  |
| Container #2 | `CZK`                 | `CZK`                  |

In this example, each container uses a **constant called `currency`**, and its value is set **per environment**, remaining consistent throughout.

***

### Benefits

* **Centralized management** – change the value once, and it updates everywhere
* **Improved maintainability** – no more hardcoded values in multiple places
* **Environment awareness** – different values per stage/live environment if needed
* **Cleaner variable logic** – keep static config separate from runtime logic

***

### How to Use

1. **Define the constant** in the JENTIS Tag Manager → Tool or Account Settings
2. Use the constant by referencing it in any logic or configuration (e.g., via `this.accountvars["currency"]`)
3. Maintain different values per container or environment if necessary

***

### Summary

**Constants** are essential for storing and reusing values that stay the same across your JENTIS setup. They make your tracking logic **cleaner, more manageable, and consistent**, especially when working across multiple containers or environments.
