Windows Ad Mediation is a great tool that can help you improve your revenue in your applications, in this example I will show you how to setup your application so that you can use Windows Ad Mediation in it. In this example we will be using an application called SampleApp test.
To start log into your windows center account and look into the application you wish to monetize. Next you will want to click on Monetization and then click on Monetize with ads, you will arrive here:
Creating Advertising Unites
When you are on the Monetize with ads page you will need to scroll down a bit and create one or two (or more) advertising ad unites, be careful when you create them (the ad unites) as some will be specific for PC/Tablet and other are specific only for Mobile apps.Adding Ad Mediator to your application
Open you application, click on references and select "Add a Connected Service" as follow:Then select Ad Mediator:
Select which ad networks you wish to work with:
Configuring PubCenter
Next click on Configure button located on the previous screenshot. You should see this:You can now set you different Application ID and Ad unit ID for Mobile and PC/Tablet apps.
Ad Mediator Element
Now you need to add the ad mediator element to your XAML page, look in your toolbox you should have a control called AdMediator Universal and take the AdMediatorControl and drop it in your application.This is the AdMediatorControl element that was created for me:
<Universal:AdMediatorControl x:Name="AdMediator_BE6310" HorizontalAlignment="Left" Height="160" Id="AdMediator-Id-CBB234FA-349E-4B08-843D-986908D9BFDB" VerticalAlignment="Top" Width="600"/>
Here are the different ad size that you can use for the Ad Mediator:
For Windows 10 and Windows 8.1 we have:160 x 600- 250 x 250
- 300 x 250
- 300 x 600
- 728 x 90
Windows 10 Mobile, Windows Phone 8.1 and Windows Phone
- 300 x 50
- 320 x 50
- 480 x 80
- 640 x 100
Also a nice thing to know is that you can programmatically set the height and width for specific ad network for example you could want a specific add size from Adduplex, another from Pubcenter and use Microsoft in house Advertising as a backup.
For Microsoft Advertising:
AdMediator_BE6310.AdSdkOptionalParameters[AdSdkNames.MicrosoftAdvertising]["Width"] = 300; AdMediator_BE6310.AdSdkOptionalParameters[AdSdkNames.MicrosoftAdvertising]["Height"] = 250;
Or others (AdDuplex/MicrosoftAdvertisingHouse):
AdMediator_BE6310.AdSdkOptionalParameters[AdSdkNames.AdDuplex]["Width"] = 250; AdMediator_BE6310.AdSdkOptionalParameters[AdSdkNames.AdDuplex]["Height"] = 250;
AdMediator_BE6310.AdSdkOptionalParameters[AdSdkNames.MicrosoftAdvertisingHouse]["Width"] = 300; AdMediator_BE6310.AdSdkOptionalParameters[AdSdkNames.MicrosoftAdvertisingHouse]["Height"] = 600
Setting the weight distribution of your ads
Once you have uploaded the application to the Windows Store, under Windows Ad mediation you should see something like this depending on what ad platforms you have selected:
you could set the ad network as follow:
If you had ad duplex you could decide to use ad duplex as a backup or give it a percentage of how much you wish for it to be used.
You can go even further and select your baseline witch means that you could give specific weight to different ad providers depending on which country the ad is being displayed.
For example: lets say that hypocritically Smaato had a higher eCPM in France then PubCenter did, then I would highly recommend that you set your baseline with PubCenter with the highest Weight and then create a specific baseline for France with Smaato with the highest Weight and PubCenter with a lower Weight. This would mean that for the whole world PubCenter would have the highest Weight and for France we would have a specific configuration which would have Smaato that would have the highest Weight compared to PubCenter.
/!\ I have NO IDEA which provider PubCenter or Smaato has the highest eCPM in france, it is just an example!
And there you have it, good luck and happy coding.
Source: https://msdn.microsoft.com/en-us/library/windows/apps/mt219682.aspx