Microsoft Ads Smart Bidding with clean UET tracking reports on average +14 to +20% more conversions vs degraded tracking across the accounts observed in public Google Ads benchmarks, and accounts on Target ROAS without stable UET rarely exit learning phase. Microsoft Advertising holds 9% of US desktop search and 4% in some European markets at Q4 2025 (StatCounter) — the platform is worth it, but without clean UET you lose the edge.
This tutorial isn't a marketing overview: it's the ops methodology applied in production. Paste-ready snippets, step-by-step setup procedure via the official UET tool, mapping vs gtag, Enhanced Conversions, Consent Mode v2, server-side, and the 6 mistakes that crash tracking. Recommended prerequisites: read our Microsoft Ads vs Google Ads comparison and our Microsoft Ads beginner guide.
What is the UET tag and how does it position vs Google Tag?
The UET (Universal Event Tracking) is Microsoft Advertising's proprietary conversion tracking tag. It's the direct equivalent of Google Tag (gtag) on the Google Ads side: a JavaScript fragment placed in each page's <head>, depositing a first-party cookie on your domain, measuring pageviews and events, then surfacing these signals to Microsoft to power conversions, audiences, and Smart Bidding.
UET doesn't replace Google Tag — both coexist on the same site. When a user converts, the UET snippet sends a hit to bat.bing.com (transparent, via your first-party cookie), while Google Tag sends its hit to googleads.g.doubleclick.net. Each platform counts its conversion independently. It's through this dual instrumentation that you measure each lever's performance without cross-platform bias.
Here's the detailed functional mapping between the two tags:
The UET tag ID is an 8-digit numeric identifier, unique per Microsoft Advertising account. You retrieve it in Tools > UET tag on the Microsoft side. This tag ID serves as the key in the snippet to place, exactly like the Conversion ID + Conversion Label on the Google Ads side.
Three things to remember before configuring UET. First: a single UET tag per Microsoft account, placed on every page (not just conversion pages). Second: events are the cornerstone of tracking — you then define Conversion Goals in Microsoft that consume these events. Third: Enhanced Conversions and Consent Mode v2 are supported since 2024 and align UET with the 2026 standards of privacy-respecting tracking.
Installation: 3 methods (GTM, code, CMS plugins)
Three installation methods dominate in 2026. The choice depends on your stack and technical maturity. For most accounts observed in public Google Ads benchmarks, GTM remains the royal road.
Method 1 — Via Google Tag Manager (recommended)
GTM has an official Microsoft Advertising UET tag template (Community Template Gallery). Procedure:
- In GTM, Tags > New > Microsoft Advertising UET tag (official template).
- Fill the UET tag ID (8 digits retrieved on the Microsoft side).
- Trigger: All Pages (Page View).
- For conversion events: create a second tag of type Microsoft Advertising Event, fill the UET tag ID, the event category/action/label/value, trigger on the corresponding GA4 event or custom trigger.
- Test in GTM Preview mode, validate UET Tag Helper sees the tag firing on the page.
Advantages: maintainable, versioned, trigger sharing with other marketing tags (Google Ads, GA4, Meta), no site code modification. It's the method used on 80%+ of accounts observed in public benchmarks.
Method 2 — Direct code in head
For sites without GTM (custom build or ops constraints), the official Microsoft snippet to paste in the <head>:
<script>
(function(w,d,t,r,u){
var f,n,i;
w[u]=w[u]||[],f=function(){
var o={ti:"YOUR_UET_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>
Replace YOUR_UET_TAG_ID with the 8-digit ID. The enableAutoSpaTracking: true option activates automatic URL change tracking via History API — useful for React, Vue, Angular SPAs. To trigger a conversion event later in the code:
// On the purchase confirmation page
window.uetq = window.uetq || [];
window.uetq.push('event', 'purchase', {
revenue_value: 129.99,
currency: 'USD',
event_category: 'ecommerce',
event_label: 'order_completed'
});
Method 3 — CMS plugins (Shopify, WooCommerce, Wix)
For no-code sites, Microsoft offers official plugins:
- Shopify: Microsoft Channel app (free, in the Shopify App Store).
- WooCommerce: Microsoft Advertising Pixel for WooCommerce.
- Wix, Squarespace: integration via simplified built-in Tag Manager.
These plugins automatically place the UET and trigger standard e-commerce events (purchase, add_to_cart, view_item). It's the fastest method for an e-com starter — count 30 minutes install vs 4-6h for a full custom GTM integration. Limit: custom events (e.g., business-specific event) still need to be wired manually via GTM or direct code in addition to the plugin.
Standard conversions vs custom events
Once UET is placed, the next step is to define what you want to track. Microsoft Advertising distinguishes two levels: Conversion Goals (which Smart Bidding will optimize) and Custom Events (granular signals usable for audiences or diagnostics).
A Conversion Goal is a business conversion: a purchase, lead, signup, subscription. You create it in Tools > Conversion goals. Four possible types:
- Event: triggered by a UET push (most used).
- Destination URL: triggered on landing on a specific URL (e.g.,
/thank-you-for-your-order). - Duration: minimum session duration reached.
- Pages per visit: number of pages viewed reached.
The Event type is the most flexible — it consumes events you push via uetq.push('event', ...). Practical rule: use Event for all critical conversions, Destination URL only as a fallback or for very simple conversions (one-page form without dynamic tracking).
A Custom Event is an arbitrary signal sent via uetq.push not (necessarily) tied to a Conversion Goal. Examples of useful custom events:
video_play,video_complete: video engagement.scroll_50pct,scroll_75pct: reading depth.add_to_cart,begin_checkout: e-com funnel steps.pricing_page_view: B2B SaaS intent.
These custom events serve to build audiences (e.g., "users having done video_play 50%+") or to diagnose funnel leaks, without overloading Smart Bidding with too many concurrent Conversion Goals.
Across the accounts observed in public Google Ads benchmarks, 4 to 7 active Conversion Goals represents the sweet spot for Microsoft Ads Smart Bidding. Beyond that, the algorithm diversifies its optimization too much and per-goal performance degrades. Custom events don't have this limit — you can have 30+ without bidding impact.
Here's a complete instrumentation example for an e-commerce site wanting to track 5 funnel steps + final purchase:
// View product
window.uetq.push('event', 'view_item', {
event_category: 'ecommerce',
event_value: 89.90,
currency: 'USD'
});
// Add to cart
window.uetq.push('event', 'add_to_cart', {
event_category: 'ecommerce',
event_value: 89.90,
currency: 'USD'
});
// Begin checkout
window.uetq.push('event', 'begin_checkout', {
event_category: 'ecommerce'
});
// Purchase (main Conversion Goal)
window.uetq.push('event', 'purchase', {
event_category: 'ecommerce',
revenue_value: 129.99,
currency: 'USD',
transaction_id: 'ORDER_12345'
});
The transaction_id is critical: it serves as event_id for deduplication if you switch to server-side or compare with Google Ads. Without unique transaction_id, impossible to dedupe and your cross-platform metrics are biased.
Microsoft Ads Enhanced Conversions in 2026
Microsoft Ads Enhanced Conversions exist since 2024 and reached production stability in 2026. The principle is identical to Google Ads: transmit hashed user data (email, phone, address) in the conversion payload to allow Microsoft to re-match the conversion to a Microsoft user (Bing search, Edge browser) even when the first-party cookie has been lost (ITP, ad-blockers, cross-device).
The measured gain of Enhanced Conversions on Microsoft matching varies between +6 and +15% reported conversions by vertical and data quality — close to the magnitude observed on the Google Ads side. It's significant enough to justify the 1-2 days of dev investment to wire Enhanced Conversions cleanly.
Hashing must happen before sending to Microsoft, ideally server-side (to avoid exposing PII in clear on the browser side). Typical procedure:
// Server-side (Node.js)
const crypto = require('crypto');
function sha256Hash(input) {
return crypto
.createHash('sha256')
.update(input.trim().toLowerCase())
.digest('hex');
}
const enhancedData = {
email: sha256Hash(user.email),
phone: sha256Hash(user.phone.replace(/\s/g, '')),
// hashed address format: firstName + lastName + zip + country
address: sha256Hash(`${user.firstName}${user.lastName}${user.zip}${user.countryCode}`)
};
// Push to data layer so UET picks it up
dataLayer.push({
event: 'purchase',
enhanced_conversion_data: enhancedData
});
On the UET side, the tag detects the presence of hashed data in the payload and transmits to Microsoft Advertising. Feature activation on the Microsoft side: Tools > UET tag > Enhanced conversions > Enable.
A few quality rules to follow to maximize match rate:
- Always lowercase before hashing (
user@email.com→ hash, notUser@Email.com). - Trim spaces systematically on email and phone.
- E.164 international format for phone (e.g.,
+13125551234). - 2-letter ISO country format (US, DE, FR, etc.).
- SHA-256 hex hashing (not SHA-1, not Base64).
Microsoft also offers an Enhanced Conversions for Leads mode specific to off-site conversions (B2B CRM, offline closing) — see our CRM offline conversions guide for the equivalent functional framework on the Google Ads side.
Importing GA4 conversions to Microsoft Ads
Since 2024, Microsoft Advertising offers native GA4 conversion import: you authenticate your GA4 property, Microsoft reads events via the Google Analytics API, and recreates them as Conversion Goals on the Microsoft side. It's a powerful shortcut when you already have a mature GA4 setup with clean events.
Import procedure:
- In Microsoft Advertising, Tools > UET tags > Import GA4 conversions.
- Authenticate your GA4 property via Google OAuth.
- Select events to import (purchase, generate_lead, sign_up, etc.).
- Microsoft recreates them as Conversion Goals with the same parameters (value, currency).
- Data is retroactive over 30 days — useful to bootstrap Smart Bidding without waiting 30 days after cutover.
Limits to know:
- Only standard GA4 events (Enhanced Ecommerce schema) are cleanly importable. Custom events with complex parameters may lose attributes.
- Import is uni-directional: GA4 → Microsoft, not the reverse. If you then correct the conversion on the Microsoft side, GA4 won't be updated.
- GA4 import uses GA4 attribution models (data-driven by default). If you compare with native Microsoft conversions (UET), figures may diverge by 5-15% due to different attribution.
- Events tied to GA4 audiences are not importable as Microsoft audiences — you must recreate audiences manually (see our Google → Microsoft Ads import guide).
When to use GA4 import vs native UET? Our practical rule: use native UET as soon as you can (cleanest signal, shortest latency, full feature support); use GA4 import as a complement or fallback for events you can't quickly instrument on the UET side. Across the accounts observed in public Google Ads benchmarks, around 25 to 35% use GA4 import as an initial bridge then migrate to native UET in 60 to 90 days.
For offline conversions (CRM closing, converted phone calls, in-store purchases) that don't go through UET or GA4, Microsoft offers Offline Conversion Imports: CSV upload or API pushing conversions a posteriori with their Microsoft Click ID (GCLID equivalent). It's the indispensable lever for B2B SaaS and lead gen — see our Google Ads offline conversions guide for the equivalent mechanics.
Server-side and Consent Mode v2: compatibility
The UET tag works client-side by default but can be relayed server-side via a sGTM container (Google Tag Manager Server) with a Microsoft Advertising template. The benefit is the same as on the Google side: partial ITP bypass (HTTP first-party cookies untouched by JS ITP), reduced client JS weight, control over the payload sent to Microsoft.
sGTM + UET architecture:
- The browser sends an event to
metrics.yoursite.com(your first-party subdomain pointing to Cloud Run). - sGTM receives the event, applies transformations if needed (hashing, CRM enrichment).
- sGTM relays via a UET template to
bat.bing.com(server-to-server). - Microsoft Advertising receives the hit as if from a normal browser.
For the full sGTM setup procedure (which serves Google Ads, GA4, and Microsoft Ads at once), see our complete server-side GTM 2026 guide. The same infrastructure relays events to all vendors — you only pay infra once.
Consent Mode v2 on the UET side: Microsoft deployed its equivalent in 2024. The tag respects the 4 standard flags:
ad_storage: authorization to store advertising cookies.ad_user_data: authorization to share user data with Microsoft.ad_personalization: authorization to personalize ads.analytics_storage: authorization for analytics cookies.
When consent is denied, UET switches to "cookieless ping" mode — Microsoft receives conversion information without cookie, without user matching, in aggregated and modeled form. Your conversions still report in dashboards (under "Modeled conversions"), but without individual matching.
CMP wiring on the UET side resembles Google's:
// CMP push to Cookiebot/OneTrust/Didomi
window.uetq = window.uetq || [];
window.uetq.push('consent', 'default', {
ad_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
analytics_storage: 'denied'
});
// When the user accepts
window.uetq.push('consent', 'update', {
ad_storage: 'granted',
ad_user_data: 'granted',
ad_personalization: 'granted',
analytics_storage: 'granted'
});
never forget to push a default state BEFORE UET loads. If UET fires before the consent push, it considers consent as granted by default on non-European CMPs and writes the cookie without legal basis. It's the most frequent error — on 30 to 40% of referenced setups, the default consent is missing or poorly sequenced. Consequence: direct GDPR risk + deactivation of modeled conversions that depend on the flag.
Tracking validation and debugging
Testing a UET setup before scaling budget is non-negotiable. Three main tools to validate tracking in preview and production.
UET Tag Helper (official Microsoft Chrome extension)
The UET Tag Helper extension installs free on Chrome. It automatically detects active UET tags on the page, displays the tag ID, verifies pageviews and events firing, and flags common errors (missing tag ID, malformed snippet, events without required parameters).
Validation procedure:
- Activate UET Tag Helper, browse the site.
- Verify the tag fires pageview on each page (green icon).
- Manually trigger a conversion action (e.g., add to cart).
- Verify the event reports in the UET Tag Helper panel with the right parameters.
- Browse to the confirmation page, verify the purchase event fires with correct revenue_value and currency.
Microsoft Advertising Diagnostics
On the Microsoft side, Tools > Conversion tracking > Diagnostics displays the status of each conversion goal:
- "Verified" status = at least one conversion reported in the past 7 days.
- "Unverified" status = no conversion = potential tracking problem.
- "Inactive" status = goal disabled.
Inspect each Unverified goal before scaling. Most frequent causes: UET tag not placed on the conversion page, mis-wired event name (typo), Conversion Goal pointing to the wrong event, Consent Mode denied on all traffic.
GTM preview mode tests (if method 1)
GTM has a Preview mode allowing you to simulate a session on the site and see all firing tags. Activate Preview, browse the site, verify that:
- The UET pageview tag fires on every page.
- UET event tags fire on the right triggers (purchase, lead, signup).
- Parameters (revenue_value, currency, transaction_id) are correctly set.
It's the most robust method to validate BEFORE GTM publication. Once validated in preview, publish the GTM container, then re-verify in prod via UET Tag Helper.
Across the accounts observed in public Google Ads benchmarks, 30 to 40% of audited UET setups have at least one undetected tracking error — typically a poorly mapped Conversion Goal or an event not firing on SPA. Systematically dedicate 1 to 2 hours of post-installation validation, it's the most profitable ROI of the entire migration.
To go further on tracking foundations on the Google side and the full Smart Bidding pipeline, read our Google Ads conversion tracking guide. To automate tracking surveillance over time, see also our Microsoft Ads Scripts guide which includes a conversion monitoring script.
For accounts wanting to industrialize steering, launch a free SteerAds audit: it scans the UET and Google Ads conversion setup, verifies tracking consistency on both platforms, identifies unverified Conversion Goals, and proposes a prioritized correction plan. See also our Google → Microsoft Ads import guide for the full migration and our Bing Merchant Shopping feed guide if you operate in e-commerce.
For official resources, see the Microsoft UET help center and the UET developer documentation.
Sources
Official sources consulted for this guide:
FAQ
Does the UET tag work without third-party cookies in 2026?
Yes, the UET tag has been working with first-party cookies for a long time — it sets its cookie on your own domain, not on bat.bing.com. The end of Chrome third-party cookies therefore doesn't impact UET the same way as the classic Meta pixel. However, Safari ITP limits to 7 days the lifespan of first-party cookies written via JavaScript: to preserve attribution beyond that, switching to server-side (sGTM relaying to UET) remains recommended. See the server-side section of this article. Across the accounts observed in public Google Ads benchmarks, switching to server-side recovers 12 to 22% of additional signal post-ITP on the Microsoft Ads side.
Do you need one UET tag per site or per campaign?
A single UET tag per Microsoft Advertising account, placed on every page of the site. UET works like the Google Ads tag: it's unique at the account level, and conversions are then defined in Microsoft Advertising via Conversion Goals pointing to specific events or URLs. If you manage multiple domains with a single Microsoft account, you can reuse the same UET tag on each domain — Microsoft accepts cross-domain tracking on the UET side. On the other hand, two distinct Microsoft accounts = two distinct UET tags. Official documentation available on Microsoft Help.
What's the difference between Conversion Goal and UET Custom Event?
A Conversion Goal is a business conversion defined in Microsoft Advertising (purchase, lead, signup) that will be used by Smart Bidding to optimize. A Custom Event is an arbitrary signal sent via uetq.push (e.g., 'video_play', 'scroll_50pct') that can be used to build audiences or feed Conversion Goals. The rule: use Custom Events for granular data, Conversion Goals for what Smart Bidding should optimize. Across the accounts observed in public Google Ads benchmarks, 4 to 7 active Conversion Goals represent the sweet spot — beyond that, Smart Bidding diversifies too much and performance degrades.
How do I import my GA4 conversions into Microsoft Ads?
Microsoft Advertising has offered native GA4 conversion import since 2024. In Tools > UET tags > Import GA4 conversions, authenticate your GA4 property, select events to import (purchase, generate_lead, etc.), and Microsoft recreates them as Conversion Goals. Data is retroactive over 30 days. Limits: only standard GA4 events are supported (those of the Google Analytics enhanced ecommerce schema), custom events with complex parameters don't always import well. For advanced imports or offline conversions from CRM, going through Offline Conversion Imports remains more robust — see the dedicated section of this article.
Is UET compatible with Consent Mode v2?
Yes, since 2024 Microsoft has deployed its Consent Mode v2 equivalent for UET. The tag respects the ad_storage, ad_user_data, ad_personalization, and analytics_storage flags transmitted by your CMP. When consent is denied, UET switches to 'cookieless ping' mode (without cookie, without matching) allowing Microsoft to surface aggregated and modeled data without violating GDPR. On our panel, 30 to 40% of audited UET setups don't correctly wire Consent Mode v2 and lose both compliance and the modeled conversions that follow. Details in the dedicated section.
How long before Microsoft Ads Smart Bidding is clean after UET installation?
14 to 21 days minimum after conversions are reporting stably. The UET tag must generate at least 30 conversions in a 30-day window per campaign for a Target CPA or Target ROAS to function correctly (Microsoft thresholds equivalent to Google's). Below that, the algorithm stays in exploration, CPC can be erratic, and CPA uncontrolled. Recommended practice: start in Manual CPC or Maximize Clicks for 2-3 weeks, validate tracking stability, then switch to Smart Bidding. Burning the budget in learning phase on unstable tracking is the most expensive migration mistake.