# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.jentis.com/developer-guide/variables/constant.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
