Skip to content
Blog · Tracking

Microsoft Ads conversion tracking setup: UET tag, goals and server path

Microsoft Ads conversion tracking: UET tag, conversion goals, UET consent mode for UK and EU, and the Conversions API server path. Checked December 2026.

Daniel Kalcher11 min read

Microsoft Ads conversion tracking is a UET tag on every page of your website, plus a conversion goal in the account that defines which action counts. For visits from the EEA and the UK, UET consent mode comes on top, because Microsoft requires a consent signal. Closing deals offline? Add the server path too. Checked December 2026, step by step.

Microsoft Ads conversion tracking setup: 5 steps

Menu names in Microsoft Advertising change from time to time. If you cannot find an item, search the interface for "UET".

  1. Create the UET tag. Open "UET tag" in the account and create a tag. One is enough: you can use it for all conversion goals and remarketing lists. Copy the tag ID.
  2. Add the tag to every page. Microsoft recommends placing the tracking code across the whole site, in the head or the body. If your site has a shared layout, put it there and it appears everywhere. Alternatively, load it through your tag manager. If the form lives on another domain, passing the click ID across domains helps; if it sits in an iframe, the post on tracking embedded forms shows what is missing.
  3. Create a conversion goal. Pick a goal type and a category, give it a name and choose the UET tag. The next section shows which goal type fits.
  4. For an event goal: send the event. An event goal only counts once your tag code reports the event. Fire the call when the action happens, for example after the form has been submitted successfully. Without writing code, you can do the same with no-code events by point and click.
  5. Check the status. After up to 24 hours the account shows whether the tag is active and whether conversions arrive. How to test it follows further down.

The event from step 4 looks like this in the tag code:

<script>
  window.uetq = window.uetq || [];
  window.uetq.push('event', 'submit_lead_form', {
    event_category: 'lead',
    event_label: 'contact-form',
    event_id: 'lead-7f3a9c2e'
  });
</script>

The first value after 'event' is the action. In the conversion goal you enter the same action. If the spelling differs, Microsoft cannot match the goal and the conversion stays invisible. You need the event_id later to deduplicate against the server path. Microsoft describes the parameters in the help article Report custom events with UET.

Good to know: as soon as you create a goal of type Event, URL, Duration, Pages per visit or Offline, Microsoft automatically turns on auto-tagging of the click ID in the account, according to the developer docs. From then on Microsoft appends the msclkid to every destination URL.

Choosing a conversion goal: goal types compared

Microsoft has seven goal types. Which one fits depends on how you recognise the action. The data comes from the Microsoft documentation on Universal Event Tracking and the Campaign Management API objects.

Goal typeCounts when ...UET tag neededFits
URL (destination URL)a specific page is viewedyes, no extra codeThank-you page after a form or purchase
Eventyour tag code reports an eventyes, with extra codeForms without a thank-you page, purchases with a value, clicks
Durationa visit lasts a minimum timeyes, no extra codeContent pages, engagement
Pages per visita visit reaches a minimum number of pagesyes, no extra codeShops and portals
App installthe app is installednoApp campaigns
Offline conversionan outcome outside the website is reported backnoOutcomes from the CRM and sales
In-store transactiona purchase in a shop is recordednoPhysical stores

For lead generation, two types are usually enough. The URL goal is the quickest start: no code, just the address of the thank-you page, the same one you would track for other platforms. It counts the page view, not the action itself, so anyone who reloads the thank-you page or opens it from a link triggers it too.

The event goal needs one line of code, but it fires exactly at the action, even when there is no page of its own.

Event goals carry a category. Microsoft lists, among others, "Submit lead form" (SubmitLeadForm), "Book appointment" (BookAppointment), "Purchase", "Sign-up" (Signup), "Request quote" (RequestQuote) and "Contact". The category only sorts the reports. According to the docs it has no effect on ad delivery.

Count type, window and value

Three settings decide how an action turns into a number in the report. They apply per goal.

  • Count type: "All" counts every conversion after a click, "Unique" counts only one. Microsoft names Unique as the usual choice for leads and All for sales. An example from the docs: one click brings two leads and two sales, you count leads as unique and sales as all. The report then shows three conversions.
  • Conversion window: The time after the click in which conversions count. Possible values run from 1 minute to 90 days (129,600 minutes). A shorter window lowers the number of recorded conversions.
  • Value: A fixed value per conversion, or a variable value that your tag sends along. Variable values are not available for the goals Duration, Pages per visit and App install. If you have no figure yet, use an estimated value for leads from the lead value calculator and label it internally as an estimate.

A goal name can be at most 100 characters long and must be unique among all goals in your account. You also set the scope: account or customer (all accounts). You cannot change the scope later. To switch, create a new goal and pause the old one.

Microsoft Ads conversion tracking in the UK and EU

Microsoft requires advertisers using UET to send a consent signal for visits from the EEA, the United Kingdom and Switzerland. The deadline was 5 May 2025. If the signal is missing, Microsoft says it affects performance. The source is Microsoft's announcement Providing user consent signals on your Microsoft campaigns.

The signal is called ad_storage and has two values: granted (cookies for advertising allowed) and denied (blocked). You set a default and update it as soon as the visitor decides in the banner:

window.uetq = window.uetq || [];
window.uetq.push('consent', 'default', { ad_storage: 'denied' });

// after the decision in the consent banner
window.uetq.push('consent', 'update', { ad_storage: 'granted' });

In countries where Microsoft enforces consent mode, denied applies when you set no default.

With denied, the tag neither reads nor writes first-party cookies and does not write third-party cookies, according to Microsoft's help article Setting up UET for Consent Mode. Set the default on all pages.

Microsoft gives you three routes and one is enough: consent mode directly in the UET tag, passing the signal through the IAB TCF, or integration through Google Tag Manager. Do not use several at once.

How banners and consent signals work together is shown in the use case setting up a consent banner and consent mode.

The legal framework is covered in the guide to GDPR-compliant ad tracking. Whether your tag may set cookies is a question of UK GDPR and PECR in the UK and of the ePrivacy rules in the EU. The same question comes up for every ad tag, for example the LinkedIn Insight Tag under GDPR.

Checking Microsoft Ads conversion tracking: does it arrive?

Check in this order, and when something fails you know straight away where it sits.

  1. Tag status in the account. A UET tag is "unverified", "active" or "inactive". For up to 24 hours after installation it can still read "unverified". "Inactive" means Microsoft received no visits from the tag for 24 hours. Then check whether the code is still on the page.
  2. Tag on the page. Microsoft's browser extension UET Tag Helper shows which UET tags run on the page, whether they work and whether your conversion goals are set up correctly.
  3. Test conversion. Trigger the action yourself, with a fresh browser profile and consent given in the banner. If the event appears in the Tag Helper, the browser sent it.
  4. Goal in the account. Look at the conversion column in the report the next day. If it stays empty, first compare the action and its spelling in the goal with the event in the code.

A test in your own browser only tells you about that browser. Your Microsoft Ads conversion tracking is then only half checked.

What happens afterwards, such as lost cookies, Safari's tracking protection or a switch from phone to laptop, does not show up there. The attribution gap calculator estimates how big that gap is for you. That is where the next section starts.

Microsoft Ads conversion tracking via the Conversions API

The UET tag only sees what happens in the browser.

An appointment your sales team books a week later, or a payment at the payment provider, never reaches it. For this Microsoft built the Conversions API (CAPI): your server sends events straight to Microsoft. Microsoft recommends using it together with the UET tag wherever possible. The method in general is explained in the guide setting up the Conversions API.

As of December 2026 the feature is not enabled in every account. Microsoft's help page says not everyone has it yet. If the option "Use Conversions API" is missing on the UET tag, ask your Microsoft contact.

This is how setup works according to Microsoft's CAPI guide:

  1. Get the token. Open your UET tag, choose "Save and continue", then "Use Conversions API" and "Copy token". The token belongs to exactly this tag.
  2. Send an event. By POST to capi.uet.microsoft.com/v1/{tagId}/events, with Authorization: Bearer <token> and JSON in the body. Up to 1,000 events per call; real time is better than batch.
  3. Pass the click ID. Store the person's most recent msclkid (Microsoft suggests 90 days) and send it with every event. The click ID goes into the request without hyphens.
  4. Deduplicate. If the same conversion counts in the tag and on the server, use the same eventId, the same eventName and the same UET tag. Otherwise Microsoft counts twice. How that looks at Meta is explained in event deduplication at Meta.

An example of a lead event (values are examples):

{
  "data": [
    {
      "eventType": "custom",
      "eventId": "lead-7f3a9c2e",
      "eventName": "submit_lead_form",
      "eventTime": 1796000000,
      "userData": {
        "msclkid": "dd4afcccb1c94a4cad9544dd7e5006ab",
        "em": "<SHA-256 of the normalised email>",
        "anonymousId": "b171a9b06ce011ecafcd1b209be8601b"
      },
      "customData": { "value": 120, "currency": "EUR" }
    }
  ]
}

Required are eventType, eventTime and at least one identifier in userData.

According to Microsoft the msclkid is "strongly preferred". Microsoft recommends hashed email and phone number for all users where they are available and permitted. The email is cleaned first: remove spaces, remove dots in the local part and aliases, convert to lower case, then compute SHA-256. The phone number goes into the hash in E.164 format (+447911123456).

eventTime may be at most 90 days in the past.

If the server should also feed remarketing lists, you also need ID Sync, a small pixel in the browser that links your visitor ID to Microsoft's identifier. Microsoft recommends it for pure conversion measurement too.

If you report outcomes outside the website as a file instead of through the API, that is a separate route: the offline import with its own goal of type Offline conversion, which the post on offline conversions in Microsoft Ads covers.

Which CRM stages belong with an ad platform at all is covered in the post sending CRM outcomes back to ad platforms.

Conversion API: show Meta and Google who actually buys.

Leads, meetings and deals go server-side to seven ad platforms, deduplicated with the pixel. So their algorithms optimize for real customers.

Server path without your own code: how TSO does it

If you build the API yourself, you maintain the token, hashing, click IDs and retries. The Conversions API feature takes that off your plate.

The connection is described in the Microsoft Ads integration from TSO: you connect a Microsoft login under "Ad accounts", enter the tag ID and token of the UET tag, and create conversion goals of type Event in Microsoft. The action of the goal matches the event name, for example submit_lead_form for leads and purchase for purchases.

After that TSO sends every conversion with the msclkid, the UET visitor ID and hashed email and phone number, and for payments and won deals with value and currency. The event ID is the same as in the UET tag, so Microsoft counts each conversion once.

You decide per goal which data goes to Microsoft. The delivery log shows per goal what was sent, with status and reason.

One limit belongs here: the Microsoft Ads connection is built but is still being tested manually against the live platform. The integration also sends through Microsoft's Conversions API, not through the file-based offline import.

The server does not replace the UET tag, it complements it: the tag supplies the browser, the server supplies the outcome.

If you only count leads, the five steps above are enough.

If you want to know which ad brings appointments and contracts, you need both, because at low volume every conversion that comes back counts. That is how you can optimise for qualified leads, and the post on the cost per meeting shows what an appointment really costs. The same principle applies to ChatGPT Ads.

How TSO helps

Frequently asked questions

How does Microsoft Ads conversion tracking work?

You create a UET tag in the account and add it to every page. Then you define a conversion goal, such as a thank-you page or an event. Microsoft attributes the action to the ad click that led to it.

Do I still need the UET tag if I use the Conversions API?

Microsoft recommends using the Conversions API together with the UET tag wherever possible. The tag supplies browser context, the API supplies events that happen after the visit. If the same conversion is counted on both paths, the eventId must match.

Do I need UET consent mode in the UK or EU?

Microsoft requires a consent signal for visits from the EEA, the UK and Switzerland. The deadline was 5 May 2025, and Microsoft says performance can suffer without the signal. Whether you need consent in the first place is a question of UK GDPR, PECR and the ePrivacy rules, so check it with your legal adviser.

How long does it take for the UET tag to be verified?

Up to 24 hours. According to Microsoft's help, the status can read unverified for that long. If the tag then reports no visits for 24 hours, it shows as inactive.

Does Microsoft count a lead twice if someone submits the form twice?

Only with the count type All. With Unique, Microsoft counts one conversion per ad click. Microsoft names Unique as the usual choice for leads and All for sales.

Terms in this article

In depth in the guide

Written by
Daniel KalcherCTO

Daniel is CTO and leads the technology behind tracking, attribution and conversion APIs at TSO.

All articles →

From the article to clean measurement.

Set up TSO with us in a demo or request beta access.