# accountvars

## `this.accountvars` Variable

The `this.accountvars` variable provides access to all **Tool-Instance-specific constants** defined within the **JENTIS Tag Manager (JTM)**.

These constants are maintained in the **Tool Edit Screen** of the JTM and are available at runtime for use in **server-side variables**, **client-side variables**, and other tracking logic.

***

### Purpose

Use `this.accountvars` to:

* Access tool-related configuration values
* Reuse constant settings across variables (e.g., `tool-id`, `api-key`)
* Separate logic from configuration for better maintainability

***

### Variable Definition

| Property          | Description                                          |
| ----------------- | ---------------------------------------------------- |
| **Variable Name** | `this.accountvars`                                   |
| **Type**          | `JSON` (key-value object)                            |
| **Key Type**      | `string` (internal ID of the constant)               |
| **Value Type**    | `any` (depending on the defined value in JTM)        |
| **Defined In**    | Tool Edit Screen in the **JENTIS Tag Manager (JTM)** |

***

### Example Usage

```js
async function() {
    var x = this.accountvars.api; // Example key: "api"
    return x;
}
```

This example retrieves the value of the `api` constant configured in the tool’s settings.

***

### Use Cases

* Access a tool-specific `apiKey`, `toolId`, or configuration string
* Use environment-specific settings (e.g., staging vs. production)
* Keep credentials or version numbers out of hardcoded logic

***

### Notes

* Constants are managed **per tool instance** and can be updated centrally in the JTM.
* Keys used in `this.accountvars` correspond to the **internal IDs** of the constants defined in the tool.
* Values can be strings, numbers, booleans, or structured JSON — depending on how they were defined.

***

### Summary

`this.accountvars` gives you dynamic access to configuration values defined per tool instance in the JENTIS Tag Manager. By using these constants, you create **flexible**, **reusable**, and **environment-aware** variable logic that’s easy to maintain and update.
