简体   繁体   中英

How to add Microsoft Advertising on WP7 App

I'm trying to insert a Microsoft Advertising on my WP7 app but without success.

Of course i'm registered at pubCenter.

I've put in MainPage.xaml this code:

<UI:AdControl Grid.Row="1" ApplicationId="MY APP ID" AdUnitId="MY UNIT AD" HorizontalAlignment="Left" Height="80" VerticalAlignment="Top" Width="480"/>

Of course i've replaced MY APP ID and MY UNIT AD with my personal codes.

In the top of MainPage.xaml i've added this code:

xmlns:UI="clr-namespace:Microsoft.Advertising.Mobile.UI;assembly=Microsoft.Advertising.Mobile.UI"

In MainPage.xaml.cs i've add this code:

using Microsoft.Advertising.Mobile.UI;

What's missing? What's wrong? App is on the Store but it doesn't show any ads...

You can try this app (it's free) at this link: http://www.windowsphone.com/it-it/store/app/myvodafone/c6a86290-4f69-4fdf-9312-401f93ccb35d

I've just tested the app and the ads are displayed. I guess what happened is your first contact with the concept of fill rate . Basically, putting an ad control in your application doesn't guarantee that ads will be displayed 100% of the time. Depending on the category of the ad unit, the localization of the user, and the period of the year, there may be more apps trying to display ads than actual ads available. In those cases, the ad control won't display anything. The fill rate is the common name for the percentage of times your control has displayed ads. Unfortunately, the administration console of Microsoft PubCenter doesn't display the fill rate yet.

There's a few ways to get a better fill rate: changing the category of your ad unit, or using a special ad control like AdRotator which will automatically switch to another ad provider when there's nothing to display.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM