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
- Microsoft Advertising (UET) Form Submission event setup
- Microsoft Advertising (UET) HubSpot Form Submission event setup
- Microsoft Advertising (UET) Contact Form 7 Submission event setup
- Microsoft Advertising (UET) WPForms Submission event setup
- Microsoft Advertising (UET) Gravity Forms Submission event setup
- Microsoft Advertising (UET) Comment Submission event setup
- Microsoft Advertising (UET) Newsletter Signup event setup
- Microsoft Advertising (UET) User Login event setup
- Microsoft Advertising (UET) User Registration event setup
- Microsoft Advertising (UET) Calendly Booking Scheduled event setup
- Microsoft Advertising (UET) Live Chat Started event setup
engagement events
- Microsoft Advertising (UET) Page View event setup
- Microsoft Advertising (UET) Scroll Depth event setup
- Microsoft Advertising (UET) Outbound Link Click event setup
- Microsoft Advertising (UET) File Download event setup
- Microsoft Advertising (UET) Phone Number Click event setup
- Microsoft Advertising (UET) Email Link Click event setup
- Microsoft Advertising (UET) WhatsApp Click event setup
- Microsoft Advertising (UET) Site Search event setup
- Microsoft Advertising (UET) Video Play event setup
- Microsoft Advertising (UET) Video Complete event setup
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.
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 action | Signal the tag sends | Microsoft Ads goal |
|---|---|---|
| Any page view | Base UET tag on All Pages | Remarketing base; page-load (URL) goals |
| Contact or quote form submitted | Event push on proven success (form_submission) | Event goal — category lead, label per form |
| Contact Form 7 submission | Bridge tag on wpcf7mailsent → cf7_form_submission | Event goal |
| WPForms submission | Bridge tag on the plugin's success event | Event goal |
| Gravity Forms submission | Bridge tag on the plugin's success event | Event goal |
| Calendly booking completed | postMessage bridge → calendly_booking | Event goal (demo booked) |
| User registration completed | dataLayer push on registration success | Event goal |
| Newsletter signup | Event push on form success | Event goal or audience only |
| Lead-magnet file download | Click trigger or dataLayer push | Event goal or audience only |
| Phone, WhatsApp or email click | GTM Click triggers | Event 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
- 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. - 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.
- 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. - 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.
- 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.
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.
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.
Step 3 — Create the matching goal in Microsoft Ads
In Microsoft Ads go to Conversions → Conversion goals → Create. Two goal types matter here:
- URL (page load) goals: count a visit to a URL (equals/contains rules). The right choice for thank-you pages — zero GTM work beyond the base tag.
- Event goals: count UET events whose category, action and label match the goal's rules. For the tag in Step 2, the goal must say category equals
lead, action equalsgenerate_lead, label equalscontact-form-1(or leave label blank to claim every form under the category — decide deliberately, not by accident).
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.
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.
Test it: GTM Preview and UET Tag Helper
- 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.
- Submit each form once with test details — including one deliberately invalid submission, which must produce no UET event tag.
- 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.
- Check the consent state in the same helper: it reports the
ascparameter 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. - 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.
- Only then click Submit in GTM to publish.
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.