Skip to content
🚀 Find us on Product Hunt

Microsoft Advertising (UET) Tracking Setup for WooCommerce

Quick answer: Use the free container builder wizard to select Microsoft Advertising (UET) and your events, enter your tracking ID, then import the generated file into Google Tag Manager - no manual tag setup needed for any of the 23 events below.

Universal Event Tracking base tag and standard events, generated as Custom HTML. This platform does not have a native GTM tag type, so the container wraps its base code in a Custom HTML tag.

Build my Microsoft Advertising (UET) container →

Events you can track

ecommerce events

engagement events

By Humayun Kabir Naim — Last updated: 9 November 2026

Quick answer

To track a WooCommerce store in Microsoft Advertising through Google Tag Manager, install one UET base tag on every page (it records page views and powers remarketing), then send the money event as a custom event from GTM: on the purchase data layer event, push a UET event whose action matches an Event goal you created in Microsoft Advertising, carrying the real order value as revenue_value and the currency with it. Add the ecommerce parameters (ecomm_prodid, ecomm_pagetype) so Microsoft's product audiences can build, wire UET's own consent mode — Microsoft does not read Google's consent signals — and verify everything with the UET Tag Helper before publishing. And before any of it, make sure you are installing UET at all: Microsoft Clarity, the heatmap tool stores often install first, is a different tag that sends Microsoft Advertising nothing.

Microsoft Clarity and UET compared — heatmaps versus advertising conversions

What gets tracked

UET needs far less than GA4: a base tag that sees every page, one goal event that carries the money, and product parameters for audiences. Translated from this hub's event list:

WooCommerce dataLayer eventUET setupWhy it matters
Every page viewBase UET tag (Tag ID, All Pages)Remarketing audiences; the page-view signal every goal stands on
purchaseCustom event purchase → Purchase goal, revenue_value + currencyThe conversion Smart Bidding optimises for, at real order values
view_itemPage hit with ecomm_prodid + ecomm_pagetype: productProduct audiences and dynamic remarketing
add_to_cartPage/event hit with ecomm_pagetype: cartCart-stage audiences
begin_checkoutecomm_pagetype: checkout (optional custom event)Checkout audiences; rarely worth a goal
Form submission / leadCustom event → Lead goal (optional)Only for enquiry-led stores
Refund— (no page exists)Handle in reporting; do not send a negative purchase
Wishlist, coupon, clicks, scrollNothing on UETKeep them in GA4

Two disciplines run through this table. First, the goal and the event are separate objects in separate products: the GTM tag sends an event action (purchase), and a goal in Microsoft Advertising decides that action counts as a conversion. A tag firing an action no goal matches is data nobody bids on. Second, revenue is passed, not assumed: the goal's revenue setting must be "may vary," and the tag must send the order's real value — miss either half and every conversion reports the goal's default value, and value-based bidding learns fiction.

Deep dives: Purchase, Add to Cart, Begin Checkout, View Item, Refund. Running GA4 too? Build the shared layer first: WooCommerce + GA4. See all options on the WooCommerce hub.

Before you start

  1. A Microsoft Advertising account and a UET tag. In Microsoft Advertising: Tools → Conversion tracking → UET tag → Create, name the tag, and copy the numeric Tag ID. One tag per store is the norm — every goal below hangs off it.
  2. Check you are not installing the wrong Microsoft tag. Clarity's script comes from clarity.ms and produces heatmaps and recordings in the Clarity dashboard; UET's comes from bat.bing.com and produces conversions and audiences in Microsoft Advertising. If the store "already has Microsoft tracking" because someone installed Clarity, you still need UET — and Clarity's presence proves nothing about your ads measurement.
  3. One UET sender only. There is no deduplication rescue for a doubled base tag. Check for a third-party pixel-manager plugin with Microsoft/UET enabled and for a hardcoded bat.bing.com snippet in the theme before GTM adds its copy.
  4. GTM installed, and the dataLayer working. One web container, and a dataLayer source (GTM4WP with WooCommerce enhanced ecommerce enabled) pushing the GA4-format events above — the purchase event carries the value, currency and items the UET tags will read. If your GA4 hub setup already works, this is done.
  5. Your consent setup, located. You will need to know where your banner's accept/deny decision can push a signal — UET consent mode (Step 5) hangs off the same decision your Google tags use, but speaks through uetq, not through GTM's built-in consent states.
Microsoft Advertising UET tag list with the store's tag ID

Route 1: Use the free TagManagerBuilder container

Open the GTM Container Builder, choose WooCommerce, then Microsoft UET, and tick the events you want. Enter your UET Tag ID, download the JSON, then in GTM go to Admin → Import Container and choose Merge → Overwrite conflicting tags, triggers, and variables. The container builds the base tag and event tags as Custom HTML (the uetq pattern); the goals themselves still have to be created in Microsoft Advertising (Step 2 of Route 2), and the consent step below still has to be wired to your banner. Test with the testing section before publishing.

Route 2: Build it manually in GTM

Step 1 — The base UET tag

Tags → New, choose Microsoft Advertising Universal Event Tracking from the Community Template Gallery (or a Custom HTML tag with Microsoft's base code), enter your Tag ID, and set the trigger to All Pages. This tag initialises the uetq queue, records a page view on every page, and sets the identifiers UET uses to tie later events to the ad click. Exactly one base tag: if the template tag and a Custom HTML copy both exist — a common leftover when someone migrates approaches — delete one before going further.

UET base tag in GTM on the All Pages trigger for a WooCommerce store

Step 2 — Create the Purchase goal in Microsoft Advertising

In Microsoft Advertising: Tools → Conversion tracking → Conversion goals → Create. Choose Website, category Purchase, and goal type Event. Set the event condition to Action equals purchase — character-for-character the action your GTM tag will send. Set Revenue to "Conversion value may vary" and add your currencies; set Count to count each order (the standard choice for purchases is to count all conversions, since each order is a real sale); pick the conversion window your sales cycle needs (up to 90 days); and attach the goal to the UET tag from Before you start. Until this goal exists, Step 3's tag sends an event Microsoft admires and ignores.

Microsoft Advertising Purchase event goal with revenue set to may vary

Step 3 — Variables that read the purchase push

The UET event needs three things from the purchase push, and all three already sit in the ecommerce object. Create in Variables → New → Data Layer Variable (Version 2): ecommerce.value, ecommerce.currency, ecommerce.transaction_id. Then one Custom JavaScript Variable called UET Product IDs for the remarketing parameter:

function() {
  var items = {{DLV - ecommerce.items}} || [];
  return items.map(function(item) { return String(item.item_id); }).join(',');
}

Use the same identifier your other platforms' variables produce — if your store's convention is the WooCommerce product ID, UET's ecomm_prodid should carry product IDs too, so Microsoft's product audiences describe the same products as everyone else's.

Step 4 — The purchase event tag

Create a second UET tag (template type set to the custom/conversion event, or a Custom HTML tag) that fires on a Custom Event trigger matching purchase:

window.uetq = window.uetq || [];
window.uetq.push('event', 'purchase', {
  revenue_value: {{DLV - ecommerce.value}},
  currency: '{{DLV - ecommerce.currency}}',
  ecomm_prodid: {{UET Product IDs}},
  ecomm_pagetype: 'purchase'
});

revenue_value must resolve to a number — if it arrives as a formatted string ("$129.99") or empty, the goal records its default value instead, and the failure is silent. Check the resolved values on the tag in Preview before anything else. The same pattern, minus revenue, builds an optional Lead event for enquiry-led stores ('event', 'lead' with a matching Lead goal).

UET purchase event tag in GTM sending revenue and product parameters

Step 5 — UET consent mode: Microsoft's own signals

UET does not inherit Google Consent Mode. Microsoft runs its own consent signals through the same uetq queue, and it requires them for visitors from the EEA, UK and Switzerland. Wire two pushes to your consent setup:

// Default — set before the UET tag loads, in your consent defaults:
window.uetq.push('consent', 'default', { ad_storage: 'denied' });

// Update — when the visitor accepts marketing consent: window.uetq.push('consent', 'update', { ad_storage: 'granted' }); ```

In GTM, the default belongs in the same Consent Initialization step that sets your Google defaults; the update belongs wherever your banner publishes the visitor's decision (your CMP's GTM integration or the tag that fires on consent granted). A store that wires Google consent carefully and skips this step sends Microsoft no signal at all — which, for the regions above, Microsoft treats as its own compliance problem, and can restrict what UET records.

UET consent mode default and update pushes configured in GTM

Test it: GTM Preview and UET Tag Helper

GTM Preview purchase event with the UET tag fired and revenue resolved
  1. Click Preview in GTM and open the store in Tag Assistant. Shop like a customer: product page, add to cart, checkout, test order.
  2. In the Preview timeline, click purchase. The UET purchase tag should sit under Tags Fired, and opening it should show revenue_value resolved to the real order total — not empty, not a string with a currency symbol.
  3. Install the UET Tag Helper Chrome extension and repeat the flow on the live store. It reports the tag it finds, its ID and status, and the events received with their parameters — including whether the purchase event arrived carrying revenue.
  4. In Microsoft Advertising, open the UET tag's activity and the Purchase goal. A goal showing Tag inactive simply means no qualifying hit has arrived yet; once your test purchase lands, the goal should move to recording. Judge the tag by the Helper first — goal status lags.
  5. Only when the purchase event arrives with the right value end to end, click Submit in GTM to publish. Then sanity-check the first real days: conversion values in Microsoft Advertising should vary order by order, like the store's actual revenue — a flat, identical value on every conversion means the goal's default is being recorded (see Troubleshooting).
UET Tag Helper showing the purchase event with revenue on a WooCommerce store

Enhanced conversions and product audiences — the two extras

Enhanced conversions. Microsoft offers enhanced conversions for UET, which improve matching by using hashed first-party customer data (such as the checkout email) alongside the tag. It is configured on the Microsoft Advertising side and in the tag's data settings rather than as a data-layer pattern you build in GTM — set it up from Microsoft's own instructions once the base measurement is proven, and only with the same consent discipline as every other tag. It lifts match rates; it fixes nothing about a broken event.

Product audiences. The ecomm_prodid and ecomm_pagetype parameters you sent in Steps 3–4 are what Microsoft's product audiences and dynamic remarketing are built from: a product viewer is a hit carrying a product ID with pagetype product; a cart abandoner is pagetype cart without a following purchase. Send the parameters consistently — same ID convention on every page type — or the audiences quietly describe the wrong products. Full server-side coverage, for when the browser is not enough, lives in the Server-Side Tracking guide.

Microsoft Advertising Purchase goal recording conversions with varying values

WooCommerce-specific troubleshooting

Every conversion shows the same value. The goal is recording its default revenue. Two suspects, one in each product: the goal's Revenue is not set to "may vary" in Microsoft Advertising, or the tag's revenue_value resolves empty in GTM (check it on the fired tag in Preview). Fix whichever half is missing; changing only one changes nothing.

The goal says "Tag inactive" and records nothing. Work in order: base tag present on the live site (UET Tag Helper, not just Preview)? Goal attached to this Tag ID? Event Action in the goal spelled exactly purchase, matching the tag? Most "inactive" goals are a spelling or Tag-ID mismatch between two screens that each look correct in isolation.

Conversions are counted twice. Two base tags. Hunt for the second sender: a pixel-manager plugin with UET enabled, a hardcoded bat.bing.com snippet in the theme, or both the gallery template and a Custom HTML base tag inside GTM itself. Remove one source and let counts heal from that date.

"We already have Microsoft tracking" — but it's Clarity. The heatmap tag and the advertising tag are different products. Clarity data flowing proves Clarity works; it says nothing about UET. Install UET alongside (they coexist fine), and stop using the Clarity dashboard as evidence about ads.

Product audiences are empty or wrong. Check ecomm_prodid on a product page with the Tag Helper: it must carry the same product identifiers your other platforms use. IDs present on product pages but missing at cart/checkout — or the reverse — produce audiences that match nothing real.

Consent works for Google but Microsoft still complains. Expected, until Step 5 is done: UET reads only its own uetq consent pushes. Confirm in the Tag Helper / network requests that a consent default is pushed before the base tag's hit and an update follows consent — GTM's built-in consent states alone never reach UET.

Next steps once this is clean: WooCommerce + Google Ads and WooCommerce + Meta from the same data layer, then Consent Mode v2 so every platform's consent story — Microsoft's included — hangs off one banner decision.

Frequently asked questions

Is Microsoft Clarity the same as UET?

No. Clarity is Microsoft's free behaviour-analytics tool — heatmaps and session recordings, with its own tag — and it sends nothing to Microsoft Advertising. UET is the advertising tag: conversions, audiences and bidding signals. Stores routinely have one and believe they have both. You need UET for ads measurement; Clarity is optional and separate.

Why does my Purchase goal record the same value for every order?

Because one half of the revenue pair is missing: either the goal's Revenue is set to a fixed/default value instead of "may vary" in Microsoft Advertising, or the GTM tag's revenue_value is resolving empty (so Microsoft falls back to the default). Check the resolved value on the fired tag in GTM Preview, then the goal's revenue setting — both must be right.

Does Google Consent Mode cover UET automatically?

No. UET has its own consent mode, driven by uetq consent pushes ('default' and 'update' with ad_storage), and Microsoft requires those signals for EEA, UK and Swiss visitors. Your banner's decision has to be forwarded to UET deliberately — GTM's built-in consent checks do not do it for you.

Do I need a separate goal for every event?

Only for events you want counted as conversions. The base tag's page views and the ecomm_* parameters build audiences without any goal. Create goals for the actions that matter — Purchase for a store, Lead if enquiries matter — and make sure each goal's Event Action matches the string your tag sends, character for character.

Can UET do product-level reporting like Meta's catalog ads?

Partly, and differently. UET's product story runs on the ecomm_prodid / ecomm_pagetype parameters, which power product audiences and dynamic remarketing — there is no catalog feed inside UET itself comparable to Meta's or Pinterest's. Keep the ID convention identical across platforms so every system is describing the same products.

Tag Helper shows the tag, but the goal still says inactive. Is it broken?

Probably not yet. Goal status lags real traffic: "Tag inactive" means no qualifying conversion hit has been recorded so far. Verify with the Helper that a test purchase sent the purchase event with revenue, confirm the goal is attached to the same Tag ID with Action exactly purchase, then give real traffic time to land before rebuilding anything.

Share with