# Microsoft Consent Mode

**Microsoft Consent Mode** allows businesses to adjust the behaviour of Microsoft’s [Universal Event Tracking (UET)](https://help.ads.microsoft.com/#apex/3/en/56681/0) tags based on user consent preferences. By integrating this mode with Didomi’s Consent Management Platform (CMP), you ensure that data collection aligns with users’ privacy choices, enhancing compliance with global regulations and fostering trust.

In this first iteration, we support use cases where UET tags are directly added to your website.

💡 To learn more check out our recent blog post <https://www.didomi.io/blog/microsoft-universal-event-tracking-uet-consent-mode>

Only the **Web platform** is supported; app integrations are not yet available through Microsoft Consent Mode.

#### **How Microsoft Consent Mode Works**

In monitoring and applying user consent choices, UET Consent Mode is managed through the ad\_storage property, which must be set on each page load and updated whenever the user provides their consent. This ensures that the UET tags dynamically adjust their behavior based on the user’s preferences:

* **Default Consent:** When a user visits a webpage where UET tags are implemented, a default status is assigned to the ad\_storage property:
  * In the **European Economic Area (EEA)**, the **United Kingdom**, and **Switzerland**, Microsoft Advertising is gradually enforcing Consent Mode, where the default value for ad\_storage is set to **denied**.
  * In most other countries, if the ad\_storage value is not explicitly set, UET tags default to **granted**.
* **Consent Update:** Once the default setting is applied, you should include a code snippet on each webpage to update the ad\_storage value based on the user’s choice in the cookie consent banner. This ensures real-time alignment with user preferences.

For implementation examples, refer to [Microsoft Advertising’s official documentation](https://help.ads.microsoft.com/#apex/ads/en/60119/1).

| User choice                                                                                                                         | ad\_storage value | UET tag behaviour                                                                                                                                                                                                                               |
| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| The use has consented to the IAB vendor Microsoft Advertising **AND** to all related purposes (IAB purposes `1, 2, 3, 4, 7, 9, 10`) | granted           | UET tags can set and read cookies. This allows full functionality, including tracking conversions and enabling personalized ad delivery through Microsoft Advertising.                                                                          |
| The user did not provide consent to the IAB vendor Microsoft Advertising.                                                           | denied            | UET tags operate in a restricted mode. They will not store or access cookies, ensuring that no personal data is used for advertising purposes. Instead, UET tags collect only aggregate and anonymous data for basic reporting and measurement. |

This dynamic behaviour ensures compliance with user preferences while maintaining essential tracking capabilities where possible.

***

#### Enable the integration

You can configure the Microsoft Consent Mode integration directly from the Didomi Console. Follow these steps:

1. Log in to the Didomi Console.
2. Click **Create a notice**.
3. Select **Platform: WEB** and click **Next**.
4. Select **Available Frameworks** and click **Next**.
5. Choose **Microsoft Consent Mode** and click **Save**.

At any time you may configure Microsoft Consent Mode integration from: Customization → Integrations → Advertising.

💡 **Optional:** You may also enable **IAB TCF** integration with Microsoft Consent Mode by selecting the respective options: IAB TCF integration must be enabled first.

<figure><img src="https://support.didomi.io/hs-fs/hubfs/Screenshot_2024-11-26_at_15-33-51-webp.webp?width=688&#x26;height=311&#x26;name=Screenshot_2024-11-26_at_15-33-51-webp.webp" alt=""><figcaption></figcaption></figure>

#### **UET Tags added directly to your Website**

This section applies if you are adding UET tags directly to your website **without using a tag management system**.

1. Ensure you have completed all the required setup as outlined in the [Microsoft documentation](https://help.ads.microsoft.com/#apex/3/en/56688).
2. Place the Didomi SDK code **above** your UET tag in the webpage source code. This ensures that the initial default status is correctly sent to the UET tags.

#### **UET tags added through Tag Managers**

* **Direct integrations with tag managers** are not supported in this version.

***

#### Testing your Microsoft consent mode integration

**Method 1: Using the UET Tag Helper Extension**

The UET Tag Helper is a browser extension provided by Microsoft that can help you validate the behavior of UET tags, including the ad\_storage property.

1. Install the [**UET Tag Helper**](https://microsoftedge.microsoft.com/addons/detail/uet-tag-helper-by-micros/nmcihgehpmokipeigjpeckphhdejjpbf?hl=en-US) extension for your browser from the Microsoft Ads Tools.
2. Enable the extension and navigate to the webpage where both Didomi CMP and UET tags are implemented.
3. Check default status: Open the UET Tag Helper and check the asc parameter, check default status:
   1. D - Denied
   2. G - Granted
4. Open the consent notice and agree to all.
5. Check updated status: Open the UET Tag Helper and check the asc parameter, it should have the value G - Granted.
6. Open the consent notice again and disagree to all.
7. Check updated status: Open the UET Tag Helper and check the asc parameter, it should have the value D - Denied.

**Method 2: Using the Browser Console**

If you do not want to use the UET Tag Helper extension, you can manually inspect the ad\_storage value set by Didomi, using your browser’s developer tools.

1. Open the browser’s **Developer Tools** (usually accessed via F12 or Ctrl+Shift+I).
2. Navigate to the **Console** tab and call `window.uetq` and check ad\_storage value:

![](/files/bCCqFAYyPAUUPu7D10Nx)

💡 More details on troubleshoot UET tags in [Microsoft documentation](https://help.ads.microsoft.com/#apex/3/en/56775/2/%23exp471).

***

#### **Benefits of Microsoft Consent Mode**

By integrating Microsoft Consent Mode with Didomi CMP, you can:

* Automatically adjust data collection behavior based on user consent choices.
* Comply with privacy regulations seamlessly.
* Improve trust and transparency with users.
* Ensure that UET tags respect consent settings, reducing the risk of data mishandling.


---

# 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.didomi.io/consent-management-platform-cmp/frameworks-regulations/microsoft-consent-mode.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.
