Ad Rotator Control for Windows Phone 7

I’ve finished creating an ad rotator control for Windows Phone 7 and have published it along with the source code here: Windows Phone 7 Ad Rotator on CodePlex.

I originally created the control so that I could dynamically configure ads appearing on Flashlight 7 based on ad culture. In the US I normally prefer using PubCenter as it usually has the highest eCPM, outside of the US I would switch between other providers (AdMob, InnerActive and AdDuplex for promoting of the app). The main reason for changing the ratios of ad providers was that I wanted to experiment how showing more AdDuplex ads impacts downloads of the app – with this little tool I can do so when eCPM has gone somewhat down (Note: I’ve actually found AdDuplex have a positive effect on app downloads and use it despite higher eCPMs as well).

The control allows setting up of ad probabilites based on culture, so its possible to configure (and update) such a configuration as this:

  • US: 80% PubCenter, 10% InnerActive, 5% AdMob, 5% AdDuplex ads
  • Germany: 80% AdMob, 10% PubCenter, 10% AdDuplex
  • France: 100% AdMob
  • Other: 25% PubCenter, 25% InnerActive, 25% AdMob, 25% AdDuplex

Read the project description and the WP7 ad rotator documentation on more details on how to integrate the control into projects.

Hope you find this tool useful!

9 Responses to Ad Rotator Control for Windows Phone 7
  1. Marios

    How about XNA? Is it supported?

  2. Gergely Orosz

    No, this is only Silverlight. PubCenter and AdDuplex have XNA support, however I haven’t done any XNA development. You can take the source code and see if you can re-use it with XNA.

  3. eric

    Hi Gergely, thanks for this great work. I have some questions:

    I used your adrotator and it increased the peak memory around 30mb when I navigate between pages. Is there a chance to prevent this.

    Also, What about Inneractive?, I saw that It is not supported yet. Is it gonna be imported soon? Because they are one of the good providers.


  4. Gergely Orosz

    Hi Eric,

    I wasn’t aware of the peak memory issue – at some point I’ll try to look into it when I’ll have time to dig around. I’ll have to look into what memory profiling tools work with WP7 as well.

    InnerActive are indeed a decent provider, however their SDK is probably the worst of all ATM. They’ve been added, however I’ve temporarily removed them as their SDK added location services to the app – this usually meant rejection of apps on submission because of the strict marketplace policy on location.

    They’ve just published a new SDK which finally doesn’t require the location API, however when testing I’ve found that under certain circumstances it throws a NullReferenceException crashing the whole app and there’s no way to catch it. As soon as they’ll publish a production ready SDK I’ll be adding them back in, hopefully that will be soon.

  5. soumya singhi

    Hi Greg
    When I place the following code in my XAML file

    I get the error below. Please help me how to fix it.

    System.NullReferenceException Object reference not set to an instance of an object. at AdRotator.AdRotatorControl.Invalidate(Boolean selectNextAdType) at AdRotator.AdRotatorControl.AdRotatorControl_Loaded(Object sender, RoutedEventArgs e) at MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex, Delegate handlerDelegate, Object sender, Object args) at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)

    Microsoft.Windows.Design.Platform.InvalidDesignerUpdateException An unhandled exception was encountered while trying to render the current silverlight project on the design surface. To diagnose this failure, please try to run the project in a regular browser using the silverlight developer runtime.

  6. Gergely Orosz

    Somuya: it’s open source software – you can just attach a debugger and see where the error is thrown and determine the cause. If you’re talking about the design view throwing this error, I’ve not tested it working in design view – you’re welcome to submit a fix for this if you’ll manage to fix it.

  7. Adam Wheatley

    This tool now supports XNA. I’m using it on my free XNA game Alien Escape. I have had zero issues with the latest release and love this tool. I’ve even mixed in a default ad into the rotation so I can promote my other games as well.

  8. 1000 impressions $ 0.10!no ip restrictions!... [...]Greg Does IT » Blog Archive »...
  9. Sergiy

    Could I setup AdRotator to show 2 different PubCenter ad units (eg. 70% – for one, 30% – another).