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 Bing.com and Yahoo.com, 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="//flex.atdmt.com/mstag/site/dexe4973-10a0-2abe-823e-5b2123f42eb0/mstag.js"></script>
<script type="text/javascript"> mstag.loadTag("analytics", {dedup:"1",domainId:"XXXXXX",type:"1",revenue:"",actionid:"XXXXX"})</script> <noscript> <iframe src="//flex.atdmt.com/mstag/tag/dexe4973-10a0-2abe-823e-5b2123f42eb0/analytics.html?dedup=1&domainId=XXXXXX&type=1&revenue=&actionid=XXXXX" frameborder="0" scrolling="no" width="1" height="1" style="visibility:hidden; display:none"> </iframe> </noscript>
[/code]

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="//flex.atdmt.com/mstag/site/dexe4973-10a0-2abe-823e-5b2123f42eb0/mstag.js"></script>
<script type="text/javascript"> mstag.loadTag("analytics", {dedup:"1",domainId:"XXXXXX",type:"1",revenue:"1234.56",actionid:"XXXXX"})</script> <noscript> <iframe src="//flex.atdmt.com/mstag/tag/dexe4973-10a0-2abe-823e-5b2123f42eb0/analytics.html?dedup=1&domainId=XXXXXX&type=1&revenue=1234.56&actionid=XXXXX" frameborder="0" scrolling="no" width="1" height="1" style="visibility:hidden; display:none"> </iframe> </noscript>
[/code]

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.

Comments (33)

  1. Dustin:

    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?

    1. Michael J. Kaye:

      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.

  2. Maggie:

    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!

    1. Michael J. Kaye:

      Maggie,

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

      In the JavaScript:
      revenue:”1234.56″

      In the NoScript tag:
      revenue=1234.56

  3. Lara:

    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!

    1. Michael J. Kaye:

      Lara,

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

  4. Lara:

    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.

  5. Lara:

    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?

  6. Ann:

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

    Thanks.

    1. Michael J. Kaye:

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

      adCenter accounts only use one currency per account.

  7. Kelly:

    Hi,

    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:

    $80.39

    Could I still implement the code with:
    In the JavaScript:
    revenue:”$1234.56″
    In the NoScript tag:
    revenue=$1234.56

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

    1. Michael J. Kaye:

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

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

  8. naomi:

    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!

    1. Menachem Ani:

      Hi Naomi,

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

  9. John:

    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

    Thanks!

  10. Menachem Ani:

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

  11. John:

    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.

  12. Arun:

    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.

  13. Kevin:

    Anyone know what the field

    actionid

    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. 🙁

  14. Dmytro:

    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?

  15. An:

    Hi,
    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!

Comments are closed.