Advanced: Reporting custom events

This webpage is meant to be used in conjunction with the How to track custom events with UET Microsoft Advertising Help article.

We have installed a JavaScript Microsoft Advertising UET tag tracking code in the body of this webpage. This code has been customized to report several custom events -- in this case, button clicks. To see how we did it, right-click in the webpage and then click View source or View page source depending on your browser. Our UET tag tracking code is right after the <body> tag, but you can put yours anywhere in your webpage’s head or body sections (either before the closing head tag or before the closing body tag).


This webpage’s custom events:









As the webpage loads, it triggers the UET tag, resulting in a number of HTTP requests. The most important request is to "bat.bing" (the one that looks like "http://bat.bing.com/action/0?ti=..."). This request tells Microsoft Advertising about the user visits to your webpage.

You can use third-party tools such as Fiddler to monitor all the requests that your browser is making when this webpage loads. In the first three examples, we are sending static values for custom events and variable revenue to show how it works. However, in most cases, you will want to send dynamic values for the custom event and variable revenue parameters depending on which action the user has triggered on your webpage. The last example shows you how to send dynamic values by reading values from your webpage (JavaScript variables, JavaScript functions, HTML elements, etc.). How to implement this yourself is up to you, based on how your website works.


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. Learn how to create a JavaScript UET tag

Learn more: What is UET and how can it help me?