Using the JavaScript UET tag tracking code

Using the JavaScript UET tag tracking code

After you create a UET tag, the next step is to add the UET tag tracking code to your website. Depending on the type of website you have, you can select a JavaScript or Non-JavaScript UET tag tracking code.

Before you can track conversions or target audiences using a remarketing list, you need to create a UET tag in Bing Ads and then add the UET tag tracking code to every page of your website. We strongly recommend that you use JavaScript to ensure accurate conversion tracking.

What are the advantages of using JavaScript?

  • The tag updates automatically when we receive any changes to the UET tag tracking code.
  • JavaScript allows Bings Ads to collect richer activity data to ensure accurate conversion tracking as well as improve remarketing in paid search.
JavaScriptexpando image

This is the recommended tracking code. It allows Bing Ads to collect richer activity data that improves conversion tracking and remarketing in paid search. The only time you shouldn't use this is if your website has rules that prohibit JavaScript from being installed on it.

Here is an example of the JavaScript UET tag tracking code:

(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[] ,f=function(){var o={ti:"TAG_ID_HERE"}; 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"," //","uetq");

Non-JavaScriptexpando image


Please note, a JavaScript UET tag is required to ensure you have access to the full functionalities of conversion tracking and remarketing. If you are using a non-JavaScript tag, please switch over to a JavaScript tag.


Don't know what UET is? See What is UET and how can it help me?

See more videos...