How To Setup Conversion Tracking In Microsoft adCenter

NOTE: Bing Ads launched a new version of Conversion Tracking called Universal Event Tracking, the instructions below are outdated and no longer work. Please see the new page for instructions on how to set up Bing Ads Universal Event Tracking.

Microsoft adCenter Conversion Tracking

Now that Microsoft adCenter is powering ads for both and, it is extremely important to make sure you are tracking your campaigns properly. Here is a quick guide on how to set up revenue and conversion tracking for Microsoft adCenter.

Step 1 – Turn On Conversion Tracking

In adCenter, conversion tracking must be turned on for each individual campaign. You can do this by navigation to your campaign and clicking on the “Change Settings” link. In the top right corner of this page you will find a check box to Track Conversions. Check this box.

If you just want to track the number of conversions, you can click the link to “show code” and paste it into your order confirmation page. If you want to track revenue too, then you’ll want to follow the next steps.

Step 2 – Revenue Tracking

In order to track the revenue generated from orders originating from adCenter, we will need to set up custom code. Start by clicking on the “Open Campaign Analytics Tool”. This will bring you to the Campaign Analytics section of adCenter. The next step will be to set up a goal by clicking “Create Goal”.

It will bring you to a simple form that you will need to fill out. Most of the form is self-explanatory. Just make sure you select “Variable” under the “Revenue to track” option.

Once you fill out the form, click “Save and generate code”. Copy and past the code and…

Step 3 – Inserting Revenue Variable

At this point you should have code that looks kind of like this:

[code lang=”html”]
<script type="text/javascript">if (!window.mstag) mstag = {loadTag : function(){},time : (new Date()).getTime()};</script>
<script id="mstag_tops" type="text/javascript" src="//"></script>
<script type="text/javascript"> mstag.loadTag("analytics", {dedup:"1",domainId:"XXXXXX",type:"1",revenue:"",actionid:"XXXXX"})</script> <noscript> <iframe src="//" frameborder="0" scrolling="no" width="1" height="1" style="visibility:hidden; display:none"> </iframe> </noscript>

At this point you need to generate the order total from your eCommerce system and pass the variable in the two places it says revenue. Here is an example, look at the word revenue on lines 3 and 4.

[code lang=”html”]
<script type="text/javascript">if (!window.mstag) mstag = {loadTag : function(){},time : (new Date()).getTime()};</script>
<script id="mstag_tops" type="text/javascript" src="//"></script>
<script type="text/javascript"> mstag.loadTag("analytics", {dedup:"1",domainId:"XXXXXX",type:"1",revenue:"1234.56",actionid:"XXXXX"})</script> <noscript> <iframe src="//" frameborder="0" scrolling="no" width="1" height="1" style="visibility:hidden; display:none"> </iframe> </noscript>

Your final code should look something like the code directly above. You can paste this code into your order confirmation page.

NOTE: Don’t copy and paste this as it won’t work, because I removed all the IDs that adCenter uses to identify which account this is for.

33 Comments to "How To Setup Conversion Tracking In Microsoft adCenter"

  1. Reply
    Tom McLellan
    November 13, 2010 at 11:08 AM

    Thanks for this post. Adcenter seems very similar in design to the Google Adwords conversion tracking model. Two other useful tactics we’re exploring:

    Google URL Tagging using Microsoft’s {keyword} insertions:

    Tool for adding MSN keyword data to Google Analytics:

  2. Reply
    January 11, 2011 at 1:33 PM

    How do we put the tax and shipping variables in? And if so do I need to include the order total OR sub-total? How does this work?

    • Reply
      Michael J. Kaye
      January 13, 2011 at 10:08 AM

      Hi Dustin,

      They only give the ability to track one number. Most merchants will just put the order total. However, if it suits your purposes better, you can just put the subtotal.

  3. Reply
    January 18, 2011 at 5:33 PM

    Hi. Do we need to replace the actual words revenue with our dynamic variables that will populate revenue or do we put the dynamic variables that will pass revenue between the ” ” after revenue: ? Thank you!

    • Reply
      Michael J. Kaye
      January 20, 2011 at 2:38 PM


      You will need to fill in the amount in two places:

      In the JavaScript:

      In the NoScript tag:

  4. Reply
    March 4, 2011 at 9:44 AM

    Hi Michael,
    I’m a marketer not a programmer and am trying to accomplish this last step. Are you saying that you put the actual number 1234.56 in those two places? or would it be something like “orderSubTotal” ? I have a yahoo store platform. Thanks!

    • Reply
      Michael J. Kaye
      March 4, 2011 at 9:50 AM


      I’m not familiar with the Yahoo Store platform specifically, but it would be something like ‘orderSubTotal’.

  5. Reply
    March 4, 2011 at 9:44 AM

    forgot to check the email notif. box

  6. Reply
    March 4, 2011 at 10:14 AM

    Ok, thanks! I tried that but didn’t work. Microsoft says their reporting is real time so I thought I should have been able to see the numbers right after inserting the code and making a test order. I think the line breaks are messed up so I’m going to try editing that.

  7. Reply
    March 4, 2011 at 10:20 AM

    I noticed that when I copy the code from Adcenter, there are no clean line breaks like in your screenshot. How do you know where to insert line breaks?

  8. Reply
    March 14, 2011 at 3:13 AM

    My site has 2 currencies, can I pass the currency symbol to the “revenue” variable?


    • Reply
      Michael J. Kaye
      March 14, 2011 at 6:18 PM

      You can only use numbers with two decimal points (example: 1234.56)

      adCenter accounts only use one currency per account.

      • Reply
        March 15, 2011 at 12:46 AM

        Thank you :)

  9. Reply
    March 24, 2011 at 6:15 PM


    I’m also a marketer trying to implement this code. I looked at the source code on our confirmation page and we don’t have ‘revenue’, instead it looks like this:


    Could I still implement the code with:
    In the JavaScript:
    In the NoScript tag:

    You have been so thorough in your prior answers and I apologize in advance if this is redundant.

  10. Reply
    March 24, 2011 at 6:16 PM

    and of course the html didn’t show. Anyway, it was class=$80.39 not revenue=$80.39

    • Reply
      Michael J. Kaye
      April 4, 2011 at 2:53 PM

      You need to pass the order amount into the adCenter tracking pixel.

      Whatever your shopping uses as the variable to write the 80.39.

  11. Reply
    June 28, 2011 at 3:51 AM

    It seems like the code in the example below is not dynamic. Can anyone explain what code I should implement in order to track dynamic sums? Thanks!

    • Reply
      Menachem Ani
      June 28, 2011 at 10:04 AM

      Hi Naomi,

      You will need to replace the 2 instances of 1234.56 with the dynamic variable for your eCommerce software.

      • Reply
        June 29, 2011 at 2:21 AM

        Got It.


  12. Reply
    July 20, 2011 at 9:09 AM

    Hi There,

    I’m trying to implement revenue tracking, but the 3rd party site I’m working with only sets their revenue variable after where I can insert the tracking code. Is there a way to have the MS code fire after the page has loaded? I’ve tried using setTimeout and window.load without success


  13. Reply
    Menachem Ani
    July 20, 2011 at 12:37 PM

    Can you place the code lower in the page?

    • Reply
      July 20, 2011 at 12:43 PM

      No unfortunately not.

  14. Reply
    Menachem Ani
    July 20, 2011 at 12:59 PM

    Do you have any other pixel in place that are working correctly? If yes, how are those placed?

  15. Reply
    July 20, 2011 at 1:09 PM

    I do have other pixels in place, but they do not encounter this issue as they are not setting the revenue. I can capture a conversion, but since my 3rd party partner is setting their revenue variable after my MS code when we try and set the revenue the 3rd party variable does not yet exist.

  16. Reply
    April 2, 2012 at 9:25 AM

    Hi Folks. Ad center has changed conversion tracking options. Last week I created new Ad center account but I am unable to identify conversion tracking code. Could you please help me where to find conversion tracking code that it will be helpful for me to make my campaigns to go live in ad center? Tons of thanks in advance.

  17. Reply
    June 12, 2012 at 6:58 PM

    Anyone know what the field


    is used for? It seems like it’s a static value, yet I’ve found no definition of what it is. Calling the adCenter folks was equally unhelpful, they didn’t know either. :-(

    • Reply
      February 24, 2014 at 8:23 AM

      Did you ever get an answer for your question?

  18. Reply
    April 24, 2013 at 9:37 AM

    Is it possible to track specific events (i.e. click on button) with bing tracking code?

    We have no ‘thank you’ page instead we have only ‘buttons’ which we want to track. Whenever user click on button we redirect him to another application where we have no control.

    The code above we put on page
    if (!window.mstag) mstag = {loadTag : function(){},time : (new Date()).getTime()};

    this code we execute when users click on buttons
    mstag.loadTag(“analytics”, {dedup:”1″,domainId:”1838920″,type:”1″,actionid:”106681″});

    It does not work. Could u provide us with example or instruction how we could achive that?

    • Reply
      March 28, 2014 at 10:22 AM

      Ditto. Did you figure this out?

  19. Reply
    April 3, 2014 at 7:17 AM

    i create a tracking code and put on my page. There are a lot clicks and no one conversion. I tried it, i clicked on my ad, i did a conversion, but the adcenter doesn’t show it. So, something is wrong. What is the problem?
    Thank you!

Trackbacks for this post

  1. Drive Qualified Traffic « RevenueWire Tutorial Center
  2. How To: Setup eCommerce Conversion Tracking In Bing Ads (Universal Event Tracking) - JXT Group

Leave a comment

Your email address will not be published. Required fields are marked *