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


---

# 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/server-side-variables/public-function-scope/accountvars.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.
