Microsoft Ads (Bing UET)
Microsoft Ads Universal Event Tracking integration with Consentio
What is Microsoft Ads UET
Universal Event Tracking (UET) is a measurement tool for tracking conversions and remarketing within Microsoft Advertising (Bing, Yahoo, DuckDuckGo). It allows you to measure ad effectiveness and optimise campaigns across the entire Microsoft network.
Cookie category
Microsoft Ads UET belongs to the marketing category.
| Consentio category | GCM signal |
|---|---|
| marketing | ad_storage, ad_user_data, ad_personalization |
Installation with Consentio
Add the UET tag with type="text/plain" and
data-category="marketing" attributes. The Consentio script will activate the tag
only after marketing cookie consent is granted.
<!-- Microsoft Ads UET Tag -->
<script type="text/plain" data-category="marketing">
(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){
var o={ti:"YOUR_TAG_ID",enableAutoSpaTracking:true};
o.q=w[u],w[u]=new UET(o),w[u].push("pageLoad")},
n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){
var s=this.readyState;s&&s!=="loaded"&&s!=="complete"||(f(),
n.onload=n.onreadystatechange=null)},
i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)
})(window,document,"script","//bat.bing.com/bat.js","uetq");
</script>
YOUR_TAG_ID with the actual ID
from Microsoft Ads → Conversion tracking → UET tags.
JavaScript API alternative
Dynamically load Microsoft Ads UET after consent is granted:
Consentio.onConsentChange((consent) => {
if (consent.marketing) {
(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){
var o={ti:"YOUR_TAG_ID",enableAutoSpaTracking:true};
o.q=w[u],w[u]=new UET(o),w[u].push("pageLoad")},
n=d.createElement(t),n.src=r,n.async=1,
n.onload=n.onreadystatechange=function(){
var s=this.readyState;s&&s!=="loaded"&&s!=="complete"||(f(),
n.onload=n.onreadystatechange=null)},
i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)
})(window,document,"script","//bat.bing.com/bat.js","uetq");
}
})
Integration via GTM
If you use Google Tag Manager, set up the Microsoft Ads UET tag with a
consent requirement for ad_storage. Consentio automatically communicates with GTM
via Google Consent Mode v2.
- In GTM, create a new tag of type Microsoft Advertising Universal Event Tracking
- In the tag settings, go to Consent Settings
- Set Require additional consent for tag to fire:
ad_storage - Set the trigger to All Pages
Google Consent Mode v2
Microsoft Ads supports Google Consent Mode. Consentio automatically maps categories to signals:
| Consentio category | GCM signal | Description |
|---|---|---|
| marketing | ad_storage |
Ad storage |
| marketing | ad_user_data |
Sharing user data with advertising platforms |
| marketing | ad_personalization |
Ad personalisation |
Verification
- Install the UET Tag Helper extension in Chrome
- Before granting consent: the UET tag should not send any events
- After granting marketing consent: the tag should send a
pageLoadevent - Verify in Microsoft Ads → Conversion tracking → UET tags that the tag appears as active