Search Unity

Unity Banner ads not show real ads

Discussion in 'Unity Ads' started by Dreeka, Oct 22, 2018.

  1. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    504
    carsonhui likes this.
  2. jussikuosa_unity

    jussikuosa_unity

    Unity Technologies

    Joined:
    Apr 7, 2017
    Posts:
    2
    Hello Dreeka,
    can you see an error message on your device logs?

    Also, can you share on which platform you are experiencing this and snippets on initialisation and showing the banner ads?

    Best regards,

    Jussi Kuosa (Unity Ads QA)
     
  3. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    504
    Hey,

    I see no error. I use the following code for init:

    Code (CSharp):
    1.  if (Application.platform == RuntimePlatform.Android)
    2.                 Monetization.Initialize(platformData.androidGameId, platformData.unityTestMode);
    3.             else if (Application.platform == RuntimePlatform.IPhonePlayer)
    4.                 Monetization.Initialize(platformData.appleGameId, platformData.unityTestMode);
    5.          
    6.             if (adsEnabled)
    7.             {
    8.                 Advertisement.Banner.Load(platformData.bannerAdId);
    9.             }
    10.  
    11.  

    and then I call the following function:
    Code (CSharp):
    1. public static void ShowUnityBannerAd()
    2.         {
    3.             if (adsEnabled)
    4.             {
    5.                 Advertisement.Banner.Show(platformData.bannerAdId);
    6.             }
    7.         }
    I am trying on an Android device (LG G4). platformData.bannerAdId and platformData.androidGameId has the correct id's, and adsEnabled is set to true.

    Also, there is another issue. If I call ShowUnityBannerAd function at start, the banner does not appear. But if I call it 4 seconds after start, it appears.

    Also, does Unity Banner ads shows AdMob ads as well, or only Unity specific banner ads?
     
  4. CloudDeLuna

    CloudDeLuna

    Joined:
    Jul 6, 2017
    Posts:
    1
    Hello Dreeka, shouldn't it be

    Advertisement.Initialize(platformData.androidGameId, platformData.unityTestMode);

    instead of
    Monetization.Initialize(platformData.androidGameId, platformData.unityTestMode);

    ?

    You can add options to Advertisement.Banner.Load to get a callback when load has succeeded or failed :
    Code (CSharp):
    1.  
    2.  
    3.     public void LoadBanner()
    4.     {
    5.         BannerLoadOptions options = new BannerLoadOptions { loadCallback = OnLoadBannerSuccess, errorCallback = OnLoadBannerFail };
    6.         Advertisement.Banner.Load(bannerPlacementId, options);
    7.     }
    8.  
    9.     private void OnLoadBannerSuccess()
    10.     {
    11.         Debug.Log("OnLoadBannerSuccess");
    12.         BannerOptions options = new BannerOptions { showCallback = OnShowBanner, hideCallback = OnHideBanner };
    13.         Advertisement.Banner.Show(bannerPlacementId, options);
    14.     }
    15.  
    16.     private void OnLoadBannerFail(string message)
    17.     {
    18.         Debug.LogError("OnLoadBannerFail reason : " + message);
    19.         //retry to show banner maybe if the reason was that the placement was not ready
    20.     }
    21.  
    That way you can see if there is an error during the loading of the Banner and show it only when it's loaded.

    Hope it helps you !

    Edit:
    For me the banners show in non-test mode only when I set the "override client test mode" to "Force test mode OFF (i.e. use production ads) for all devices" in the plateform settings on https://operate.dashboard.unity3d.com/ -> Monetization -> Plateforms -> Google Play Store/ Apple App Store -> Settings

    Edit 2:
    In fact it as worked for a few minutes but now I just get the error : "Banner placement 'horizontalBanner' is not ready"
     
    Last edited: Oct 22, 2018
  5. Dreeka

    Dreeka

    Joined:
    Jul 15, 2010
    Posts:
    504
    I have tried the following code:
    Code (CSharp):
    1. Debug.Log("Init ads");
    2. Advertisement.Initialize(platformData.androidGameId, platformData.unityTestMode);
    3.  
    4. BannerLoadOptions options = new BannerLoadOptions();
    5.  
    6. options.errorCallback += ((string message) => {
    7.     Debug.Log("Error: " + message);
    8. });
    9.  
    10. options.loadCallback += (() => {
    11.     Debug.Log("Ad Loaded");
    12. });
    13.  
    14. Advertisement.Banner.Load(platformData.bannerAdId, options);
    And when I run on my device, I get the following messages:
    Init ads
    Error: UnityAds is not initialised.

    Update:
    If I try the following code:
    Code (CSharp):
    1. Debug.Log("Init ads");
    2. Advertisement.Initialize(platformData.androidGameId, platformData.unityTestMode);
    3. StartCoroutine("ShowBannerWithDelay");
    4.  
    5. public static void Show()
    6. {
    7.     BannerLoadOptions options = new BannerLoadOptions();
    8.  
    9.     options.errorCallback += ((string message) => {
    10.         Debug.Log("Error: " + message);
    11.     });
    12.  
    13.     options.loadCallback += (() => {
    14.         Debug.Log("Ad Loaded");
    15.     });
    16.  
    17.     Debug.Log("Loading banner ad");
    18.     Advertisement.Banner.Load(platformData.bannerAdId, options);
    19. }
    20.  
    21. IEnumerator ShowBannerWithDelay()
    22. {
    23.     Debug.Log("Enter: ShowBannerWithDelay");
    24.  
    25.     yield return new WaitForSeconds(2.5f);
    26.     Show();
    27. }
    Then I get the following output:
    Init ads
    Enter: ShowBannerWithDelay
    Loading banner ad

    And no callback is called. Is the SDK broken? It only works in test mode.
     
    Last edited: Oct 23, 2018
  6. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,085
    @Dreeka, @CloudDeLuna

    We are aware of 3 issues with Banners at the moment:

    1. Our documentation could be a bit clearer around checking the placement status and using callbacks. The examples in this thread are more comprehensive and we'll get our docs updated as soon as we can.
    2. Banners are not currently supported for players in the EU. We are still finalizing our GDPR solution for banners.
    3. Since this is a new feature for us, there isn't a ton of banner ad inventory at the moment. We expect fill for banner ads to ramp up over time.
     
    Dreeka and carsonhui like this.
  7. ClaireO

    ClaireO

    Unity Technologies

    Joined:
    Oct 25, 2016
    Posts:
    59
    Hi,

    In this situation the device logs probably show a warning. I recommend calling the banners only when there's a signal for availability.

    This is worth to note currently however: banner delivery will start a bit later in Europe due to some kinks our team needs to work out.

    Thank you for your patience while we roll out new ad formats to our service.
     
    Dreeka and carsonhui like this.
  8. Mamoon178

    Mamoon178

    Joined:
    Jul 26, 2017
    Posts:
    2
    Hi! i want to know that how can i change the position of banner?
     
  9. Mamoon178

    Mamoon178

    Joined:
    Jul 26, 2017
    Posts:
    2
    Hi! i want to know that how can i change the position of banner?
     
    Rutger likes this.
  10. SirYagoMan

    SirYagoMan

    Joined:
    Apr 4, 2018
    Posts:
    2
    When I try to show a banner I get the follow message:

    W/UnityAds: +[USRVApiSdk WebViewExposed_logWarning:callback:] (line:53) :: Could not show banner due to No fill for placement banner

    I'm not sure of the reason. Is it because in Europe the banners are not yet available?

    Thanks!
     
  11. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,085
    If you are in Europe, then that is likely the reason.

    Otherwise, there may be times where a banner ad is not available, even if you implemented your code correctly. There is an expected ramp up period, but Unity is working toward fulfilling a majority of ad requests.
     
  12. SirYagoMan

    SirYagoMan

    Joined:
    Apr 4, 2018
    Posts:
    2
    Thanks for the confirmation!
     
  13. paulandjean

    paulandjean

    Joined:
    Sep 16, 2017
    Posts:
    1
    Is there some sort of test banner ad that should be coming up when initializing in this way:

    Advertisement.Initialize("0000000", true);
     
  14. Ferannor

    Ferannor

    Joined:
    Aug 14, 2017
    Posts:
    1
    I've release my game last week and just discover this issue with Europe.
    Have you any date to communicate about when this will be fix?

    Thanks.
     
    itayganor and Cenda like this.
  15. mudi_256

    mudi_256

    Joined:
    Jan 17, 2018
    Posts:
    1
    i have an issue with unity banner ads not shown when test mode false . onUnityBannerErrors i receive a message "Banner placement <placemeny ID> is not ready"
    i'm using android studio for showing banner test is working perfect.
    for implementation i follow the unity3d official documentation.
    https://unityads.unity3d.com/help/android/integration-guide-android
     
  16. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,085
    @mudi_256

    Banners are now available in all regions, depending on our available inventory. We're currently working with our demand partners to ensure Unity developers are able to receive bids and impressions. There is an expected ramp up period but Unity is working toward fulfilling a majority of ad requests.
     
  17. Nolex

    Nolex

    Joined:
    Dec 10, 2010
    Posts:
    88
    @ap-unity

    1. I have the same problem.
    I do not see real ads.

    Code (CSharp):
    1. // always return FALSE!!
    2. Debug.Log(Advertisement.IsReady(myPlacement));
    And it does not depend on the callbacks (LoadCallback and ErrorCallback).
    Sometimes it is: "OnLoadBannerSuccess"
    And sometimes it is: "OnLoadBannerFail reason: Banner placement Small_Banners is not ready."

    But Advertisement.IsReady(..) is always FALSE.


    2. Additional question.
    Why did you implement the "Load()" method? :)
    It is not used in your example:

    Code (CSharp):
    1.     void Start () {
    2.         Advertisement.Initialize (gameID, testMode);
    3.         StartCoroutine (ShowBannerWhenReady ());
    4.     }
    5.  
    6.     IEnumerator ShowBannerWhenReady () {
    7.         while (!Advertisement.IsReady ("banner")) {
    8.             yield return new WaitForSeconds (0.5f);
    9.         }
    10.         Advertisement.Banner.Show (bannerPlacement);
    11.     }
    Thanks!
     
  18. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,077
    @ap-unity

    I'm also failing to get live banner ads showing (works fine in the editor, I see the dummy banner). This is the code I'm using:-
    Code (CSharp):
    1. using System.Collections;
    2. using UnityEngine;
    3. using UnityEngine.Advertisements;
    4.  
    5. [RequireComponent(typeof(MonetizationManager))]
    6. public class UnityBannerAd : MonoBehaviour
    7. {
    8.     public string bannerPlacement = "banner";
    9.  
    10.     void Start()
    11.     {
    12.         Advertisement.Initialize(MonetizationManager.Instance.gameId, MonetizationManager.Instance.testMode);
    13.         Debug.Log($"Advertisement.isInitialized {Advertisement.isInitialized}");
    14.  
    15.         StartCoroutine(ShowBannerWhenReady());
    16.     }
    17.  
    18.     IEnumerator ShowBannerWhenReady()
    19.     {
    20.         Debug.Log($"Waiting for banner {bannerPlacement}");
    21.         while (!Advertisement.IsReady(bannerPlacement))
    22.         {
    23.             yield return new WaitForSeconds(0.5f);
    24.         }
    25.         Debug.Log("Banner ready");
    26.         Advertisement.Banner.Show(bannerPlacement);
    27.     }
    28. }
    29.  
    I see the log entry 'Banner ready', so the system thinks it's good to go, but the banner never shows. So I'm not sure if this means there is no ad available to fulfil the request, or if it's something else.

    I be grateful for some advice on whether it's just a case of waiting a bit longer for the banner format to get up to speed or if I'm missing something.

    I should say that the video ads are working fine.
     
  19. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,077
    Update to my previous post. Logcat shows that the banner can't be shown because there is no fill available for it.

    Shame, because I was looking forward to comparing the RPM with what I get from AdMob.
     
  20. itayganor

    itayganor

    Joined:
    Sep 24, 2018
    Posts:
    14
    Same happens for me, Could not show banner due to No fill for placement..
     
  21. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,077
    I guess we need to wait for Unity to sign up some more advertisers for their banner ads service.
     
  22. Nolex

    Nolex

    Joined:
    Dec 10, 2010
    Posts:
    88
    I have information that UnityAds Banners do not work now... :(
    I will try to use other ad networks.
     
    Last edited: Feb 16, 2019
  23. Munchy2007

    Munchy2007

    Joined:
    Jun 16, 2013
    Posts:
    1,077
    I've had a banner show a couple of times now when testing live ads, usually early in the morning and only ever for Amazon. So I assume that it's still an issue of not enough advertisers to fill the requests most of the time.
     
  24. mm1982

    mm1982

    Joined:
    Apr 28, 2015
    Posts:
    25
    are Banner ads working for anyone?

    Test ads work fine, production ads, Ive never seen one. To make it worse, it indicates that it is ready and shown, but nothing is shown on the device, so I cant even fallback to showing an alternative banner since there is no programmatic way of determining if there is actually a visible banner to the user or not
     
    itayganor likes this.