wp7appdevelopment

Adventures in Windows Phone app development

Monthly Archives: March 2012

How to Advertise on Windows Phone

What I thought was a simple question took me some research. Why doesn’t Microsoft make it easier to find out how to advertise on their Windows Phone?

First, you need to create an account on Microsoft Advertising adCenter. Search the web before signing up — you may be able to score some free advertising credits for new accounts. (If you do get a promotional credit, enter it on the Accounts&Billing tab in adCenter.)

Once your account is set up and billing information is added, you can create your ad campaigns, ads, and keywords. Now, to get these ads into Windows Phone apps, you’ll need to set the targeting options and ad distribution correctly. You can do this at either the campaign or ad group level. You also need to specify that you want your ads to be displayed on the content network (not search).

  1. In your campaign or ad group settings, go to the Targeting Options/Advanced Targeting options. Expand Device, and select “Smartphone and other mobile devices with full browsers”. Deselect all others.
  2. At the end of that line, you’ll see “All OS | Edit”. Click Edit.
  3. Select Windows, and deselect all others (Android, iOS, etc.).
  4. Under Advanced Settings, expand Ad Distribution: Deselect Search network and select content network.
  5. Save your changes.

Now your ads will go in the Microsoft Advertising inventory and will be displayed in the appropriate Windows Phone apps. The ads are served using the same process as other content ads: your keywords are matched to apps using keywords, the app description, and the app category.

This is how you can get text ads displaying on Windows Phone. If you want to have a display ad on the Windows Phone, you need to go through Microsoft’s sales team. You can get in touch with them here: https://advertising.microsoft.com/contact-sales.

Getting Started with Microsoft Advertising SDK for Windows Phone

The Microsoft Advertising SDKs enable developers to show ads in their apps. The ads shown in Windows Phone apps are integrated with Microsoft pubCenter — for monitoring and reporting of your ads’ performance. You’ll need to first create a pubCenter account before you can start displaying ads.

Silverlight-based apps use the AdControl to receive and show ads. (This post doesn’t apply to XNA games, which use the DrawableAd and AdGameComponent classes.)

Getting Started

  1. In Visual Studio, right-click References and click Add Reference..
  2. In the Add Reference dialog bos, click the .NET tab. Then select Microsoft.Advertising.Mobile.UI.dll and click OK.
  3. In the source file (code behind), add the following code:
    using Microsoft.Advertising.Mobile.Ui;
  4. Add the following namespace decloaration to your .xaml file:
    xmlns:my="clr-namespace:Microsoft.Advertising.Mobile.UI;assembly=Microsoft.Advertising.Mobile.UI"
  5. Add the AdControl unit to your .xaml file. Note: you’ll need to replace the AdUnitId and ApplicationID with your values from PubCenter before you publish your app, but these values will work for testing.
    <my:AdControl AdUnitId="Image480_80" ApplicationId="test_client" Height="80" Width="480" />

Notes:

  • The November 2011 release fixed a bug that caused an error when a user navigated outside the app at the same time the AdControl was fetching a new ad.
  • For more information, see the Microsoft documentation.