Microsoft UET Consent Mode with Clickio CMP

Microsoft Universal Event Tracking (UET) is used by Microsoft Advertising for conversion tracking, remarketing, audience building, and automated bidding. UET Consent Mode lets the UET tag adjust cookie access according to the user's advertising consent state.

Clickio CMP can send UET consent signals automatically. When UET support is enabled, Clickio sets UET to a privacy-safe default state, updates it when the user makes or changes a consent choice, and restores the previous decision on page reload when consent data is already available.

This article explains how to place the UET tag with Clickio CMP, how to enable UET support in Clickio, and how to verify that the integration is working. For Microsoft's own overview, see Microsoft UET Consent Mode.

Before you start

You need:

  • A Microsoft Advertising account with a UET tag ID.
  • Clickio CMP installed on the site.
  • Access to the Clickio CMP settings for the site.
  • If you use Google Tag Manager, access to the GTM container where the Clickio Consent and Microsoft UET tags are configured.

Use this setup in most cases.

In advanced mode, the UET tag can load on the page, but Clickio first tells UET that advertising storage is denied. This prevents UET from using advertising storage before the user's consent state is known.

When the user grants or denies advertising storage, Clickio CMP sends an updated consent state to UET. If the user has already made a choice on a previous page view, Clickio restores that saved state during page load so UET does not stay in the default denied state after a reload.

Clickio maps UET advertising storage automatically:

  • TCF mode: based on TCF Purpose 1.
  • Non-TCF GDPR mode: based on the "ID 6: Personalizing and measuring the effectiveness of advertising" purpose configured by Clickio CMP.
  • US (GPP National) mode: based on "Section 7 (usnat): TargetedAdvertisingOptOut" flag
  • Users outside the applicable consent scope will always have advertising storage set to granted.

Do not add separate custom UET consent mapping code when Clickio UET support is enabled. Duplicate UET consent updates from custom scripts can conflict with the CMP-controlled state.

Enable UET support in Clickio CMP

  1. Open the Clickio platform.
  2. Go to Consent settings.
  3. Open the General settings tab.
  4. Find Microsoft Universal Event Tracking (UET) Consent Mode.
  5. Enable UET Consent Mode Support.
  6. Save the settings.

If the option is not available, check that the site is on a plan that includes Microsoft UET support, or contact Clickio support.

When the option is enabled, Clickio shows a warning that the site's JavaScript implementation or GTM template settings must be updated. This is expected: the page must include the UET consent default configuration code snippet.

If Clickio CMP is installed directly on the page

  1. In Clickio, open Implementation.
  2. Copy the updated on-page implementation code.
  3. Replace the old Clickio CMP implementation code on your site with the updated code.
  4. Place the Clickio CMP code before the Microsoft UET tag where possible.
  5. Keep the Microsoft UET tag on the page.

To get the Microsoft UET tag itself, open Microsoft Advertising, go to Tools > UET tag, choose the relevant tag, and copy the installation code from Microsoft.

If you use GTM to install UET instead of placing it directly on the page, Microsoft also provides a GTM setup guide: Set up UET tags with Google Tag Manager.

If Clickio CMP is installed through Google Tag Manager

  1. Open the Google Tag Manager container.
  2. Open the Clickio Consent tag that uses the Clickio Consent GTM template.
  3. Enable Microsoft UET support.
  4. Save the tag.
  5. Make sure the Clickio Consent tag runs before the Microsoft UET tag (using Consent Initialization trigger).
  6. Save and publish the container.

The Clickio GTM template will handle UET Consent Mode automatically when this option is enabled both in the platform and in the GTM template. You do not need to add a separate UET consent snippet to the page.

Optional: Basic Consent Mode

Advanced mode is recommended because UET can load with advertising storage denied and then receive an update as soon as consent is known.

Basic mode is stricter: the UET tag is not loaded at all until advertising storage is allowed. Use it only if your policy requires blocking the UET tag before consent.

Important:
- If the UET tag is blocked, Microsoft may receive fewer signals than in advanced mode.
- Make sure the tag can load immediately after consent is granted, not only on the next page view.

    Basic mode with GTM

    If Clickio Google Consent Mode support is enabled in the Clickio CMP GTM template, you can configure the Microsoft UET tag in GTM to require ad_storage consent. In that case, open the UET tag in GTM, go to Advanced Settings > Consent Settings, and add the relevant consent requirement.

    This only works when Clickio CMP is also integrated with GTM consent signals. If the Clickio Consent Mode integration is not enabled, use Clickio tag attributes or Clickio script-pausing integration instead of relying on GTM's ad_storage consent check.

    For Clickio tag-management based blocking, see How to integrate your tags with Clickio CMP tag management.

    Basic mode with direct on-page code

    For direct on-page scripts, prefer Clickio's script pausing/executing attributes instead of writing a full custom UET loader. Add the UET script and configure it to run only after the required advertising consent is available.

    Use the documentation that matches your site setup:

    For TCF mode, wrap the Microsoft UET tag copied from Microsoft Advertising like this:

    <script type="text/clickiocmp" data-clickio-cmp-purpose-consent="1">
      <!-- Paste the UET tag copied from Microsoft Advertising here -->
    </script>

    For non-TCF GDPR mode, use the Clickio non-TCF advertising purpose used by the UET integration:

    <script type="text/clickiocmp" data-clickio-cmp-nontcf-purpose-consent="6">
      <!-- Paste the UET tag copied from Microsoft Advertising here -->
    </script>

    These examples pause the UET tag and execute it only after the required consent is available. If your site uses a custom Clickio purpose setup, use tag attribute data-clickio-cmp-custom-purpose-consent with the matching purpose ID from your CMP configuration.

    Verify the integration

    Microsoft UET Tag Helper

    Install the Microsoft UET Tag Helper browser extension and open a page where the UET tag is installed.

    Check that:

    • The UET tag is detected.
    • Consent Mode is enabled.
    • The initial UET consent state is denied before the user grants advertising storage.
    • After the user grants consent, UET receives a granted advertising storage state.
    • After a page reload, the granted state is restored instead of staying at the default denied state.

    Microsoft's diagnostics guide is available here: UET diagnostics.

    Browser console

    In the browser console, inspect window.uetq and, after UET initializes, window.uetq.uetConfig. Depending on the UET version, the consent object may expose fields such as enabledadStorageAllowed, and enforced.

    The exact object can vary by UET version, so use this as a diagnostic hint rather than a hard integration contract.

    Network requests

    In browser DevTools, open the Network tab and filter by:

    bat.bing.net/action
    bat.bing.net/actionp

    Check the UET request parameters. UET requests may include an asc parameter that represents the consent state:

    • G usually indicates granted.
    • D usually indicates denied.

    Troubleshooting

    UET stays denied after the user accepts consent

    Check that:

    UET is not detected

    Check that:

    • The Microsoft UET tag ID is correct.
    • The UET tag is present on the page or in GTM.
    • The tag is not blocked by another consent or tag-blocking rule.
    • No JavaScript error stops the UET script from loading.

    The first page view is denied even after a previous accept

    Install the updated Clickio implementation code or update the Clickio GTM template settings. The current Clickio implementation restores the previous UET consent decision from stored Clickio consent data on page reload.

    Basic mode tag does not fire after accept

    If you block the UET tag completely, make sure there is a Clickio tag-management rule, script-pausing rule, or GTM trigger that runs after the consent update. A page-load-only trigger will not run again automatically after the user accepts consent.