Set up UET tags using Shopify

If you built your website on Shopify, read this article to learn how to set up UET tags on it.
  • This article shows how to do a basic setup of UET tags using Shopify. Please refer to the Shopify Help Center for more information.
  • Microsoft Advertising is not responsible for Shopify's processes or documentation, nor for changes made to Shopify's processes or documentation.
  • By installing the Microsoft Advertising app for Shopify, UET tags are automatically created and added to every page of your website. Go to the Install an app page and follow the prompts to get your Microsoft Advertising app for Shopify set up.

If you created and manage your website with Shopify, you can add and manage your UET tag there.

Implementing UET using Shopify

  1. In Microsoft Advertising, go to Conversion Tracking > UET tags and copy your JavaScript UET tag tracking code.
  2. Log in to your Shopify account.
  3. In Shopify, go to Settings > Themes.
  4. Find the theme you’re currently using and then click Actions > Edit code to access your website's code.
  5. Select theme.liquid and scroll down to the end of your website's code.
  6. Paste your UET tracking code above the "</body>" HTML tag and click Save.
  7. Go to Settings > Checkout to add your UET tag to your site's checkout page.
  8. Paste the UET tracking code in the Order Processing > Additional scripts text box and click Save.
  9. If you want to report variable revenue, add one of the following code snippets below the UET tracking code you pasted in the previous step:
    1. Use this code if you want to exclude taxes and shipping:
         window.uetq = window.uetq || []; 
         window.uetq.push('event', '', { 'revenue_value': {{ subtotal_price | money_without_currency }}, 'currency': '{{ shop.currency }}' }); 
    2. Use this code if you want to include taxes and shipping:
         window.uetq = window.uetq || []; 
         window.uetq.push('event', '', { 'revenue_value': {{ total_price | money_without_currency }}, 'currency': '{{ shop.currency }}' }); 

To validate that your Shopify UET tag is working, download and install UET Tag Helper. Go to your Shopify website and verify that a UET event is received and that the Tag ID matches the tag you selected in Step 1.

See more videos...