Skip to main content
Magento → Microsoft AdsIntegration guide

Connecting Magento to Microsoft Ads

Magento is self-hosted and endlessly customisable, which means every installation is different and full-page caching is always in the way. 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 Magento 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

Magento to Microsoft Ads: import only paid order states

Import Magento orders to Microsoft Ads from the order placement observer with the msclkid stored as order data, captured in the browser if Varnish or CDN rules strip it. Import only orders reaching your revenue status, not unpaid check or bank-transfer orders, and send credit memos as adjustments. Bid on UET or the import, with one value definition.

Microsoft Ads matters to Magento stores mostly through Shopping campaigns fed from a Microsoft Merchant Center product feed, plus brand and category search. The offline import should come from the order placement observer with the msclkid stored as order data, so it never depends on what the full-page cache served. Check that your Varnish or CDN rules do not strip msclkid from the request before anything can read it; if they do, capture it in the browser instead.

Magento order states decide what Microsoft learns. Orders placed with check, money order or bank transfer sit in pending until paid, and some never are. Import only orders that reach the status you count as revenue, with the conversion time of the order, and send credit memos as adjustments. Uploading pending orders teaches the bidding to chase checkouts that never pay.

Decide whether the UET purchase event or the offline import is the conversion goal you bid on, and keep the other as secondary. Use the same value definition in both, grand total or subtotal excluding tax and shipping, because Microsoft will show the two side by side and a mismatch looks like a tracking fault.

Magento → Microsoft Ads · what breaks

Why this join usually fails — Magento → Microsoft Ads

  1. 01

    The MSCLKID never reaches Magento

    Magento's full-page cache serves a stored render to the visitor, which means anything relying on dynamically rendered values can silently fail — and in Magento this has historically included serving one customer's cached block to another, which is a data problem as well as a tracking one.

  2. 02

    Full-page cache between the visitor and your code

    The page the customer saw is not the page your code assumed. This is the defining Magento tracking failure and it produces intermittent, hard-to-reproduce loss.

  3. 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.

  4. 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.

Magento → Microsoft Ads · the fix

What working looks like — Magento → 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

Magento → Microsoft Ads · architecture

How Magento and Microsoft Ads actually connect

  1. 1

    Magento holds the truth

    You own the database, so the truth is as good as the query. Pin down which order statuses count as revenue — processing, complete, or both — because that choice moves the number substantially.

  2. 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. 3

    The identifier is the bridge

    The MSCLKID, captured at the visit and carried into the Magento order.

  4. 4

    The event source decides reliability

    Fire server-side from the observer rather than from the success page template, which is cached and may not execute anything.

  5. 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.

Magento → Microsoft Ads · normal or broken

Working vs. broken, side by side — Magento → Microsoft Ads

Normal, not a fault

  • The MSCLKID present on the order

  • Sent from the Magento order placement observer

  • 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

Actually broken

  • The MSCLKID missing on most records

    Magento's full-page cache serves a stored render to the visitor, which means anything relying on dynamically rendered values can silently fail — and in Magento this has historically included serving one customer's cached block to another, which is a data problem as well as a tracking one.

  • Sent from the browser

    The page the customer saw is not the page your code assumed. This is the defining Magento tracking failure and it produces intermittent, hard-to-reproduce loss.

  • 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

Magento → Microsoft Ads · diagnose

Diagnostic order — Magento → Microsoft Ads

  1. 01

    Count orders carrying the MSCLKID

  2. 02

    Follow one real conversion end to end

  3. 03

    Place a test order as an anonymous visitor through cache

    Not as an admin, which bypasses it. If the order data is missing on the cached path, caching is your cause.

  4. 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.

  5. 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.

Magento → Microsoft Ads · prove

How it gets proven — Magento → Microsoft Ads

Source of truth

Magento's sales order records in your own database, for the same window and order status set.

  • The MSCLKID confirmed present on a live order.
  • Auto-tagging confirmed on, and the accepted count reconciled against conversions appearing in campaign reporting.
  • Order data confirmed populated on an order placed through a fully warmed cache.

Magento → Microsoft Ads · free audit

What we check in the free audit

  • Count orders carrying the MSCLKID
  • Follow one real conversion end to end
  • Place a test order as an anonymous visitor through cache
  • Confirm auto-tagging is enabled and check the upload diagnostics
  • Read the match rate, not the success message

Checked against

Magento's sales order records in your own database, for the same window and order status set.

Get my free conversion tracking audit

Free30 minutesNo obligation

Magento → Microsoft Ads · when not to buy

When you don't need this — Magento → Microsoft Ads

  • Measure identifier coverage yourself first — pull your last hundred orders and count how many carry the MSCLKID.
  • If your Magento build has heavy customisation by another team, scope their availability first — the build is usually blocked there.
  • 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.

Magento → Microsoft Ads · what we deliver

What gets built — Magento → Microsoft Ads

  • Identifier capture into Magento

    Capture the identifier and persist it as order data through an observer on order placement, server-side, so it never depends on what the cache served.

  • Event source: the Magento order placement observer

    Fire server-side from the observer rather than from the success page template, which is cached and may not execute anything.

  • Dispatch to Microsoft Ads

    Offline conversion import through the Microsoft Advertising API or a scheduled upload.

  • Reversals where they exist

    Credit memos are recorded against the original order and should reduce the reported figure.

Written guarantee

95%+ tracking accuracy

Measured against Magento's sales order records in your own database, for the same window and order status set.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Magento → Microsoft Ads questions, answered

Only orders that reach the status you count as revenue, usually processing or complete. Leave out pending payment orders, and adjust for credit memos.

Free · 30 min

Get Magento and Microsoft Ads joined properly

Free30 minutesNo obligation