Microsoft consent mode

Microsoft Consent Mode allows businesses to adjust the behaviour of Microsoft’s Universal Event Tracking (UET) 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.

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.

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

💡 More details on troubleshoot UET tags in Microsoft documentation.


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.