Set Up Microsoft Ads Conversion Tracking (UET)
Set up Universal Event Tracking (UET) and conversion goals for Microsoft Advertising campaigns
Instructions
Set Up Microsoft Ads Conversion Tracking (UET)
Prerequisites
- Microsoft Advertising account with API access
- Access to your website codebase or tag manager
Steps
-
Create a UET tag via API. Use the Campaign Management API
AddUetTagsoperation:<AddUetTagsRequest> <UetTags> <UetTag> <Name>Main Website UET Tag</Name> <Description>Tracks all website conversions</Description> </UetTag> </UetTags> </AddUetTagsRequest>The response returns a
TagIdand the JavaScript tracking snippet. -
Install the UET tag on all pages. Add the returned JavaScript snippet to every page, or install via Google Tag Manager using the Microsoft Advertising tag template. The tag fires a page view event on every page load.
-
Create conversion goals. Use
AddConversionGoalsto define what counts as a conversion:<AddConversionGoalsRequest> <ConversionGoals> <ConversionGoal xsi:type="UrlGoal"> <Name>Demo Request</Name> <ConversionWindowInMinutes>43200</ConversionWindowInMinutes> <!-- 30 days --> <CountType>Unique</CountType> <Revenue> <Type>FixedValue</Type> <Value>200</Value> <CurrencyCode>USD</CurrencyCode> </Revenue> <TagId>{uet_tag_id}</TagId> <UrlExpression> <Operator>Contains</Operator> <Value>/thank-you</Value> </UrlExpression> </ConversionGoal> </ConversionGoals> </AddConversionGoalsRequest>Goal types: UrlGoal (thank-you page), EventGoal (custom events), DurationGoal, PagesViewedPerVisitGoal.
-
Set up event-based goals for form submissions. Fire custom UET events from your form handler:
window.uetq = window.uetq || []; window.uetq.push('event', 'form_submit', { 'event_category': 'lead', 'event_label': 'demo_request', 'event_value': 200 });Then create an EventGoal in the API matching this event name.
-
Verify conversion tracking. Use the UET Tag Helper browser extension to confirm the tag fires correctly. Check the
ConversionGoalStatusvia API -- status should move fromNoRecentConversionstoRecordingConversionswithin 24 hours of the first conversion. -
Enable Enhanced Conversions (optional). For server-side tracking, use the Microsoft Advertising Conversions API (CAPI) to send conversion events directly from your server, bypassing ad blockers:
POST https://bat.bing.com/api/conversions { "conversions": [{ "conversion_goal_id": "{goal_id}", "conversion_time": "2026-03-30T10:00:00Z", "conversion_value": 200, "hashed_email": "{sha256_hash}" }] }
Error Handling
UetTagNotVerified: Tag not detected on site. Verify installation and check for ad blockers during testing.ConversionGoalNoRecentConversions: No conversions recorded. Confirm the URL pattern or event name matches exactly.