Skip to content
🚀 Find us on Product Hunt

Microsoft Advertising (UET) Tracking Setup for WordPress

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 21 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

conversion events

engagement events

By Humayun Kabir Naim — Last updated: 9 November 2026

Quick answer

To track WordPress leads in Microsoft Advertising through Google Tag Manager, install one UET base tag on every page — a Custom HTML tag carrying the UET snippet and your Tag ID — set Microsoft's consent default before it (a uetq consent push with ad_storage denied, updated to granted on consent; Microsoft has required this signal for EEA, UK and Swiss traffic since May 2025) — then fire one small event tag per lead action, pushing event_category, event_action and event_label onto uetq when a form submission is proven, not clicked. The GTM half is only half: in Microsoft Ads you must create a matching event goal whose category, action and label equal what your tag sends, or the events arrive and count as nothing. URL goals cover thank-you pages with no tag work at all. Install UET exactly once — Microsoft's official plugin, an all-in-one plugin, and GTM each add the same base tag, and any two together double every conversion. And if you are debugging in a dashboard of session recordings, you are in Microsoft Clarity, not UET — a different product that shares nothing with your ads data.

The official Microsoft UET WordPress plugin settings with the Tag ID

What gets tracked

WordPress lead actions reach Microsoft Ads as UET events: named pushes with category, label and (optionally) value, which goals then claim. The set below mirrors the generated container's 21 events — the rows that matter for a lead site:

WordPress actionSignal the tag sendsMicrosoft Ads goal
Any page viewBase UET tag on All PagesRemarketing base; page-load (URL) goals
Contact or quote form submittedEvent push on proven success (form_submission)Event goal — category lead, label per form
Contact Form 7 submissionBridge tag on wpcf7mailsent → cf7_form_submissionEvent goal
WPForms submissionBridge tag on the plugin's success eventEvent goal
Gravity Forms submissionBridge tag on the plugin's success eventEvent goal
Calendly booking completedpostMessage bridge → calendly_bookingEvent goal (demo booked)
User registration completeddataLayer push on registration successEvent goal
Newsletter signupEvent push on form successEvent goal or audience only
Lead-magnet file downloadClick trigger or dataLayer pushEvent goal or audience only
Phone, WhatsApp or email clickGTM Click triggersEvent goal (usually micro-conversion)

Microsoft has no fixed event vocabulary like Meta's standard events: the category/action/label strings are yours to choose, which is freedom and a trap in one — the goal in Microsoft Ads must match them exactly, character for character, or the conversion silently never counts. Decide the naming once (this hub uses category lead, action generate_lead, and the form's name as the label) and use it in both places. The four form plugins are detected automatically by bridge tags in the generated container; the generic form row listens for the same success signals as your GA4 and Meta setups, so one form build feeds all three platforms.

Deep dives: Form Submission, Contact Form 7 Submission, Calendly Booking. Same signals, other platforms: WordPress + GA4 and WordPress + LinkedIn. See all options on the WordPress hub.

Before you start

  1. A UET tag and its Tag ID. In Microsoft Ads: Conversions → UET tag → Create (or open the existing tag). The numeric Tag ID (for example 12345678) is what every install route asks for — and there should be exactly one tag per website.
  2. GTM installed on the site — once. One web container. If Microsoft's official UET plugin or an all-in-one plugin (PixelYourSite's Bing add-on and similar) is already adding UET, decide now which install survives; this hub keeps GTM and removes the others.
  3. Know whether you have EEA/UK/Swiss traffic. If yes — and most sites can't rule it out — consent mode below is not optional: Microsoft enforces it, defaults those visitors to denied, and suspends conversion tracking and remarketing for them until a valid signal arrives.
  4. Forms with a provable success moment. Thank-you redirect, visible success message, or the form plugin's success event. The same requirement as the GA4/Meta hubs — if those already work, your signals exist.
  5. Clarity, decided separately. If the site runs Microsoft Clarity, leave it alone and keep it out of this setup entirely — Step 4 explains why the two never meet.
Creating a UET tag in Microsoft Ads and finding the Tag ID

Route 1: Use the free TagManagerBuilder container

Open the GTM Container Builder, choose WordPress, then Microsoft Advertising (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 carries the base tag, the event tags and the form bridge tags; add the consent default from Step 1 before publishing if you have European traffic, and create the matching goals in Microsoft Ads (Step 3) — the container cannot do that half. Test with the testing section below before publishing.

Route 2: Build it manually in GTM

Step 1 — Consent default first, then the base tag

Order matters: the consent state must exist before the UET tag runs. Create a Custom HTML tag containing Microsoft's consent default and fire it on GTM's Consent Initialization trigger:

<script>
  window.uetq = window.uetq || [];
  window.uetq.push('consent', '', { 'ad_storage': 'denied' });
</script>

Then the base tag: Tags → New → Custom HTML, paste the UET snippet from Microsoft Ads with your Tag ID, trigger All Pages. When the visitor accepts marketing cookies, your consent setup pushes the update — the same uetq.push('consent', '', { 'ad_storage': 'granted' }) — and UET starts reading and writing cookies for that visitor. If your CMP supports IAB TCF, Microsoft also accepts the TCF signal; one mechanism, applied consistently, is what counts. (Microsoft also publishes a GTM template for its consent mode if you prefer a template to the raw push — the sequence is identical either way.)

Why this step exists: Microsoft's Consent Mode is a single property — ad_storage, granted or denied — far simpler than Google's four-signal version, and a separate system: a working Google Consent Mode setup sends Microsoft nothing. For EEA, UK and Swiss visitors the default is denied and has been enforced since 5 May 2025; skip this step and those visitors produce no conversions and join no remarketing audiences, with no modelling to paper over the gap.

Microsoft consent default tag firing on Consent Initialization in GTM UET base tag in GTM with the Tag ID on the All Pages trigger

Step 2 — One event tag per lead action

Each conversion action gets a small Custom HTML tag that pushes the event onto uetq (GTM also has community UET templates that wrap the same push — the shape below is what they all produce):

<script>
  window.uetq = window.uetq || [];
  window.uetq.push('event', 'generate_lead', {
    'event_category': 'lead',
    'event_label': 'contact-form-1',
    'event_value': 1
  });
</script>

Attach each tag to the trigger that proves the action: a Custom Event trigger on the success push (form_submission, cf7_form_submission, calendly_booking — the bridge tags and GA4 form signals already in your container), an Element Visibility trigger on a success message, or skip the tag entirely for thank-you-page forms and use a URL goal in Step 3. Give every form its own event_label, so the contact form and the quote form stay separate conversions instead of one blended number. Never fire these on the submit click or GTM's generic Form Submission trigger — both precede validation, and a failed submission is not a lead Microsoft should bid on.

UET event tag in GTM sending the lead event with category, action and label

Step 3 — Create the matching goal in Microsoft Ads

In Microsoft Ads go to Conversions → Conversion goals → Create. Two goal types matter here:

Set the goal's conversion window and counting (count every conversion for lead forms; "unique" hides genuine repeat enquiries from the same person). A mismatch in any of the three strings is the single most common UET failure: the event shows in Tag Helper, the goal shows zero, and both sides are "working" — they are simply not talking about the same event.

Creating a Microsoft Ads event goal that matches the UET event strings

Step 4 — Keep Clarity out of it

Microsoft Clarity is a free behaviour-analytics product — heatmaps, session recordings, rage-click reports. Microsoft UET is the advertising tag. They are installed separately, configured in different dashboards, and Clarity data never feeds Microsoft Ads: no Clarity event becomes a conversion, no Clarity audience becomes a remarketing list, and a site can have either, both or neither. The confusion is understandable — both are "Microsoft tracking", and Clarity even offers a UET integration toggle in its settings (which governs Clarity's own consent and linking, on its own terms) — but when a conversion is missing, Clarity's dashboard can tell you nothing. Debug ads in UET Tag Helper and Microsoft Ads; debug behaviour in Clarity.

Microsoft Clarity dashboard — a separate product from UET advertising tracking

Test it: GTM Preview and UET Tag Helper

GTM Preview showing the UET lead tag fired on a proven form submission
  1. Click Preview in GTM and open your site in Tag Assistant. On page load, confirm the consent tag fired (in the Consent Initialization group) before the UET base tag.
  2. Submit each form once with test details — including one deliberately invalid submission, which must produce no UET event tag.
  3. Install Microsoft's UET Tag Helper extension and repeat the flow on the live page. It lists the page-load event and each custom event as UET received them, with the category, action and label spelled out — compare them against your goal's rules, character for character.
  4. Check the consent state in the same helper: it reports the asc parameter on UET requests. Before consent it should read denied; accept your banner and reload — it should flip to granted. If it never flips, your CMP is not pushing the update, and EEA conversions will stay suspended no matter how good the tags look.
  5. In Microsoft Ads, open your goal after the test: event goals can take a little while to register the first matching conversion, so judge it on Tag Helper evidence plus a later goal check, not on the goal screen alone minutes after install.
  6. Only then click Submit in GTM to publish.
UET Tag Helper showing the lead event received and consent granted

WordPress-specific troubleshooting

Tag Helper shows my event, but the goal stays at zero. The goal's rules don't match the event. Compare category, action and label against the exact strings Tag Helper received — a trailing space, a renamed label, Lead vs lead: any difference means no match, and Microsoft reports no error anywhere. This is the first thing to check.

Conversions doubled after I "also" added the official plugin. That's the cause, not a coincidence: the official Microsoft UET plugin adds the same base tag GTM is already firing, so every page load and event is sent twice and event goals count both. One install survives — if GTM carries your events, remove or deactivate the plugin (note its Tag ID first; it should be the same ID).

No conversions or audiences from Europe, fine elsewhere. Consent. EEA/UK/Swiss visitors default to ad_storage: denied and Microsoft enforces it: without your consent default + update flow, UET runs restricted for exactly those visitors. Verify with Tag Helper's asc value before and after accepting your banner, and check the consent tag fires on Consent Initialization, not after the base tag.

My heatmaps show the clicks but Ads shows nothing. You are looking at Clarity. Clarity records behaviour for its own dashboard and sends nothing to Microsoft Ads; the conversion path is UET tag → goal, and only UET Tag Helper + the goals screen can verify it.

Events fire in Preview but Tag Helper shows nothing on the live site. Preview runs your draft workspace; the live site runs the last published version. Publish, then retest. Second suspect: the Tag ID in the base tag belongs to a different UET tag (or ad account) than the goal — events are arriving somewhere, just not where you're looking.

The base tag loads but no page-load events appear anywhere. Check for a second GTM container or a caching/optimisation plugin delaying the Custom HTML tag until user interaction — a consent push before the queue exists is fine (the array pattern handles it), but a base tag that never executes sends nothing. Test with the optimisation plugin's JS delay off.

Next steps once this is clean: WordPress + Google Ads and WordPress + GA4 share the same form signals, and the sitewide Consent Mode v2 guide covers the Google side of the consent setup this hub pairs with.

Frequently asked questions

Is Microsoft UET the same thing as Microsoft Clarity?

No. UET (Universal Event Tracking) is Microsoft Advertising's tag: it records page loads and events so Microsoft Ads can count conversions, build remarketing audiences and feed automated bidding. Clarity is a separate, free behaviour-analytics product — heatmaps and session recordings — with its own tag and dashboard. Clarity data never reaches Microsoft Ads, so a working Clarity install tells you nothing about whether your conversions are tracking.

URL goal or event goal — which should I use for WordPress forms?

A URL goal when the form ends on a thank-you or confirmation page: the base tag alone is enough, and there is no event tag to maintain. An event goal when the form submits in place — most modern WordPress forms — because no new page loads: GTM pushes a UET event on the success signal, and the goal claims it by matching category, action and label. Many sites run one of each: URL goal for the booking flow, event goals for the AJAX forms.

What exactly does Microsoft require for consent, and what happens if I skip it?

For visitors from the EEA, the UK and Switzerland, Microsoft requires a valid consent signal with UET — its own Consent Mode (one property, ad_storage, granted or denied) or an IAB TCF signal — and has enforced this since 5 May 2025. Those regions default to denied: without your signal, UET cannot use cookies for those visitors, and Microsoft suspends conversion tracking and remarketing for them. There is no modelled-conversion fallback, so skipped consent is simply lost European data.

Should I install UET with Microsoft's WordPress plugin instead of GTM?

The official plugin is a legitimate install route — but it installs only the base tag. It sends no lead events, so your form conversions would still need GTM (or another events plugin) on top, and then the base tag exists twice. Pick one home for the base tag: if your other platforms already live in GTM, put UET there too and skip the plugin; if you run no GTM at all, the plugin plus URL goals is a valid minimal setup.

My UET event fires, but the goal never counts it. Where do I look first?

At the goal's matching rules. An event goal counts only events whose category, action and label equal what the goal specifies — and Microsoft gives no error when they differ. Read the exact strings in UET Tag Helper, then read the goal; the mismatch is almost always there (a renamed label is the classic). Also confirm the goal and the UET tag live in the same Microsoft Ads account.

Does UET deduplicate like Meta's Conversions API does?

There is no equivalent contract to engineer here: this setup is browser-based, and the doubling risk is not browser-vs-server merging but two base tags on one page — a plugin install plus GTM, or the snippet pasted in a header/footer plugin as well. Keep exactly one install and every event counts once; Meta's event_id discipline belongs to platforms where you deliberately run a browser and a server sender for the same event.

Share with