Connecting Craft CMS to Microsoft Ads
Craft is a developer-oriented CMS, usually built bespoke by an agency, which means the implementation is whatever that agency decided and nothing is standard. Microsoft Ads reaches an older, higher-income, more desktop-weighted audience than Google, and it is routinely the cheapest qualified traffic a B2B advertiser can buy. The join between them succeeds or fails on one thing: whether the MSCLKID reaches the Craft Commerce order before the conversion happens, because Microsoft Ads can only match a conversion it can tie back to a click it recognizes.
Free30 minutesNo obligation
Specific to this pair
Craft CMS to Microsoft Ads: msclkid on the order, not in a template
Read msclkid from the landing URL into a first-party cookie, then copy it to a custom field in the Craft Commerce order-complete listener or form submission event. Upload completed orders or qualified leads to an offline conversion goal with value and currency. Check auto-tagging and parameter-stripping redirects, and keep UET and offline goals from double counting.
Bespoke Craft builds lose Microsoft Ads data in a specific way: the UET tag was pasted into a layout template by whoever built the site, and the msclkid lives only in UET's cookie. Offline conversions need it on the record. Read msclkid from the landing URL, keep it in a first-party cookie, and in the Commerce order-complete listener, or the form's submission event on lead sites, copy it into a custom field. Then upload completed orders or qualified leads to an offline conversion goal with value and currency.
Check auto-tagging first, because many Craft sites run Microsoft campaigns copied from Google with UTM templates only. Then check the routing: custom redirects, trailing-slash rules or an SEO plugin can strip unknown query parameters before any code reads them. Test with a real ad click, not a hand-typed URL.
Don't let UET and the offline upload both count the same order under goals that bidding uses. If UET's purchase event already feeds a goal, create a separate offline goal and choose which one bidding relies on. For Craft lead sites, the strongest use of the offline route is uploading leads that became customers later, which UET can't see at all, and that's often where Microsoft's cheaper B2B search traffic proves itself.
Craft → Microsoft Ads · what breaks
Why this join usually fails — Craft → Microsoft Ads
- 01
The MSCLKID never reaches Craft
Craft's template caching and static caching plugins both serve stored output, and because every build is custom, where the capture code lives differs per site. There is no standard place to look.
- 02
Every install is bespoke
There is no standard Craft setup, so an approach that worked on another Craft site may have nothing to attach to on this one. Read the build before quoting.
- 03
Auto-tagging switched off
Microsoft auto-tagging is frequently disabled in accounts that were set up quickly or imported from Google, and without it no MSCLKID arrives at all — so the entire offline import has nothing to match against and fails silently.
- 04
Nothing reconciles afterwards
Microsoft Ads reports offline conversion uploads with rows accepted and rejected. A successful upload is not a matched conversion — check that conversions actually appear against campaigns afterwards.
Craft → Microsoft Ads · the fix
What working looks like — Craft → Microsoft Ads
The MSCLKID on every order
Conversions arriving in Microsoft Ads
Conversions appear against the campaign, ad group and keyword that produced the click, with the value you sent, and become usable for automated bidding.
Reconciled against the source
Craft CMS's own records are the reference, not either dashboard.
Craft → Microsoft Ads · architecture
How Craft and Microsoft Ads actually connect
- 1
Craft CMS holds the truth
Craft installs are bespoke by nature. Establish how this particular build models a completed order before assuming anything transfers from another Craft site.
- 2
Microsoft Ads needs a click to match
Microsoft matches uploaded conversions to clicks using the MSCLKID, and the conversion goal must be created as an offline conversion type. The click has to fall inside Microsoft's import window — verify the current limit in your account rather than assuming it matches Google's.
- 3
The identifier is the bridge
The MSCLKID, captured at the visit and carried into the Craft Commerce order.
- 4
The event source decides reliability
Fire from the event listener in PHP rather than a Twig template, which may be cached.
- 5
Deduplication at the destination
Microsoft deduplicates on the combination of click identifier, conversion name and conversion time. Uploading the same click against a second conversion goal counts twice, which is the usual cause of inflated numbers here.
Craft → Microsoft Ads · normal or broken
Working vs. broken, side by side — Craft → Microsoft Ads
Normal, not a fault
The MSCLKID present on the order
Visible on the record itself in Craft CMS, not merely captured somewhere on the site.
Sent from the Craft Commerce order-complete event
Deduplicated correctly
Microsoft deduplicates on the combination of click identifier, conversion name and conversion time. Uploading the same click against a second conversion goal counts twice, which is the usual cause of inflated numbers here.
Reconciles with the source
Microsoft Ads's count and Craft CMS's records agree within a few percent over a closed window.
Actually broken
The MSCLKID missing on most records
Craft's template caching and static caching plugins both serve stored output, and because every build is custom, where the capture code lives differs per site. There is no standard place to look.
Sent from the browser
There is no standard Craft setup, so an approach that worked on another Craft site may have nothing to attach to on this one. Read the build before quoting.
Counted twice, or not at all
Microsoft auto-tagging is frequently disabled in accounts that were set up quickly or imported from Google, and without it no MSCLKID arrives at all — so the entire offline import has nothing to match against and fails silently.
Nobody has reconciled it
The dashboard shows a number and no one has compared it to Craft CMS.
Craft → Microsoft Ads · diagnose
Diagnostic order — Craft → Microsoft Ads
- 01
Count orders carrying the MSCLKID
- 02
Follow one real conversion end to end
- 03
Read how this specific build handles order completion
Assumptions carried from another Craft project are the main source of wasted time here.
- 04
Confirm auto-tagging is enabled and check the upload diagnostics
One account setting decides whether any of this works. Then read the per-row errors on the upload rather than the success count.
- 05
Read the match rate, not the success message
Microsoft Ads reports offline conversion uploads with rows accepted and rejected. A successful upload is not a matched conversion — check that conversions actually appear against campaigns afterwards.
Craft → Microsoft Ads · prove
How it gets proven — Craft → Microsoft Ads
Against Craft CMS's own records, not against either platform's dashboard.
Source of truth
Craft Commerce's order records in your own database, filtered to completed.
- The MSCLKID confirmed present on a live order.
- Auto-tagging confirmed on, and the accepted count reconciled against conversions appearing in campaign reporting.
- Order custom field confirmed populated on an order placed as an anonymous visitor through cache.
Craft → Microsoft Ads · free audit
What we check in the free audit
- Count orders carrying the MSCLKID
- Follow one real conversion end to end
- Read how this specific build handles order completion
- Confirm auto-tagging is enabled and check the upload diagnostics
- Read the match rate, not the success message
Checked against
Craft Commerce's order records in your own database, filtered to completed.
Free30 minutesNo obligation
Craft → Microsoft Ads · when not to buy
When you don't need this — Craft → Microsoft Ads
- If Microsoft Ads already reports conversions that reconcile against Craft CMS's records within a few percent, this join is working and there is nothing to buy.
- Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the MSCLKID.
- If the original agency is still engaged, the fastest path is usually specifying the field and having them add the hook.
- If you are not running Microsoft Ads at meaningful spend, skip it — though for B2B the traffic is often cheaper and better qualified than people expect, which is worth testing before dismissing.
Craft → Microsoft Ads · what we deliver
What gets built — Craft → Microsoft Ads
Identifier capture into Craft
Capture the identifier and store it as a custom field on the order through a Craft event listener, server-side.
Event source: the Craft Commerce order-complete event
Fire from the event listener in PHP rather than a Twig template, which may be cached.
Dispatch to Microsoft Ads
Offline conversion import through the Microsoft Advertising API or a scheduled upload.
Reversals where they exist
Refunds and cancelled orders are recorded against the order.
Written guarantee
95%+ tracking accuracy
Measured against Craft Commerce's order records in your own database, filtered to completed.. Miss it and we keep working at no cost.
From $400 · See packages
FAQ
Craft → Microsoft Ads questions, answered
Either auto-tagging is off in Microsoft Ads, or a redirect, routing rule or SEO plugin is stripping the parameter. Click a live ad and check both the URL and the stored field.
Yes, if the msclkid is saved on the order. Upload completed orders to an offline goal with value, kept separate from any UET purchase goal.
Almost always because the MSCLKID never reached the Craft Commerce order. Craft's template caching and static caching plugins both serve stored output, and because every build is custom, where the capture code lives differs per site. There is no standard place to look. Measure coverage before debugging the dispatch.
The MSCLKID, appended to your landing page URL when auto-tagging is enabled in the Microsoft Ads account. Auto-tagging is not on by default in every account, which is the single most common reason a Microsoft offline import finds nothing to match. Microsoft also supports enhanced conversions using hashed customer data as an alternative path.
The Craft Commerce order-complete event. Fire from the event listener in PHP rather than a Twig template, which may be cached.
Microsoft Ads reports offline conversion uploads with rows accepted and rejected. A successful upload is not a matched conversion — check that conversions actually appear against campaigns afterwards.
More on Craft → Microsoft Ads
- Craft → Google AdsConnecting Craft CMS to Google Ads
- Craft → Apple Search AdsConnecting Craft CMS to Apple Search Ads
- Craft → Amazon AdsConnecting Craft CMS to Amazon Ads
RELATED GUIDES
Where Craft → Microsoft Ads fits in the rest of your tracking
- Microsoft · Local servicesMicrosoft Ads conversion tracking for local service businesses
- Microsoft · B2BMicrosoft Ads conversion tracking for B2B companies
- Microsoft × CRM DealsHow to reconcile Microsoft Ads against your CRM's closed-won deals
- Microsoft · Comparison page → demoHow to track comparison page visit to demo request for Microsoft Ads
- Umbraco → Microsoft AdsConnecting Umbraco to Microsoft Ads
- Craft → TikTokConnecting Craft CMS to TikTok Events API
- Local servicesConversion tracking for local businesses, where most conversions bypass the website
- Ghost → Microsoft AdsConnecting Ghost memberships to Microsoft Ads
Free · 30 min
Get Craft and Microsoft Ads joined properly
Free30 minutesNo obligation
