# Consent Javascript SDK

The **Consent JavaScript SDK** is a framework of multiple components working together: **tools**, **CMP connectors**, and **vendors**.\
Its main purpose is to apply consent logic automatically, keeping everything aligned in a convenient and compliant way.

If you do not want to use the full feature set of the Consent JavaScript SDK, you have two options:

* **Deactivate it** entirely
* **Push consent information manually**

Details for both approaches are provided at the end of this article.

### Core Components

To handle consent in **JENTIS Tag Manager**, the SDK uses three core elements:

#### 1. Tools

A **tool** is a configuration instance that holds the global values for a specific technology you want to activate with JENTIS.

Example:

* *"Web Analytics Tool 1 – US"*
* *"Web Analytics Tool 2 – EU"*

Both represent the same tool but are separate configuration instances for different websites.

#### 2. Vendors

A **vendor** represents a tool provider.\
Each tool instance is always connected to one vendor, but a vendor can be linked to multiple tool instances.

Example:

* *Vendor:* “Web Analytics Tool”
* *Tools connected:* “Web Analytics Tool 1 – US” and “Web Analytics Tool 2 – EU”

#### 3. CMP Connectors

A **Consent Management Platform (CMP)** handles user consent on your website (e.g., *Usercentrics*, *OneTrust*).\
In JENTIS, you decide **which website** (JTM container) connects to **which CMP**.\
The configuration is managed in the JENTIS interface, and we cover the process later in this documentation.

### Key Features

#### Clean Triggers

You don’t need to include consent-related conditions in your triggers.\
This removes complexity and makes your Tag Manager configuration cleaner and easier to maintain.

#### Reprocessing of Consent

Triggers and consent are handled separately, so you don’t need to worry about **what happened first**—whether it was a `page_load` event or a user’s consent decision.\
The SDK ensures the correct action is taken at the right time.

**How Reprocessing Works (Example)**

Reprocessing applies **only within a single page view** (not across a full session or multiple sessions).

1. **First visit:** The user lands on your page and sees the consent banner.
2. **Event fired:** Your site pushes a `track: pageview` signal to JENTIS.
3. **On hold:** This event is paused until the consent decision is made.
4. **Decision:** The user declines consent.
5. **Reevaluation:** The SDK reviews all previously pushed events. If the user’s decision affects which tools should receive the data, it will adjust accordingly and fire tags only where permitted.

> This removes the need for multiple trigger conditions (pre- and post-consent), reducing complexity and avoiding redundant configurations.

### Accessing the Global Consent JavaScript SDK

You can access all functions and events via the following API:

```
window.jentis.consent
```


---

# 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/consent-javascript-sdk.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.
