Track purchase conversions in Microsoft Ads with an event-based goal tied to Shopify checkout completion.
Why event-based goals
URL-only goals miss inline actions. Event-based goals capture purchases when the checkout completed event fires.
Create the conversion goal
- In Microsoft Ads, go to Tools → Conversion Goals.
- Click Create conversion goal.
- Select Website, then Purchase, then Event.
If events are unavailable in your account, try a destination URL goal containing processing?completed=true as a fallback.
Tagging
- Action: Purchase
- Category: Checkout
Add the pixel in Shopify
- Shopify admin → Settings → Customer events → Add custom pixel.
- Paste the UET snippet and replace the tracking ID placeholder.
- Subscribe to
checkout_completedand push the purchase event with order value and currency.
(function(w,d,t,r,u){
var f,n,i;
w[u]=w[u]||[];
f=function(){
var o={ti:"YOUR_UET_ID", enableAutoSpaTracking: true};
o.q=w[u];w[u]=new UET(o);w[u].push("pageLoad")
},
n=d.createElement(t);n.src=r;n.async=1;
n.onload=n.onreadystatechange=function(){
var s=this.readyState;
s&&s!=="loaded"&&s!=="complete"||(f(),n.onload=n.onreadystatechange=null)
},
i=d.getElementsByTagName(t)[0];
i.parentNode.insertBefore(n,i)
})(window,document,"script","//bat.bing.com/bat.js","uetq");
analytics.subscribe('checkout_completed', (event) => {
window.uetq = window.uetq || [];
window.uetq.push('event', 'purchase', {
event_category: "checkout",
revenue_value: event.data.checkout.totalPrice.amount,
currency: event.data.checkout.currencyCode
});
});
Test the setup
- Complete a test order on your store.
- Confirm the conversion appears in Microsoft Ads.
- Inspect network requests to verify the pixel fires on checkout completion.