If only I had a pound for every time I’ve been asked when Microsoft’s in-app advertising would be available in the UK. The Microsoft Advertising SDK was only available in the US for the initial Windows Phone launch. With the release of Mango however, 11 additional countries were added including the UK.
What does this mean? It means it’s really simple to integrate advertising into your Windows Phone application (or game, Silverlight or XNA). Microsoft Advertising Network servers deliver ads to your users and you get a share of the advertising revenue.
In-App advertising can offer a great alternative mechanism for monetizing your apps. Instead of charging up-front, you offer the app for free and make money through advertising. Or you offer a free, ad-supported version alongside a paid, ad-free version. Experimenting with different models may itself prove to be a very worthwhile investment!
I’m going to walk through a very simple example. All that’s required is:
- The Windows Phone SDK 7.1
- An AppHub account (to publish your app)
- A Microsoft pubCenter account (this is where advertising is linked to your app)
Step 1 – Create your Windows Phone Application
Step 2 – Incorporate the AdControl in your App
The Microsoft Advertising SDK ships as part of the Windows Phone SDK 7.1 so as long as you have the tools, you have all you need to embed the AdControl. Simply decide on the appropriate layout (generally the control should be positioned either at the top or bottom of the screen) and add the control from the Toolbox in VS.
Step 3 – Check the Layout
By default, if you drop the AdControl onto the design surface, it will configure its ApplicationId and AdUnitId to display a test ad so you can check all’s well. I’ve opted to add the AdControl to the outer LayoutRoot Grid by creating a new row at the bottom of the page. This allows space for the full size of the ad. The standard size for the AdControl is 480×80 and it’s recommended you use this.
Step 4 – Wire Things Up in pubCenter
In pubCenter you need to first register the application (which gives you an ApplicationId) and then create something called an Ad unit. These partition up ads in terms of size and content categories. When you’ve created one you’ll get an AdUnitId. These are the values you use to set the properties on your AdControl.
Step 5 – Update Your AdControl Properties
Set the ApplicationId and AdUnitId properties on your AdControl to the values you got from pubCenter.
Step 6 – Be Patient
After a short delay, ads will start to be served to your application.
Step 7 – Publish to AppHub as Normal
Below are a some useful links for more information:
- Microsoft Advertising SDK for Windows Phone on MSDN
- Monetize your Windows Phone 7 Apps on the Microsoft Advertsiisng site
- Monetization Best Practices for In-App Ads
- Microsoft pubCenter
- Original announcement on The Windows Phone Developer Blog
- Original announcement on the Microsoft Advertising Blog