Add Bing Conversion Tracking To Shopify

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

Create UET Tag

Add the UET tag name and save

Microsoft Ads UET Tag name

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

Microsoft Ads Download Code

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

Microsoft Create Conversion Goal

Choose website as your conversion goal.

Microsoft Conversion Goal - Website

Choose Purchase as your Goal Category.

Microsoft Conversion Goal - Website Purchase

Select Destination URL as your Goal Type

Microsoft Conversion Goal - Website Purchase Goal Type

Enter a name, which can be anything you like.

Microsoft Ads Conversion Type
  • In the Destination URL, choose regular expression with the value .*thank_you
  • In the Revenue value choose: Conversion action value may vary (for example, by purchase price)
  • Scope, select your account
  • In the Count section choose: All (for example, if one ad click leads to three purchases, that will count as three conversions.)
  • Conversion window, can stay as 30 days
  • View through conversion window, can stay as 1 day
  • Make sure the checkbox is enabled for include in Conversions
  • Assign it to the UET Tag that you created. In this example it is Shopify (added by feedarmy)
  • Click on Save
Microsoft Ads Conversion Setup

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

Shopify 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!

Subscribe
Notify of
guest
5 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
Dean
3 months ago

Is this still usable? I found this article as well: https://community.shopify.com/c/shopify-discussions/bing-microsoft-ads-uet-not-working-with-new-shopify-web-pixels/m-p/2500497#M430330

Not sure what to do.

I appreciate your help

Phong Khang
Phong Khang
3 years ago

For the life of me I can’t get the Bing Ads conversion tag to fire. I also have my Google Ad conversion pixel on the same thank you page. Could this prevent it from firing?

EmilLamprecht
EmilLamprecht
3 years ago

This is epic. I see the screen shots are old, but hoping the rest of the info is still up to date? If this may be too old to work this way now please post the change, but thank you for making this easy, the Bing docs on this are very hard to understand somehow.

I’m trying to also install this code in Recharge, but I’m getting an error regarding the second piece of code:

the error is:comment image

Let me know what you think. I’ve contacted recharge customer service as well but they can be very slow and sometimes opt to not answer the question as “out of scope” for them.

Emmanuel Flossie
Reply to  EmilLamprecht
3 years ago

Hello Emil, I’m glad you like the tutorial. Unfortunately I have never used ReCharge so I would not know what your issue is. This code is specifically for Shopify checkout.

5
0
Would love your thoughts, please comment.x
()
x