Skip to main content
October 25, 2013
Windows Phone Developer Blog

New pubCenter reports to help you optimize ad revenue

If you are using, or plan to use, the Microsoft Ad SDK in your Windows Phone app, it’s likely you are looking to maximize that ad revenue. Enhancements to pubCenter – the Microsoft Ad management portal – released this week are designed to help you understand ad performance. Based on your findings, you may want to add third-party ad controls to optimize revenue. I’d like to share an approach to use.

pubCenter reporting improvements

This week, pubCenter released new reporting capabilities for additional insight into the performance of the Microsoft Ad Control in your app. The new reporting includes:

  • Requests – number of ads requested by the app
  • Fill rate – percentage of the requests that were delivered
  • Impressions – requests × fill rate, equal to the number of ads delivered (displayed in the app)
  • eCPM – value of 1,000 delivered impressions

To access the market performance reports go to pubCenter, Reports, Create Report, Ad Unit Performance, and make sure to turn on Market, Impressions, Fill Rate and eCPM, then Run the report.

These reports can help you understand the performance of the Microsoft Ad SDK for each market where you publish your app. For example, you can see the following for each of your ad units:

  • Markets with a high fill rate and high eCPM
  • Markets where your app makes ad requests, but the fill rate is very low




If you also develop for Windows 8 (or Windows 8.1), this information is already available in your reporting.

Third-party ad controls

If you find that the fill rate is low in some markets, I would suggest including third-party ad controls in your apps to supplement your Microsoft Ad Control revenue. As I’ve mentioned in previous posts, I use a “waterfall” ad system to show ads using the Microsoft Ad Control, and if there are no ads available, show ads from a third-party ad control.

Windows Phone supports several third-party ad controls – AdDuplex (ad exchange), Google AdMob for Windows Phone 8, InMobi, Inneractive/Nokia, Millenial Media, MobFox, Smaato, and TapJoy – so you can try alternatives.

Each of these ad controls work very much like the Microsoft Ad Control. You:

1) Register in their portal.
2) Create an ad unit in the portal and get the ad unit ID.
3) Download their ad SDK, then add the DLL file and the ad control to your app.

“Waterfall” ad control strategy

The strategy I use is to start with a primary ad control (Microsoft Ad Control), and fall back to a second ad control if the primary is not showing an ad, and potentially to a third ad control if the secondary is not showing an ad.

The algorithm looks like this:

  • Request a Microsoft ad every 45 seconds
  • Wait for answer, either success or failure
    • If success, then hide other ad controls
    • If failure, request an ad from second ad control
    • Wait for answer, either success or failure
      • If success, then hide other ad controls
      • If failure, request an ad from a third ad control

Note that the Ad policy is that ad requests can be made at most once every 30 seconds, no matter if an ad is delivered or not, so I recommend experimenting with the rotation time, from 30 seconds to a couple of minutes, depending on the app.

Following is code you can use to start testing the ad rotator concept. Please note, any use of this sample code is governed by the terms of the Microsoft Limited Public License. The solution described here is only an example; you choose your approach and which ad controls are best suited for your app. In this example, I’ll use the Microsoft Ad Control as the primary control, then AdDuplex as the secondary control, and my own ad as the third control.


DLLs to include in the app

Microsoft.Advertising.Mobile.dll // main dll

Microsoft.Advertising.Mobile.UI.dll // to enable Microsoft Ad Control error handling

The AdDuplex Ad SDK // see instructions here (you need to log in to AdDuplex)


XAML header




XAML grid to show the ads

This Grid contains 3 elements
1) the Microsoft Ad control at the top

2) The AdDuplex ad control below it

3) My own house ad at the bottom

<Grid Name=”AdGrid” Height=”80″ Width=”480″ >

 <Image Height=”80″ Name=”MyOwnAd” Width=”480″ Source=”/Images/480x80_ad.png” MouseLeftButtonUp=”MyOwnAdAdClick”/>

 <adduplex:AdControl Name=”AdDuplexAdControl” AppId=”<app id from AdDuplex>” xmlns:adduplex=”clr-namespace:AdDuplex;assembly=AdDuplex.WindowsPhone” IsTest=”False”/>

 <my:AdControl Height=”80″ Name=”MSAdControlAd” Width=”480″ ApplicationId =”<application ID from pubcenter>” AdUnitId=”<ad unit ID from pubcenter>” IsAutoRefreshEnabled=”False”  IsAutoCollapseEnabled=”True”/>



C# code to initialize the ad control

// add the handlers that detect when the Microsoft Ad Control gets a new ad or gets no ad

// this code is executed as part of the start code

// In my apps I added it to the OnNavigatedTo() function

MSAdControlAd.AdRefreshed += MSAdControl_NewAd;

MSAdControlAd.ErrorOccurred += MSAdControl_AdControlError;

// In this initial section I also remove all the ads if the user has paid for the app


C# code to call the ad control in a timer, every 45 seconds

// This code runs every 45 seconds through a timer

// if the app should show ads, then this code is called

// If the Microsoft Ad Control is not visible, make it visible then request another ad

// I use try/catch to minimize any possibility of Ad Control crashes



if (MSAdControl.Visibility != Visibility.Visible) MSAdControl.Visibility = Visibility.Visible;


// Ads can be refreshed every 30 seconds, not more often, per the Microsoft ad policies


Catch {;}


C# code to implement the waterfall

This code captures events from the Microsoft Ad Control, as explained in the docs, and either hides or shows the Ad Duplex ad control depending on whether there are ads in the Microsoft Ad Control.


void MSAdControl_NewAd(object sender, System.EventArgs e)


// use try/catch to minimize any possibility of Ad Control crashes

AdDuplexAdControl.Visibility = Visibility.Collapsed;



void MSAdControl_AdControlError(object sender, Microsoft.Advertising.AdErrorEventArgs e)


MSAdControlAd.Visibility = Visibility.Collapsed;

AdDuplexAdControl.Visibility = Visibility.Visible;



I use more than one kind of secondary ad control when one of my apps has a large number of users in markets with low Microsoft Ad SDK fill rates.

Note that some ad rotators have already been created, for example, by MoAds and AdRotator, and you can use them in your code.

Tune up your apps in time for holiday device sales

We are expecting a large growth in app downloads and purchases in the Windows Phone Store this holiday season, so I recommend getting your app ready by using the latest version of the Microsoft Ad SDK and checking out the new reporting in pubCenter. If you see that your app requests a significant number of ads in markets with low fill rate, implement a waterfall approach.

I’m very interested in finding out more about how you implement ad controls and in the results from the different ad controls, so please share your experiences as well as results from using the waterfall concept.