Socium Media
Jun 19, 2020 | Paid Search

Implementing Microsoft Bing’s UET pixel with Revenue to Shopify

Microsoft Advertising, reach more customers and get results.

As Microsoft continues to expand its network and services, quick wins lie within the Microsoft Bing Advertising platform.  With Shopify, an easy way to monitor the value of your customers and gauge your return on investment through Microsoft Bing Advertising, Bing Advertising for short, is to implement the UET pixel with revenue tracking!

How to Find the Bing UET Pixel

The first thing you want to do is find your Bing UET pixel.

  1. Once logged in to the Bing Advertising UI, you can find your pixel at the bottom left-hand side below Shared Library > Conversion Tracking > View UET tags page.
  • If you have not created a UET tag then click Create and fill in the UET tag name and UET Tag Description

2. Click View Tag below Actions and a pop up should come up with your UET Tag.

  • For this example let’s use this one for mock purposes:
<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>

How to Add the UET Pixel to a Shopify Website

Here are the following steps on adding the UET pixel to the site:

Shopify dashboard.

  1. In Shopify, go to Online Store > Themes.
  2. With your currently live theme, click Actions > Edit code.
  3. Click theme.liquid and scroll down to the end of your website’s code.
  4. Paste your UET tracking code above the “</body>” HTML tag with any additional information you want and click Save.

How to Add Shopify Revenue Tracking to Bing UET Pixel

Now the site has the UET pixel which allows us to monitor remarketing lists and conversion goals.  But to receive revenue value from your purchases, let’s do the following.

Shopify dashboard checkout settings.

  1. Click Settings > Checkout and scroll to Order Processing > Additional scripts
  2. Add your UET pixel tag with the following:
<script>
window.uetq = window.uetq || [];
window.uetq.push('event', '', { 'revenue_value': {{ subtotal_price | money_without_currency }}, 'currency': '{{ shop.currency }}' });
</script>

3. The script you just added into the Additional scripts section should look like the following minus any additional information you add.  Click Save!

{% 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('event', '', { 'revenue_value': {{ subtotal_price | money_without_currency }}, 'currency': '{{ shop.currency }}' });
</script>
{% endif %}

How to Update Conversion Settings on Bing Ads

Now that we have implemented the scripts onto our Shopify website, we must update our conversion settings on the Microsoft Advertising interface.

  1. Back into the Microsoft Advertising interface, click Conversion Tracking > View conversion goals page
  2. Click Create conversion goal
  3. Name the goal and for type, select Destination URL
  4. Your destination URL should be a regular expression for the following: .*thank_you
  5. For Revenue value, click Conversion action value may vary and the value you input should not matter if the revenue pixel is set up correctly.
  6. From here fill in your Count, Conversion Windows, whether or not to Include in “Conversions” and the pixel name you used for the implementation. Click Save.

From here, conversions and conversion values should start rolling in, allowing you to make optimizations accordingly!  Do not forget to create your remarketing lists!

David Kim

Free Consultation - New

1Step 1
2Step 2
3Step 3
  • (you can pick more than one)