FeedArmy Co., Ltd.

Add Microsoft Ads Conversion Tracking To Shopify

A step by step guide on how to add Microsoft Ads conversion tracking code to your Shopify shop.

Getting Your Code

Log in to Microsoft Ads and navigate to Tools > UET Tag

Microsoft UET Tag

Now click on Create UET Tag

Add the UET tag name and save

Now download the UET Tag for use in a later step and close the popup message

From the top hand, menu click on Tools > Conversion Goals then on Create Conversion Goal

Choose website as your conversion goal.

Choose Purchase as your Goal Category.

Select Destination URL as your Goal Type

Enter a name, which can be anything you like.

Adding The Code

Log in to Shopify and go to Settings > Checkout

Scroll down till you see Order Processing and in this section Additional Scripts

Now paste on the first line the code below in the Additional scripts sections

{% if first_time_accessed %}

Now open the downloaded UET Tag, you will see two lines of basic text and the last line with the script. Copy the script and paste it underneath the code above. Now add the conversion value script below.

If you are using prices like 1,000.00

<script>
   window.uetq = window.uetq || []; 
   window.uetq.push({ 'gv': {{ checkout.total_price | money_without_currency | remove:',' }}, 'gc': '{{ shop.currency }}' }); 
</script>

If you are using prices like 1.000,00 (Europe)

<script>
   window.uetq = window.uetq || []; 
   window.uetq.push({ 'gv': {{ checkout.total_price | money_without_currency | remove:'.' | replace: ',', '.' }}, 'gc': '{{ shop.currency }}' }); 
</script>

Paste the final code below

{% endif %}

You should see a complete code looking similar to the below.

<!-- Microsoft Ads Conversion Tag By FeedArmy 2022 Version 1.01 START -->
{% if first_time_accessed %}
<script>(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:"12345678"};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");</script>
<script>
   window.uetq = window.uetq || []; 
   window.uetq.push({ 'gv': {{ checkout.total_price | money_without_currency | remove:',' }}, 'gc': '{{ shop.currency }}' }); 
</script>
{% endif %}
<!-- Microsoft Ads Conversion Tag By FeedArmy 2022 Version 1.01 END -->

You can now click on save.

Need Help?
Do you have a question or need specialist support? Get in touch!

Exit mobile version