# Consent Processing Logic

The **Consent JavaScript SDK** plays a crucial role in controlling how and when tags are executed in **JENTIS Tag Manager**.\
When a vendor is set to **Consent Mode**, its tags will not execute until the user explicitly interacts with the **Consent Management Platform (CMP)**—either **granting** or **denying** consent.

If the user ignores the CMP banner, the associated tool will not process any data. This ensures that data collection always aligns with the user’s explicit consent status.

### Execution Timing

For vendors with the justification **Consent Mode**:

* Tags are executed **only after** an explicit user consent decision.
* If a visitor leaves before interacting with the CMP (a "bounce"), that visit is never recorded by tools requiring consent.

### Vendor Consent States

A vendor managed by the **Consent JavaScript SDK** can have one of the following states:

| State       | Meaning                                   |
| ----------- | ----------------------------------------- |
| `true`      | Consent explicitly given                  |
| `false`     | Consent explicitly denied                 |
| `ncm`       | No Consent – **Essential Mode** is active |
| `undefined` | No status known yet (awaiting decision)   |

> **Note:**
>
> * `ncm` and `false` are opposites.
> * If a vendor has **Essential Mode** enabled, the `false` status is not possible. The vendor will either be `true` (consent) or `ncm` (essential mode fallback).

### Non-Consent Justifications (Default)

If a tool’s justification is set to **No Consent Mode**:

* The internal system value defaults to `true` (treated as if explicit consent was given).
* This status will **not change** regardless of user interaction with the CMP.

### Data Processing Flow

Data processing in JENTIS follows two layers:

1. **Base Layer – Tag Manager Execution**
   * Commands such as `track:submit` initiate a **JENTIS Tag Manager State**.
   * Triggers are evaluated, and tags are activated according to their configurations.
2. **Consent JavaScript SDK Layer** *(default enabled)*
   * Even if triggers are ready to fire, tags will **only execute** if consent conditions are met.
   * Without consent, no tags run—ensuring compliance.
