Microsoft Ads now takes conversions server to server through the UET Conversions API (CAPI). In a server-side Google Tag Manager container you add a Conversions API tag, give it your UET tag ID and the API token from Microsoft Ads, and map your GA4 events to it. Keep the browser UET tag as well, send the same event_id from both so Microsoft counts each conversion once, and set the consent field so declined visitors are not used for ads.
TagLinc hosts server-side GTM, so we are not neutral. Everything below was checked on 17 November 2026 against Microsoft's own guide (last updated 29 October 2026) and the source code of the open-source server template. We also called the API endpoint ourselves to confirm what an error looks like. We have not sent a real conversion into a Microsoft Ads account, and we say so where it matters. If server-side GTM is new to you, start with What is server-side GTM?
Why the browser UET tag misses conversions
The standard UET tag loads bat.js from bat.bing.com in the visitor's browser. That works until something gets in the way:
- Ad blockers.
bat.bing.comis on the common blocklists, so for many desktop visitors the tag never loads. See how ad blockers affect tracking. - Safari and cookie limits. UET keeps the click ID (
msclkid) and visitor ID in cookies. When a browser shortens script-set cookies, a buyer who returns after a week looks like a new visitor and the conversion loses its ad click. See first-party cookies and cookie lifetime. - Checkout pages you don't control. Hosted checkouts and thank-you pages often run scripts in a sandbox or not at all.
The Conversions API sends the same event from your server instead, where none of these apply. Microsoft's guide says it "recommends using CAPI with Universal Event Tracking (UET) whenever possible": both together, not one instead of the other.
What you need
- A Microsoft Ads account with a UET tag and at least one conversion goal.
- The Conversions API token for that UET tag (step 1).
- A server-side GTM container on any host, with your web GTM already sending GA4 events to it. If you don't have that yet, follow GA4 server-side tracking setup first.
- Your Microsoft Ads Customer ID (not the same as the UET tag ID) if you want the browser ID sync for remarketing.
Step 1: Get the Conversions API token
- In Microsoft Ads, open the UET section (under Conversions / conversion tracking).
- Click the pencil icon on your UET tag, then Save and next.
- Under Set up tagging, choose Use Conversions API.
- In the Conversions API section, click Copy Token, then Next and Done.
Agencies can also fetch the token with the Campaign Management API (UetTagAuthKey/Query with the tag ID). Only the tag's owner can generate a new token; an account the tag is shared with can only read the existing one. Treat the token like a password: it goes into the server container only, never into web GTM or page code.
Step 2: Add the Conversions API tag to server GTM
Microsoft doesn't ship its own server tag in GTM's gallery, but its guide lists partner integrations, and the common one for server GTM is an open-source template by Stape (Apache 2.0 licence). In your server container:
- Go to Templates → Tag Templates → Search Gallery.
- Search for Microsoft UET Conversion API. The template shows as "Microsoft Ads UET Conversion API by Stape". Click Add to workspace.
- Go to Tags → New and choose that template.
It works in any server-GTM container; you don't need to host with Stape to use it.
Step 3: Configure the tag
- UET Tag ID and Authorization Token: from step 1.
- Setup method: choose Inherit from client to map GA4 events automatically (for example
page_view→ page load,purchase→ purchase). The template's own notes call this mapping "limited": custom events, and anything you want named differently in Microsoft Ads, need the Standard method with the fields filled in yourself. - User data: Microsoft needs at least one identifier per event: anonymous ID, external ID, hashed email, hashed phone or
msclkid. The tag readsmsclkidfrom the page URL or the_uetmsclkidcookie and the visitor ID from_uetvid. If it finds neither, it creates its own IDs and sets them as first-party cookies from your tracking domain (uet_vidfor 390 days,uet_msclkidfor 90 days by default). Email and phone are hashed by the tag if you pass them in plain text. - Revenue: map
valueandcurrency(a three-letter ISO code such as USD or EUR) for purchases, plus a transaction ID, which Microsoft calls "optional but recommended" for one-off events like a purchase. - Client-Side ID Sync: the template calls it "strongly recommended". It fires a small request from the browser to
c.bing.comwith your Customer ID and the visitor ID, so Microsoft can join server events to its own visitor. Microsoft says this sync is required for remarketing.
Trigger the tag on the events you want to send, usually the GA4 client's page_view, the conversion events behind your goals (purchase, generate_lead, sign_up) and any ecommerce events your audiences use.
Step 4: Don't count conversions twice
With both the browser tag and the server tag running, every conversion arrives twice. Microsoft's rule: send "the same stable deduplication value in eventId" from both, keep the event name the same, and use the same UET tag ID. A browser UET purchase event with an ID looks like this:
window.uetq.push('event', 'purchase', {
revenue_value: 49.00,
currency: 'USD',
event_id: 'purchase_10432'
});
The easy way in GTM is one ID for both:
- In web GTM, build one event ID per event. For purchases, use the order number (
purchase_10432); for other events, a random value made once per event. - Give it to the browser UET event tag as
event_id. - Add the same value to the GA4 event as a parameter called
event_id. The server template readsevent_idfrom the incoming event automatically, so the server copy carries the same ID.
This is the same pattern as Meta's Pixel and Conversions API, which we tested step by step in Meta deduplication with event_id. Microsoft's guide doesn't state a time window for matching, so send the server copy straight away rather than in a delayed batch.
Step 5: Respect consent
Each event can carry adStorageConsent: G (granted) or D (denied). Microsoft processes events as granted when the field is missing. A denied event "will not be used for any ad purposes": no attribution, no retargeting.
In the template the field is Consent Granted for Ad Storage, and it's left out unless you set it. For EEA, UK and Swiss visitors, fill it from Google Consent Mode's ad_storage state (the GA4 client passes it to the server container in the gcs parameter), or don't fire the tag at all without consent. Our Consent Mode v2 with server-side GTM guide shows how consent reaches the server container.
Step 6: Test it
- Open Preview in the server container and run the event on your site (a test order, form or sign-up).
- Check the tag fired and look at its outgoing request to
capi.uet.microsoft.comand the response code. - In Microsoft Ads, check the UET tag's status and the conversion goal. Allow some hours before the numbers move.
What the response codes mean:
| Response | Meaning |
|---|---|
| 200 | Accepted. A field Microsoft can't use (for example a badly hashed email) is dropped with a warning; the event still counts. |
| 400 | Validation error. By default the whole batch is rejected if one event is invalid. With continueOnValidationError: true the good events go through. |
| 401 | Wrong or missing token. We triggered this on purpose on 17 November 2026: a request with a made-up token came back in about 0.75 seconds as {"error":{"code":"Unauthorized","message":"You are not authorized to access this resource."},"traceId":"…"}. If you see it, copy the token from step 1 again and check it belongs to the same UET tag ID. |
The fields Microsoft accepts
| Field | Required? | Notes |
|---|---|---|
eventType | Yes | pageLoad or custom |
eventTime | Yes | Unix time in seconds (UTC), no older than 90 days |
eventSourceUrl | For page loads | The page URL |
eventId, eventName | For deduplication | Must match the browser UET event |
userData | Yes, at least one ID | anonymousId, externalId, em, ph, msclkid; IP and user agent preferred |
customData | No | value, currency, transactionId, items, page type |
adStorageConsent | No | G or D; treated as granted if missing |
Gotchas
- Email hashing differs from Meta. Before hashing, Microsoft trims the address, lowercases it, removes dots from the part before the @ and drops any +alias. So
Jane.Doe+shop@gmail.combecomesjanedoe@gmail.com. Phones go to E.164 format (+15551234567) and then SHA-256. If you hash email yourself for Meta, don't reuse that hash for Microsoft. msclkidhas no hyphens. It's a 32-character value likedd4afcccb1c94a4cad9544dd7e5006ab.- The 90-day limit is not your attribution window. It only says how late you may send an event.
- Batches top out at 1,000 events, but real-time sending (one event per request, as server GTM does) is what Microsoft prefers.
- Remarketing needs the browser side. Server events alone don't build Microsoft audiences without the ID sync or the browser UET tag.
Should you keep the browser UET tag?
Yes. The browser tag picks up visits and clicks that never reach your server events and feeds remarketing; the server tag catches the conversions the browser misses. With the same event_id on both, Microsoft keeps one copy. Turn off the browser tag only if you have a clear reason and have checked that conversions and audiences still fill in.
We check your setup for free and send you what to fix.
FAQ
Microsoft's guide lists no fee for it. Your cost is the server container that sends the events.
No, not for server-side GTM. The tag only needs the UET tag ID and the API token from step 1. A developer token is only needed if you build your own integration against the Campaign Management API.
Not completely. The Conversions API is for events as they happen on your site. If you close deals in a CRM days later and upload them with the Microsoft click ID, offline import still fits that job.
Yes, as long as your store sends GA4 events to a server container. Our Shopify and WooCommerce guides cover that part. The Microsoft tag then works like any other server tag.
Not yet. TagLinc's automatic GTM setup adds tags for GA4, Google Ads, Meta and TikTok. For Microsoft Ads you add the template yourself, as above, in your TagLinc server container. It works the same on any plan, including the free one.