Display ads in your app

Make more money from your apps by including banner or interstitial ads in your app:

  • Banner ads are small advertisements that utilize a portion of a page in an app, usually at the top or bottom of the page.
  • Interstitial ads are full-screen advertisements that typically force the user to watch a video or click through them to continue in the app or game. We support two types of interstitial ads for UWP apps: video and banner.

To include these types of ads in your apps, use the AdControl and InterstitialAd controls in the advertising libraries that are distributed in the Microsoft Advertising SDK (for UWP apps for Windows 10) and the Microsoft Advertising SDK for Windows and Windows Phone 8.x (for Windows 8.1 and Windows Phone 8.x apps).


Task Topic
Install and get started using the Microsoft advertising libraries. Get started with Microsoft advertising libraries
Show banner ads in your XAML/C# app. AdControl in XAML and .NET
Show banner ads in your HTML/JavaScript app. AdControl in HTML 5 and Javascript.
Show banner ads in your Windows Phone Silverlight 8.x app. AdControl in Windows Phone Silverlight
Show an interstitial ad in your app. Interstitial ads
Enable mediation for an AdControl or InterstitialAd control in a UWP app. Monetize with ads
Review performance data for AdControl and InterstitialAd controls in your app. Advertising performance report
Add advertisements to video content in a UWP app that was written using JavaScript with HTML. Add advertisements to video content in HTML 5 and JavaScript
Download sample projects that demonstrate how to add banner and interstitial ads to apps. Advertising samples on GitHub
Handle AdControl errors in your app. Error handling
Report a bug in the Microsoft advertising libraries. Visit the support page
Get community support. Visit the forum

Ad mediation in UWP apps for Windows 10

By default, AdControl and InterstitialAd controls display ads from Microsoft's network for paid ads. For UWP apps for Windows 10, we also offer the ability to enable ad mediation for these controls. Ad mediation enables you to maximize your ad revenue and app promotion capabilities by displaying ads from multiple ad networks, including ads from other paid ad networks such as Taboola and Smaato and ads for Microsoft app promotion campaigns.

To start using ad mediation with an AdControl and InterstitialAd in your UWP app, go to the Monetize with ads page for your app in the Windows Dev Center dashboard and configure ad mediation settings for the UWP ad unit ID that is associated with the control. By default, we automatically configure the mediation settings using machine-learning algorithms to help you maximize your ad revenue across the markets your app supports. However, also have the option to manually choose the networks you want to use. Either way, the mediation settings are configured entirely on the server; you do not need to make any code changes in your app.

For more information about configuring ad mediation settings in the dashboard for a UWP app, see Monetize with ads.

Mediation in Windows 8.1 and Windows Phone 8.x apps

In Windows 8.1 and Windows Phone 8.x apps, ad mediation is only available for banner ads. To use ad mediation, you must use the AdMediatorControl class in the Microsoft Advertising SDK for Windows and Windows Phone 8.x instead of the AdControl class. After you add this control to your app, you can manually configure your ad mediation settings on the Windows Dev Center dashboard.

For more information about using ad mediation in a Windows 8.1 or Windows Phone 8.x app, see this article.

Note

Ad mediation for Windows 8.1 and Windows Phone 8.x apps is no longer under active development. To maximize your potential advertising revenue, we recommend that you build UWP apps that use ad mediation in an AdControl or InterstitialAd.

Advertising support for Windows Phone 8.x Silverlight projects

Some developer scenarios are no longer supported in Windows Phone 8.x Silverlight projects. For more information, see the following table.

Platform version Existing projects New projects
Windows Phone 8.0 Silverlight If you have an existing Windows Phone 8.0 Silverlight project that already uses an AdControl or AdMediatorControl from an earlier release of the Universal Ad Client SDK or Microsoft Advertising SDK and this app is already published in the Windows Store, you can modify and rebuild the project, and you can debug or test your changes on a device. Debugging or testing the project in the emulator is not supported. Not supported.
Windows Phone 8.1 Silverlight If you have an existing Windows Phone 8.1 Silverlight project that uses an AdControl or AdMediatorControl from an earlier SDK, you can modify and rebuild the project. However, to debug or test the app, you must run the app in the emulator and use test mode values for the application ID and ad unit ID. Debugging or testing the app on a device is not supported. You can add an AdControl or AdMediatorControl to a new Windows Phone 8.1 Silverlight project. However, to debug or test the app, you must run the app in the emulator and use test mode values for the application ID and ad unit ID. Debugging or testing the app on a device is not supported.