Voltar ao blog
Technical

Microsoft Ads UET GDPR Consent: Complete Guide

Equipa GetCookiesDecember 27, 20248 min de leitura
MicrosoftBingAdvertisingGDPR

TLDR: Microsoft Ads UET Tag requires consent in the EU. Bonus: UET respects Google Consent Mode signals, which GetCookies sets automatically. Double protection.

Read full summary

Microsoft Advertising's Universal Event Tracking (UET) powers conversion tracking for Bing Ads. Good news: UET respects Google Consent Mode signals. GetCookies handles both the signals and script blocking.

Summary by Claude AI

Microsoft Ads: The Underrated Channel

While everyone fights for attention on Google and Meta, Microsoft Ads often delivers better CPCs. Bing users tend to be older, more affluent, and ready to buy.

But the Universal Event Tracking (UET) tag still needs consent in the EU.

The Good News: UET Respects Google Consent Mode

Microsoft UET reads Google Consent Mode signals. GetCookies sets these automatically:

// GetCookies sets these before UET loads
gtag('consent', 'default', {
  'ad_storage': 'denied',
  'ad_user_data': 'denied',
  'ad_personalization': 'denied'
});

This means UET gets consent signals even without explicit blocking. But for maximum compliance, blocking until consent is still the safest approach.

The GetCookies Implementation

<head>
  <!-- GetCookies -->
  <script src="https://getcookies.co/api/v1/widget/loader.js"
          data-domain-id="YOUR_DOMAIN_ID"
          async></script>

  <!-- Microsoft UET - blocks until marketing consent -->
  <script type="text/plain" data-cookieconsent="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>
</head>

The type="text/plain" blocks execution. GetCookies activates it after marketing consent.

Double Protection

With GetCookies and UET:

  1. Google Consent Mode signals - GetCookies sets these automatically
  2. Script blocking - UET doesn't even load until consent

Belt and suspenders. Maximum compliance.

Conversion Tracking

After consent:

// Revenue conversion
window.uetq = window.uetq || [];
window.uetq.push('event', 'purchase', {
  'revenue_value': 99.99,
  'currency': 'USD'
});

// Custom event
window.uetq.push('event', 'signup', {});

// Page load (usually automatic)
window.uetq.push('pageLoad');

Dynamic Loading Pattern

window.addEventListener('getcookies:consent', (e) => {
  if (e.detail.marketing && !window.uetLoaded) {
    loadUET();
    window.uetLoaded = true;
  }
});

function loadUET() {
  (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");
}

Testing

  1. Use UET Tag Helper browser extension
  2. Check Microsoft Advertising conversion tracking
  3. Verify events only fire after consent

The Bottom Line

Microsoft Ads UET needs consent management. With GetCookies you get:

  1. Automatic Consent Mode signals - UET respects these
  2. Script blocking - Extra protection with data-cookieconsent
  3. One implementation - Works for all your pixels

Ready to make your Microsoft Ads tracking compliant?

Set up GetCookies in 5 minutes

G

Equipa GetCookies

Escrito e mantido pela equipa GetCookies da Getia AS em Oslo, Noruega. Este artigo é informação geral sobre consentimento de cookies, não aconselhamento jurídico.

Analise o seu próprio site grátis

O plano gratuito mostra o banner num site com três análises de cookies por mês. Sem cartão, sem chamadas comerciais.