locked
Non-default AdMediator sizes for UWP apps RRS feed

  • Question

  • It appears that when I try to use a non-default size for the AdMediaiator control with Microsoft ads it won't work - a 300x250 ad will be displayed, even if the dimensions I set dictate a different ad format, such as 160x600.

    Here's a simple example from a blank test app showing a 160x600 ad size being served 300x250: http://i.imgur.com/RPPndz9.png

    The C#/XAML used above is:

    <Universal:AdMediatorControl x:Name="AdMediator" Id="XXX" Width="160" Height="600"/>

    AdMediator.AdSdkOptionalParameters[AdSdkNames.MicrosoftAdvertising]["Width"] = 160;

    AdMediator.AdSdkOptionalParameters[AdSdkNames.MicrosoftAdvertising]["Height"] = 600;

    What am I missing? Matt Sullivan in another thread said that I don't need to pre-define the ad units on the server, but the server seems to give me 300x250 (on the desktop) no matter what dimensions I set. Is there a better way to inform the server which ad format I want other than setting the ad dimensions?

    • Edited by SSN Seawolf Thursday, August 20, 2015 1:06 AM
    Thursday, August 20, 2015 12:51 AM

Answers

  • Dear SSN Seawolf,

    The AdUnit for test mode mediation stack appears to be misconfigured as a legacy 300x250 rather than "size-less".  I'll look into having this corrected ASAP.  Glad you were able to work around in the meantime.

    Thursday, August 20, 2015 5:27 PM

All replies

  • In the AdMediator.config...

    You'll find the following section:

            <AdAdapters>
              <AdAdapterInfo>
                <Metadata>
                  <Property>
                    <Key>WAdUnitId</Key>
                    <Value>10043123</Value>
                  </Property>
                  <Property>
                    <Key>MAdUnitId</Key>
                    <Value>10865270</Value>
                  </Property>
                </Metadata>
                <Name>MicrosoftAdvertising</Name>
              </AdAdapterInfo>
            </AdAdapters>

    (The values may differ slightly)

    You'll want to change the "WAdUnitID" to the AdUnitID test mode value found here: https://msdn.microsoft.com/en-US/library/mt125365%28v=msads.100%29.aspx

    (Side note -- it says these numbers are temporary, however with the release of the full SDK it populates the default AdUnitIDs with numbers from this table, are we still supposed to use this table, or are there updated test mode values?)

    Thursday, August 20, 2015 2:04 AM
  • Awesome! That did the trick, thanks. I didn't think to look to the Advertising SDK documentation, only AdMediator.

    I thought one of the key advantages of AdMediator is that we didn't need to specify ad format sizes. Do you know if live ads will size automatically and these values are only for displaying test ads,  or do we need to set WAdUnitId/MAdUnitId for each ad format we plan to use when publishing?

    And yeah, that's some pretty stale documentation, some clarification from Redmond would be nice.



    • Edited by SSN Seawolf Thursday, August 20, 2015 2:20 AM
    Thursday, August 20, 2015 2:18 AM
  • I think these are just for test mode ads, as the documentation states that Dev Center will detect that you're using Ad Mediation and will generate the necessary ids through the configuration

    (I personally haven't submitted anything using Ad Mediation yet (just using the old 8.1 SDK), so I haven't personally seen the process).


    • Edited by Kesac Thursday, August 20, 2015 2:28 AM
    Thursday, August 20, 2015 2:28 AM
  • Dear SSN Seawolf,

    The AdUnit for test mode mediation stack appears to be misconfigured as a legacy 300x250 rather than "size-less".  I'll look into having this corrected ASAP.  Glad you were able to work around in the meantime.

    Thursday, August 20, 2015 5:27 PM
  • So how do you program it to use the "size-less" ?

    I'm still unclear on the procedure for that.

    Br, Karhu.


    Karhu Koti

    Tuesday, September 29, 2015 2:27 PM
  • Ad Mediator will properly size ads once it's published, even though while debugging it doesn't properly size with test ads.

    You'll just have to trust that the ads will size correctly. I took Matt Sullivan's answer on faith and published - and my app handles different ad unit sizes as I expected.

    Tuesday, September 29, 2015 2:37 PM