Microsoft UET Consent mode

Loïc
Loïc
  • Updated

If you use Microsoft's Universal Event Tracking (UET) for conversion tracking, you will now be required to set up consent verification through the use of a TCF-compliant cookie banner or via UET's Consent mode.

If you are using Axeptio for Publishers (TCF banner), you don’t need to do anything further.

However, if you are using Axeptio for Brands, you will need to either switch to Axeptio for Publishers, or set up Consent mode.

Here’s how to proceed for the second option: 

 

First, make sure that Microsoft Advertising is listed in your cookie banner.

If it is not, you can add it at the step of your choice: How to add a new Cookie in my tags list ?

Once Microsoft Advertising is listed, you will need to add the Consent mode management code.

Here it is: 

<script> 
// Initializing UET Consent Mode
window.uetq = window.uetq || [];
window.uetq.push("consent", "default", { ad_storage: "denied", });

// Updating consent
// Based on choices in the Axeptio banner
void 0 === window._axcb && (window._axcb = []);
window._axcb.push(function (axeptio) {
axeptio.on("cookies:complete", function (choices) {
if (choices.microsoft) {
window.uetq.push("consent", "update", { ad_storage: "granted", });
}
else{
window.uetq.push("consent", "update", { ad_storage: "denied", });
}
});
});
</script>

You can add this code directly in the <head> of your website, or in a custom HTML tag via Google Tag Manager, for example.

🚧 For your UET tag to properly take into account Consent mode, it is important that this script is loaded before the UET tag.

Was this article helpful?

0 out of 0 found this helpful