Grow your business by advertising on MSN, Xbox, and more!
In September at the BUILD Conference in Anaheim, CA, Microsoft shared the Windows 8 developer preview with thousands of eager developers. Then yesterday, in San Francisco, Microsoft outlined a variety of monetization options for developers including details for the Windows Store as well as confirming that Windows 8 will support advertising in applications.
Well today, I’m happy to announce the release of the technical preview version of the Microsoft Advertising SDK for Windows 8. For a developer like me this is a great day! The technical preview SDK gives developers the ability to begin experimenting with integrating advertising in their Windows 8 apps as well as a chance to try out some of the new exciting ad formats.
As most of you know, Windows 8 offers an unprecedented scale opportunity for existing developers to embrace the app marketplace model.
At Microsoft Advertising, our focus is to enable best-in-class ad products which in turn will enable you to delight your users in new and innovative ways. We will be working with the top advertisers in the industry to ensure not only beautiful immersive experiences (figure 1), but also demand for traditional IAB standard display (figure 2) and Text ad formats (figure 3).
Figure 1. New Full screen Immersive Rich Ads
Figure 2. Standard Display Ad formats in the Grid App Template
Figure 3. Standard Text Ad formats
How to Get Started with Windows 8 Metro style apps using HTML
Being respectful of developers’ time, the SDK is very simple to use and can be integrated into your new Windows applications with a few quick and easy steps.
The first step is to download and the install the SDK from here. For existing Windows Phone 7 SDK users, these steps and the SDK API should be very familiar.
In order to receive live ads from real advertisers, you need to register and setup your account at https://pubcenter.microsoft.com/ (figure 4).
Integrate the SDK by adding a reference to the newly installed Microsoft.Advertising.winmd assembly. Also, copy the Ads folder (Found in Program Files (x86)/Microsoft SDKs/Advertising for Windows8) to the root of your application.
Finally add a script reference to the Ads/ad.js file and integrate the following code snippet into your application at the location you want to place your advertising.
<div id="myAd" style="width:300px; height:250px"
data-win-control="MicrosoftNSJS.Advertising.AdControl"
data-win-options="{applicationId: 'test_client', adUnitId: 'Image_300x250'}" >
NOTE: The ad control requires that you declare the “Internet (Client)” capability in your application manifest which allows the ad control to fetch the ads over the internet.
Once you have signed up in PubCenter, you can replace the ApplicationID and AdUnitID with the values issued by PubCenter.
Figure 4. PubCenter Sign-up
It is as simple as that!
The technical preview version will support the following ad sizes for live ads 300x250, 728x90, 250x250,160x600. In “test mode” additional experiences, including full screen ads can be enabled. (See the help file for the full list)
It is important to note that during the technical preview we will not support payout for developers as applications would only be running in local emulator mode. However in the near future, we will provide more details on payout, so you can know when to expect your first check in the mail.
In my next post, I will share the steps required to integrate advertising in the Windows 8 style apps using XAML as well as details on the upcoming Beta version of the Ads SDK.
Until then, please play with the SDK and let us know what you think! We look forward to your feedback.
Best,
Ian Ferreira, Principle Development Manager, Ads R&D, Microsoft.
Helpful Links:
· Register your Windows 8 app on https://pubcenter.microsoft.com. Please email or visit this community and ask questions once you have registered.
Follow us on Twitter @MSAdvertising | Find us on Facebook and YouTube | Share your thoughts in the Forums | Subscribe
FYI - If you are having issues with the help file, please save to your local machine, right click on properties and click on UnBlock.
Please don't start assuming that developers that would be interested in this would want to see ONLY an HTML example of how to use this.
@techSage - I think he said that the next post would show XAML, so that means we should see some C# coming up...
This information is very nice. I hope it will get more benefit to me.
A lot of new information here, and of course as IT Professional in Indonesia many new science and valuable information for me
When new innovation is developed iWindows 8 in the form of the new apps that are being developed continually by a dedicated team, advertisement is the fun bit !
Well, after adding the library to the project, adding a reference and borrowing from phone code (change Mobile to WinRT in the namespace definition), I was able to get a C#/XAML version to compile, but it hangs when the component is loaded from the library, so maybe it isn't quite ready yet...
xmlns:my="clr-namespace:Microsoft.Advertising.WinRT.UI;assembly=Microsoft.Advertising"
<my:AdControl x:Name="adBox"
Height="250"
Width="300"
VerticalAlignment="Top"
HorizontalAlignment ="Right"
AdUnitId="Image_300x250"
ApplicationId="test_client"/>
Tried to get the xaml version working as well, using the above example.
Page wont load, get following error:
An exception of type 'Windows.UI.Xaml.Markup.XamlParseException' occurred in assetregister.exe but was not handled in user code
Additional information: The type 'AdControl' was not found because 'clr-namespace:Microsoft.Advertising.WinRT.UI;assembly=Microsoft.Advertising' is an unknown namespace. [Line: 211 Position: 83]
Looked at the object and its in there, not sure what is going on.
@Redtalon
Please refer to the help file for more details, but hte following markup should work. Ensure you have the Internet Client capability checked.
<UserControl x:Class="My_Ad_Funded_Metro_style_App.MainPage"
xmlns="schemas.microsoft.com/.../presentation"
xmlns:x="schemas.microsoft.com/.../xaml"
xmlns:d="schemas.microsoft.com/.../2008"
xmlns:mc="schemas.openxmlformats.org/.../2006"
xmlns:my="using:Microsoft.Advertising.WinRT.UI"
mc:Ignorable="d"
d:DesignHeight="768" d:DesignWidth="1366">
<Grid x:Name="LayoutRoot" Background="#FF0C0C0C">
<my:AdControl x:Name="AdControl1"
ApplicationId="test_client"
AdUnitId="Image_250x250"
Width="250"
Height="250" />
</Grid>
</UserControl>
@Nathan
Please see above comments around capabilities. FWIW, we have seen some issues with the XAML designer, which would get addressed by the platform.
Thank you Ian, will take a look
Hi Ian,
That worked well but as you pointed out the designer view doesn't seem to like the component even in test mode.
Still, can't complain, works well.
Once again thanks
how can i register application ID and Ad Unit ID????? bit confused, and where can i get code? I didnot see the code why please?