# Step-by-Step Use Case

In this example, we will walk through common loops and sequences when working with different vendor consent settings in the **Consent JavaScript SDK**.

***

### Vendor Settings in This Scenario

* **myAnalyticsService**\
  Consent setting: **No Consent Mode**
* **myMarketingService**\
  Consent setting: **Essential Mode**

***

### Sequence of Events

| Step – Description                                                                         | Commands                                                                   | Consent Status                                                                                                               | Result                                                                                                                                                                                                                                                                       |
| ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Page load initiated** – A pageview is requested to be tracked.                           | `js\n_jts.push({ track: "pageview" });\n_jts.push({ track: "submit" });\n` | <p><code>myAnalyticsService: true</code><br><code>myMarketingService: undefined</code> <em>(default consent status)</em></p> | <p><strong>Analytics Pageview-Tags:</strong> Executed without restrictions (justification does not require consent).<br><strong>Marketing Tags:</strong> Not executed (no explicit consent or denial provided yet).</p>                                                      |
| **Alternative A:** User interacts with the CMP banner and **consents to all tools**.       | –                                                                          | <p><code>myAnalyticsService: true</code><br><code>myMarketingService: true</code></p>                                        | <p><strong>Analytics Pageview-Tags:</strong> Not re-executed (consent setting unchanged).<br><strong>Marketing Pageview-Tags:</strong> Executed without restrictions <em>(reprocessed commands, consent changed from “undefined” → “true”)</em>.</p>                         |
| **Alternative B:** User interacts with the CMP banner and **denies consent to all tools**. | –                                                                          | <p><code>myAnalyticsService: true</code><br><code>myMarketingService: ncm</code></p>                                         | <p><strong>Analytics Pageview-Tags:</strong> Not re-executed (consent setting unchanged).<br><strong>Marketing Pageview-Tags:</strong> Executed with restrictions <em>(Privacy Mode Configuration; reprocessed commands, consent changed from “undefined” → “ncm”)</em>.</p> |

***

### Key Takeaways

* **No Consent Mode** (`myAnalyticsService`) runs without waiting for user consent.
* **Essential Mode** (`myMarketingService`) adapts behavior based on consent status:
  * `true` → Full tracking
  * `ncm` → Restricted tracking (privacy mode)
* Reprocessing ensures that events held in memory can be executed with the updated consent context.
