How Microsoft Advertising Tracking Works
Microsoft Advertising (formerly Bing Ads) uses the Universal Event Tracking (UET) tag as its primary measurement tool. The UET tag handles conversion tracking, audience building, and remarketing across the Microsoft Search Network (Bing, Yahoo, AOL, DuckDuckGo syndicated results).
Browser-side (UET Tag):
The UET tag loads bat.bing.com/bat.js, which initializes a global UET object and uetq data layer. On page load, it sends a pageview event to bat.bing.com. The tag sets a _uetmsclkid first-party cookie to store the Microsoft Click ID. All subsequent events are sent to bat.bing.com/action/0 with the tag ID, event data, and cookie identifiers.
Auto-tagging (MSCLKID):
When a user clicks a Microsoft Advertising ad, the msclkid parameter is automatically appended to the landing page URL. The UET tag reads this parameter and stores it in the _uetmsclkid cookie for attribution. This is the primary mechanism for linking conversions to ad clicks.
Enhanced Conversions: Enhanced Conversions supplement cookie-based tracking by sending hashed first-party customer data (email, phone) alongside conversion events. This improves attribution accuracy when cookies are blocked or expire.
Conversion goals: Unlike platforms that define conversion types in code, Microsoft Advertising defines conversion goals in the Ads Manager UI. Goals are matched against UET tag data using URL rules, event names, or destination URL patterns. One UET tag handles all goal types.
Installing the UET Tag
Add the UET tag inside <head> on every page:
<script>
(function(w,d,t,r,u){
var f,n,i;
w[u]=w[u]||[],f=function(){
var o={ti:"YOUR_UET_TAG_ID", enableAutoSpa498: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 tag ID from Microsoft Advertising > Tools > UET Tags.
Via Google Tag Manager:
Use the Microsoft Advertising Universal Event Tracking tag template. Set the UET Tag ID and fire on All Pages. For conversion events, use additional GTM tags that push to the uetq data layer.
Single Page Applications (SPA):
For React, Vue, or Angular apps, the UET tag supports automatic SPA tracking with enableAutoSpaTracking: true. Alternatively, push manual page views:
window.uetq = window.uetq || [];
window.uetq.push('event', 'page_view', {
page_path: '/new-page-path'
});
Conversion Goals
Conversion goals are created in Microsoft Advertising UI, not in code. The UET tag sends raw event data, and goals match against that data.
Goal Types
Destination URL goals:
Tracks when a user lands on a specific URL (e.g., /thank-you, /order-confirmation). No additional code needed beyond the base UET tag.
Event goals: Tracks custom events pushed to the UET data layer:
window.uetq = window.uetq || [];
window.uetq.push('event', 'purchase', {
event_category: 'ecommerce',
event_label: 'order_12345',
event_value: 89.99,
revenue_value: 89.99,
currency: 'USD'
});
Then create an Event goal in Ads Manager matching on event_action = purchase.
Duration goals: Tracks when a user spends more than a specified time on the site. Configured entirely in the UI; no additional code required.
Pages per visit goals: Tracks when a user views more than a specified number of pages. Also UI-only configuration.
Common Conversion Events
// Purchase / Order Completion
window.uetq.push('event', 'purchase', {
revenue_value: 149.99,
currency: 'USD',
event_label: 'order_67890'
});
// Add to Cart
window.uetq.push('event', 'add_to_cart', {
event_category: 'ecommerce',
event_value: 49.99,
currency: 'USD'
});
// Lead / Form Submission
window.uetq.push('event', 'submit_lead_form', {
event_category: 'lead_gen',
event_label: 'contact_form'
});
// Sign Up
window.uetq.push('event', 'sign_up', {
event_category: 'registration'
});
// Phone Call Click
window.uetq.push('event', 'phone_call_click', {
event_category: 'engagement'
});
Variable Revenue Tracking
For dynamic purchase values, pass revenue_value and currency:
window.uetq.push('event', 'purchase', {
revenue_value: orderTotal, // dynamic value
currency: 'USD'
});
Create the conversion goal in Ads Manager with "Revenue: variable" selected. The revenue_value from each event populates the conversion value.
MSCLKID Auto-Tagging
MSCLKID (Microsoft Click ID) is automatically appended to landing page URLs when users click Microsoft Advertising ads:
https://example.com/product?msclkid=abc123def456
How it works:
- User clicks a Microsoft ad
- Microsoft appends
msclkid=<unique_id>to the URL - The UET tag reads the parameter and stores it in the
_uetmsclkidfirst-party cookie - Subsequent conversion events include the stored MSCLKID for attribution
Requirements:
- Auto-tagging must be enabled (it is on by default at the account level)
- Landing pages must not strip the
msclkidquery parameter - The UET tag must be present on the landing page to read and store the value
Offline conversion import:
MSCLKID enables offline conversion tracking. Capture the msclkid value from the URL when a lead submits a form, store it in your CRM, then upload conversions with the msclkid value via the Microsoft Advertising API or bulk upload.
# Offline conversion upload format (CSV)
# msclkid, conversion_name, conversion_time, revenue, currency
abc123def456, Closed Deal, 2025-03-04T14:00:00Z, 5000.00, USD
Enhanced Conversions
Enhanced Conversions send hashed customer data alongside UET events to improve conversion attribution when cookies are unavailable.
Implementation:
window.uetq.push('event', 'purchase', {
revenue_value: 89.99,
currency: 'USD',
ecomm_prodid: 'SKU-001',
// Enhanced Conversion data (auto-hashed by UET)
pid: {
em: 'user@example.com', // email - auto-hashed
ph: '+11234567890', // phone - auto-hashed
fn: 'John', // first name - auto-hashed
ln: 'Smith', // last name - auto-hashed
st: 'WA', // state
ct: 'Seattle', // city
zp: '98101', // zip code
country: 'US'
}
});
Enable Enhanced Conversions:
- In Microsoft Advertising, go to Tools > Conversion Tracking > Conversion Goals
- Select the goal and enable Enhanced Conversions
- Pass the
pidobject with customer data in your UET event pushes
The UET tag automatically SHA-256 hashes PII fields before transmission. Do not pre-hash the data.
Audience Targeting
The UET tag enables several audience types in Microsoft Advertising:
Remarketing Lists
Target users based on page visits or events tracked by UET:
- All visitors in the last N days (1-180)
- Visitors of specific pages (URL contains, equals, or regex match)
- Custom events (users who triggered a specific event)
- Custom combinations (AND/OR/NOT logic across multiple lists)
Create in Ads Manager > Tools > Audiences > Create Audience > Remarketing List.
In-Market Audiences
Microsoft's pre-built segments of users actively researching products or services in specific categories. These are derived from Bing search behavior and Microsoft property browsing data. No UET configuration needed -- select from the list in campaign targeting.
LinkedIn Profile Targeting
Available exclusively in Microsoft Advertising. Target users by:
- Company (employer name)
- Industry (LinkedIn industry categories)
- Job Function (marketing, engineering, finance, etc.)
This targeting overlays on top of keyword or audience campaigns. It does not require UET -- it uses Microsoft's LinkedIn data for matching.
Customer Match
Upload hashed email lists for direct audience matching:
- Minimum 1,000 email addresses
- SHA-256 hashed before upload
- Matched against Microsoft account emails
Bing Shopping Campaigns
Shopping campaigns use a Microsoft Merchant Center product feed and UET tag events for tracking.
Merchant Center setup:
- Create a Microsoft Merchant Center store
- Upload a product feed (XML, TXT, or TSV) with required fields:
id,title,description,link,image_link,price,availability,brand,gtinormpn - Link the Merchant Center store to your Microsoft Advertising account
UET tag for Shopping: The base UET tag tracks all shopping conversions. For dynamic remarketing with shopping campaigns, push product-level data:
window.uetq.push('event', 'page_view', {
ecomm_prodid: 'SKU-001',
ecomm_pagetype: 'product',
ecomm_totalvalue: 49.99
});
Page type values: home, searchresults, category, product, cart, purchase, other.
Product feed matching: The ecomm_prodid value must match the id field in your Merchant Center product feed for dynamic remarketing to work.
Google Merchant Center import: Microsoft Advertising can import your Google Merchant Center feed directly. Go to Microsoft Merchant Center > Import from Google. This syncs products, pricing, and availability.
Common Issues
UET tag not tracking:
Verify the tag ID in the script. Use the UET Tag Helper Chrome extension to confirm the tag fires. Check that bat.bing.com is not blocked by ad blockers or consent management platforms.
MSCLKID stripped from URLs:
Server-side redirects, URL rewriting rules, or CMS platforms may strip query parameters. Test the full click-through URL and verify msclkid persists on the final landing page. Common culprits: WordPress permalink settings, Cloudflare page rules, and marketing redirect chains.
Conversion goal shows "Unverified": The UET tag must fire at least one event matching the goal criteria. After installing the tag, wait up to 24 hours for Microsoft to verify. If still unverified, check that the URL pattern or event name in the goal matches exactly.
Revenue showing $0 on purchase goals:
Ensure revenue_value (not event_value) is passed as a number, not a string. The conversion goal must be configured with "Revenue: Each time it happens use the variable revenue" selected.
Enhanced Conversions not matching:
The pid object must be passed in the same uetq.push() call as the conversion event. Passing email in a separate call does not associate the data. Verify the email address is the raw value (not pre-hashed) since UET handles hashing.
Shopping feed disapproved:
Common causes: missing required fields (gtin, brand), price mismatches between feed and landing page, shipping not configured in Merchant Center, or landing page URL returning 404.
LinkedIn targeting not available: LinkedIn profile targeting is only available in certain markets and requires a minimum campaign budget. Check Microsoft's documentation for current market availability.
Platform-Specific Considerations
Google Ads import: Microsoft Advertising can import campaigns directly from Google Ads. Go to Import > Import from Google Ads. This copies campaign structure, keywords, ads, and bid strategies. UET tag and conversion goals must still be configured separately since Google's gtag and Microsoft's UET are independent systems.
Microsoft Audience Network: Display ads on Microsoft properties (MSN, Outlook, Microsoft Edge) use the same UET tag for conversion tracking. No additional pixel is required. Audience Network campaigns can use the same remarketing lists and conversion goals as Search campaigns.
Cross-device tracking: Microsoft tracks users across devices through Microsoft account logins (Windows, Edge, Outlook, Xbox). This is automatic when UET is installed -- no additional configuration. Cross-device conversions appear in reporting under the "Assists" column.
Automated extensions: Microsoft may auto-generate ad extensions (sitelinks, callouts, structured snippets) from your website content. To control this, set extension preferences in campaign settings or manually create all extensions.
Data retention: UET event data is retained for 390 days. Remarketing lists can use a maximum 180-day lookback window. Conversion data is available in reports for up to 3 years.
Consent mode: The UET tag supports a consent mode. Set consentGranted: false in the UET configuration to prevent tracking until consent is obtained. Update consent state dynamically with window.uetq.push('consent', 'update', { ad_storage: 'granted' }).