Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

What options for Ads on a windows app?

Discussion in 'Windows' started by TheRaider, Mar 13, 2015.

  1. TheRaider

    TheRaider

    Joined:
    Dec 5, 2010
    Posts:
    2,245
    If the microsoft ads the only option? is there anything else?

    I just want to port my apps over but chartboost, admob and unityads all don't seem to support windows phone.
     
  2. firkosa

    firkosa

    Joined:
    Nov 10, 2013
    Posts:
    7
  3. TheRaider

    TheRaider

    Joined:
    Dec 5, 2010
    Posts:
    2,245
    I am going to try the neatplug on, since I already have that and it supports wp
     
  4. chucky-w

    chucky-w

    Joined:
    Feb 4, 2014
    Posts:
    14
    I am using SMAATO (www.smaato.com), it has a plugin for WSA 8.1 (Phone, Store, Universal), however I am not sure about its profitability yet...
     
  5. FlashMuller

    FlashMuller

    Joined:
    Sep 25, 2013
    Posts:
    449
    You could also check out the AdMediator PlugIn.
    It has Microsoft Ads, Smaato and AdDuplex (Cross-Promotion) plus very nice configuration options, even after your app has been released (like percentual distribution, refresh rates, country based setups, fallbacks etc.) If your app is Silverlight (which is not possible with Unity and Windows 8.1 !!) you even have more options, including AdMob.
     
  6. shopguy

    shopguy

    Joined:
    Jan 12, 2013
    Posts:
    282
    You said besides Microsoft Ads... but just wanted to note, I just finished my first game using Microsoft Ads, and I have to say it was super easy and works great. Can't speak on revenue yet, but in my several hours of testing spanning several days, all different hours of day/night, I've been seeing pretty much 100% fill rate... I am in the US, might be worse in other parts of the world.

    Took me 30 minutes or less to add them, including the time it took me to find tutorials, download the SDK, everything. It's pretty much just download/install SDK, then add a few lines to your XAML file... done. Assuming you've designed your game to have a spot for the ads to show up. In my case the ads are just always there, at the bottom of the screen, so maybe my case is very simple (don't have to turn them on/off from one screen to the next).
     
  7. jtok4j

    jtok4j

    Joined:
    Dec 6, 2013
    Posts:
    320
    @shopguy,
    Hey, can you please give me some hints, 'cause I haven't found anything simple or helpful in the microsoft ads (I think that is: pubcentre right?) information and "help"...
    Can you give me the links to the helpful information you've found? I'm almost ready to give up...
     
  8. shopguy

    shopguy

    Joined:
    Jan 12, 2013
    Posts:
    282
    http://blog.thomaslebrun.net/2012/1...g-the-microsoft-advertising-sdk/#.VUGx53lFCUl

    That's what I followed. It is pretty long, but only because he goes in to a lot of detail, the actual steps are just a few, something like:

    1. Download SDK
    2. Add reference to SDK in Visual Studio
    3. Register on pub center and add your app name and a few other simple steps to get some ID numbers
    4. Add a few lines to the MainPage.xaml file, and include the ID numbers from step 3

    That covers Windows 8.0, which I think is slightly easier. If you are doing both (8.1 also) I'd start with 8.0. 8.1 is about the same, but you download/reference the 8.1 SDK instead of 8.0. I think the 8.1 SDK is even included with Visual Studio now, if not you should be able to find it easy from MS.

    Here is my MainPage.xaml for an 8.0 project, you only have to add the Ads:AdControl section, and the one using:Microsoft.Advertising line towards the top. That's it, no "code" needed.. unless you need to hide the ads, in which case you just have to add 1 or 2 lines of code to hide/show them as needed.

    Code (CSharp):
    1. <Page
    2.     x:Class="Template.MainPage"
    3.     IsTabStop="false"
    4.     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    5.     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    6.     xmlns:local="using:Template"
    7.     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    8.     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    9.     xmlns:Ads="using:Microsoft.Advertising.WinRT.UI"
    10.     mc:Ignorable="d">
    11.  
    12.     <SwapChainBackgroundPanel x:Name="DXSwapChainPanel">
    13.         <Grid x:Name="ExtendedSplashGrid">
    14.             <Image x:Name="ExtendedSplashImage" Source="Assets/SplashScreen.png"/>
    15.         </Grid>
    16.         <Ads:AdControl ApplicationId="YOUR_ID_GOES_HERE"
    17.                AdUnitId="YOUR_ID_GOES_HERE"
    18.                Height="90"
    19.                Width="728"
    20.                HorizontalAlignment="Center"
    21.                VerticalAlignment="Bottom" />
    22.     </SwapChainBackgroundPanel>
    23. </Page>
    Edit: If you do Windows Phone 8.1 build.. the using: line is different, it looks like:

    xmlns:Ads="using:Microsoft.Advertising.Mobile.UI"

    I guess they gave it a different namespace. For my universal builds I end up copying/moving MainPage.xaml so I have separate ones for Phone vs non-phone builds. Then I use some conditionals (#if) in App.xaml.cs
     
    Last edited: Apr 30, 2015
    jtok4j likes this.
  9. jtok4j

    jtok4j

    Joined:
    Dec 6, 2013
    Posts:
    320
    Thanks @shopguy , this write-up was superb and helpful! :D
     
    shopguy likes this.