Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Mobile Ads - Simple way to integrate ads in your app

Discussion in 'Assets and Asset Store' started by GleyGames, May 1, 2018.

?

What other advertisers we should add to our plugin?

  1. Facebook Ads

  2. AppLovin

  3. Tapjoy

  4. MoPub

  5. LeadBolt

  6. ironSource

  7. inMobi

  8. Mobusi

  9. Appnext

  10. Appodeal

Multiple votes are allowed.
Results are only viewable after voting.
  1. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    64
    We just reviewed our AdColony implementation. All is working well and is according to the official AdColony documentation.

    The error you are seeing is caused by their SDK and only shows up in Unity Editor. take a look at the following code:

    Capture.PNG

    As you can see, that _sharedInstance will always be null in Unity Editor and their SDK throws an error if that is null. So you can ignore that error, all will work well in build.

    About sharing that implementation with us, is up to you. We do not want to assume credit for your work. You can write us an e-mail at gley.mobi@gmail.com and we can discuss more details about this, and how to make it to be better for all our users and also for you.
     
  2. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    455
    Thank you for checking it and replying promptly! I'll ignore that error as I can verify it's working fine on iOS builds.

    Regarding the Remote Settings, I don't mind sharing so other users can benefit too and if you decide to implement that, it would save me from editing your code with every update. :) I'll send you an email now...
     
  3. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    455
    One question, If I change Advertisements.Instance.SetUserConsent(bool consent); (ie. user changes consent setting) after the initialization will it have any effect for the ads displayed from that point on? Or it only works before the initialization?
     
  4. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    64
    Sorry for the late replay. You are right, indeed this is an issue with our plugin.
    Now if you change the GDPR settings after initialization of the plugin, the new settings will not be used until your game restarts. We will make an automatically reinitialization of the plugin when the GDPR settings are changed in update 1.1.10. We hope we can release the new version at the beginning of next week.

    Thank you for noticing that and for helping us making a better product for all users.
     
    PixelEnvision likes this.
  5. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    64
    We just submitted version 1.1.10 for approval. It should be available in 27 or 28 of August on the Asset Store.
     
    PixelEnvision likes this.
  6. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    64
    The poll at the beginning of the forum will close in 1st of October. The advertiser that has the highest number of votes will be included in our next update.
    Please cast your votes as soon as possible if you want your advertiser to be the first.
     
  7. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    64
    Version 1.2.0 is available on Asset Store
    This version has a new built in feature:
    Remove Ads
    Code (CSharp):
    1. Advertisements.Instance.RemoveAds(true);
    If this is set to true, no banner and interstitial will be displayed in your app.
     
  8. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    64
    We promised that on 1st of October we will pick the next advertiser to ad in our plugin.
    The winner is:
    APPLOVIN.
    Our next update will contain support for Applovin SDK also.

    Keep voting for next SDK. Also if you have another ad suggestions that are not included in that list feel free to post them here.
     
  9. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    64
    As we promised AppLovin support is here:
    Donwload version 1.3.0 from Asset Store and just use it.
    If you already use our asset, just add AppLovin SDK, no change is needed to your code.
    Enjoy!
     
    PixelEnvision likes this.
  10. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    23
    Hi.
    What is the function of cocoapods in all this exactly?

    Other questions:

    1. Is Vungle support resumed now? Have they corrected the issues on their side since August?

    2. Same for adColony.

    3. If I understand it correctly, your system manages the mediation from within the app, based on the weights and order? Is it still possible to use the mediation of certain specific networks instead? In other words, is it possible to use the integration tools of your plugin but rely on an external network's mediation suite?

    4. a. Assuming an absolute beginner level in coding in general, are the methods rather easy to employ and integrate into Playmaker actions? ; b. is there a central script I can paste as a component onto an "Ads" game object that would contain all the methods I need to use, so as to be able to call these methods from inside Playmaker (by having a Playmaker FSM component on the same Ads game object)?
     
  11. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    64
    Hello,

    I will answer your questions in order:

    The Cocoapods is required by Admob, and is a collection of libraries on OSX that manages xCode dependencies. You can find more info about it on the official Admob documentation:
    https://developers.google.com/admob/unity/start

    1. We noticed that Vungle released a new SDK this days, we ware not able to test it. The functionality for Vungle is included in the package right now but we stop the support because their past sdk was not reliable. In our next update we will test again Vungle and resume support for it if it works better then previous version.

    2. AdColony was always working and it works now, there are no known issues with their SDK.

    3. You can do your mediation through Admob or Heyzap(Fyber) just follow their steps on how to do mediation and in our Settings Window you just have to enable Admob, the other networks can be disabled and mediation will work through Admob. Same for Heyzap.

    4. We are not experienced with Playmaker. To call any method from our plugin you have to call from any script Advertisments.Instance.NameOfTheMethod().
    When you call Advertisements.Instance.Initialize() the plugin creates all that it needs to work, so you do not have to ad manually scripts or gameobjects in scene. We do not know if that works with Playmaker or not. We didn`t test that.

    If you are interested we can collaborate in creating Playmaker support for our asset, but right now it does not have.
     
  12. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    23
    Hi,
    Thank you for the information.

    3. So I could "force" the use of the Heyzap mediation system, whilst using your scripts to fetch, show and check ads (and other things) of all types? Are your methods generic enough?

    4. Regarding Playmaker: the above is important because making actions for Playmaker would be easier if the functions are centralized. By that I mean, they're generic (or dynamic?) enough so they are simple, and it's your plugin that will do the dirty work behind the scenes by using network-specific methods, as provided by said networks?
    So a developer would not need to code different PM actions for each network?

    Playmaker actions inherit from FsmStateAction (there's also a variant for advanced stuff), and aside from rewording the start() awake() update() functions and using Playmaker variables (ex: FsmString) which are restricted to fewer types than what's available in Unity's c#, it's not too dissimilar.
    I'm looking for a quick solution but if the code to produce requires that I nearly master the intermediate level, I'm unfortunately too short on time to finish ingesting that much knowledge and all in all it would seem detrimental to my use of Playmaker.
    Otherwise I'd be limited to the networks which have PM actions available, and thus far there's Unity Ads, which I'd rather mediate with other networks to guarantee a better ad coverage.
     
  13. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    64
    3. The Heyzap mediation works by default, you do not have to change anything in our code.
    4. About Playmaker, as we said before, we do not have experience with Playmaker. Send us an e-mail at gley.mobi@gmail.com and we will give you a free voucher to test Playmaker integration yourself and we will help you if you have problems.
     
  14. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    23
    Okay good idea, we'll do it that way. Thx!
     
  15. r137

    r137

    Joined:
    Mar 12, 2018
    Posts:
    7
  16. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    64

    Thanks for pointing that option, currently it is not available in the Admob SDK for Unity but we will look into it and try to implement it as soon as possible since a lot of people are requested for that functionality. We will notify you when we made some progress with that. We hope it will be very soon.
     
    r137 likes this.
  17. r137

    r137

    Joined:
    Mar 12, 2018
    Posts:
    7
    Thanks for quick response.

    I asked for this because I don't want to show a GDPR consent popup to my users. I am using Unity Ads as my main advertisement provider. If there is no ads from Unity ads other providers will be used. As I understand, Unity Ads manages GPDR by it self so user consent dialog is not necessary. But if use Advertisements.Instance.SetUserConsent(false); to be GDPR
    compatible for other providers, this will disable targeted ads for Unity too. My current solutions is comment out all this and let the Unity manage consent by itself:

    Code (CSharp):
    1.         if (consent != GDPRConsent.Unset)
    2.                 {
    3.                     MetaData gdprMetaData = new MetaData("gdpr");
    4.                     if (consent == GDPRConsent.Accept)
    5.                     {
    6.                         gdprMetaData.Set("consent", "true");
    7.                     }
    8.                     else
    9.                     {
    10.                         gdprMetaData.Set("consent", "false");
    11.                     }
    12.                     Advertisement.SetMetaData(gdprMetaData);
    13.                 }

    I am not sure this is the correct way to comply with GDPR but It would be a a nice option to allow Unity ads to manage GDPR compliance by itself. Something like:

    Code (CSharp):
    1. Advertisements.Instance.SetConsentManagement(
    2. GleyMobileAds.SupportedAdvertisers.AdvertiserName, ConsentManagement.ByProvider);
    3.  
    4. Advertisements.Instance.SetConsentManagement(
    5. GleyMobileAds.SupportedAdvertisers.AdvertiserName, ConsentManagement.ByGleyMobileAds);
    6.  
     
  18. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    64
    That is a valid request, we will think about a way to include some king of method to allow developers to set consent by SDK and not overall. Thanks for your suggestion. We will try to include this in our next release.
     
  19. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    23
    Mind you, it's possible that other countries or larger zones may introduce something similar in the near future.

    Perhaps adding "I'm not in the EU thx" button for the moment would suffice.
     
  20. r137

    r137

    Joined:
    Mar 12, 2018
    Posts:
    7
    How can I change from order mediation to percent mediation from json ? I couldn't find any field to select this mode in json file.

    to be clear I need to change SupportedMediation.OrderMediation to SupportedMediation.PercentMediation from json file

    edit:

    I guess I can't change that from json file. As I follow code mediation mode is saved in AssetSettingsData.asset file like this:

    Code (csharp):
    1.  
    2.   debugMode: 0
    3.   bannerMediation: 0
    4.   interstitialMediation: 0
    5.   rewardedMediation: 1
    6.   externalFileUrl: http://.../ads.json
    7.  
    this values can't be changed from json to change mediation mode from order to percent. This is bad :( .

    Do I need to upload a new apk and ipa to change
     
    Last edited: Oct 20, 2018
  21. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    64
    Indeed you ware right. We didn`t notice that before, thank you for pointing that out.
    We will fix that in the shortest time possible, today or tomorrow.
    You can send us an e-mail at gley.moby@gmail.com and we will send you the updated package as soon as it is ready. It takes a couple of days for the Asset Store to approve an update so you will get the update faster this way.
    Sorry for the inconvenience.
     
  22. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    455
    @GleyGames

    Recently new Unity Ads (3.0) released with banner ads, plus Chartboost updated their plugin to 7.3.0 (which seems compatible), can you please check/update those when the time permits?
     
  23. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    64
    Hello,
    We are aware of that updates. Interstitial and Rewarded Videos are compatible with the newest Unity and Chartboost SDKs. If everything goes well we will ad Unity banner support on our next update on 29th of October.
    If you need it sooner let us know.
     
    Adswars and PixelEnvision like this.
  24. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    23
    Hi,
    Fyber/heyzap suggests starting their SDK with the automatic fetching disabled in such conditions:

    I took a look at CustomHeyzap.cs and the SDK is booted with the default option (NO_FLAG... so automatic fetching is on). Obviously the plugin works very well as is. But would it be necessary to fiddle with that option and put the HZ SDK on manual mode or something?

    Oh, btw, they also have an option for forwarding information about the user (gender, education level, location, etc.). This, obviously, for targeted ads.
    Is this handled automatically if we secure the user's consent within the GDPR scope, or does this data need to be manually injected into the SDK too?
     
  25. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    64
    Hello,

    As it says in documentation the automatic fetch should be disabled if you are using another mediation networks. If you want to mediate all your ads through Heyzap, you are not using another mediation network. If you want to mediate for example Admob ads through Heyzap, you should NOT enable Admob ads in our plugin as well, just Heyzap should be ticked.

    To be more specific, any ads you add in your Hayzap Dashboard should not be enabled in our plugin as well. That is what that warning says about.
    If you are mediating through Heyzap the following plugins: AdColony, Admob and Chartboost is ok to enable Unity Ads from our settings window, everything will work well, there are no problems.

    We recommend to add all your ad networks you want to mediate into Heyzap and in our plugin just enable Heyzap network.

    About the other question, that information should be provided to the sdk by your app, and each developer wants to know different informations about the users of his app so we cannot do a generic method to feed that to every ad provider SDK, is beyond the scope of this plugin, sorry :(.
     
  26. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    23
    Yes, I agree with that, I already made tests that way.
    If i'm going to use Heyzap to mediate ads, even if I actually have to add the wanted networks' respective SDKs to the app, although they have to be declared on Heyzap's side (on their dashboard), they must not be selected in the plugin Gley Mobile Ads.
    Then Heyzap will run on automatic fetching because it is doing the mediation.

    Q: But if I use your plugin for the mediation instead, is (are) Heyzap's (and other networks') autofetching turned off?

    In Heyzap's documentation, there's that part I underscored: "..., using another mediation network, ..." and I thought that as your plugin is a mediation tool (although not being a network), Heyzap's SDK may detect that there's something else that is mediating the ads.

    Q2a: So I would need to have scripts talking to each SDK, circumventing the plugin altogether?
    Q2b: And I suppose I would have to do that before initializing the plugin too?



    About the GDPR, the doc says:
    I think that legally speaking, the default setting should actually be false. The point of the GDPR query is to obtain the user's consent. He has to opt in, not out.
    Consider this, from wikipedia:

    The highest level of privacy settings would logically be akin to a refusal from the user. This is ought to be the default setting it would seem.


    Other question.
    Q3: is it possible to allow the user to revoke his consent regarding the GDPR once the various SDKs have been launched?
    I think it may be (almost legally) necessary to add a button in the app's settings menu to allow the user to change his mind and opt out at any time he wishes.

    If it's impossible to do so once the SDKs are running, would we need to:
    • stop the SDKs (through the plugin), change the GDPR consent setting, then relaunch the SDKs during the app's run?
    • or literally store the change of user's decision until the next restart, and perhaps going as far as forcing a reboot of the app?

    Now, the Unity doc provides a clarification too:

    But it could be argued that the " i " isn't intuitive at all and it may be preferable to have a centralized (unified) way to revoke the consent.
     
  27. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    64
    The only problem of the autofetch on is that if you have a lot of ad providers in your app, all ads will be loaded at the beginning of your game and the HDD and CPU of the device will be busy fetching ads and that might cause your app not to run smooth for a 5 seconds until all ads are loaded.
    If you do not autofetch your ads at the beginning, you will have to do manual fetch directly in your game and you will have to fetch a specific network at the time. So with 15 seconds before showing an ad you will have to fetch one. And that time depends on how fast is the users Internet connection. For this reason every ad provider recommends fetching your ads at the start of your app.
    Our plugin has mediation options, but if you are using a single SDK(Heyzap) the implementation follows their documentation strictly. You can check that in our .cs files called Custom[AdvertiserName].cs


    We never provided that kind of information to any advertising SDK and we will not do it in the future. Every ad provider collects enough data by itself to be able to target your app users, you shouldn`t be worried about that. If you still want to do that you can go to Initialize() method in CustomHeyzap.cs and add any optional parameters that you need for your app.


    The all 7 ad providers we are using in our plugin specify in their own documentation that if no consent is provided the default setting is to collect the data so we also set that option this way.
    If you want at the beginning of your app you can by code set the consent to false.


    Yes, you just have to call:

    Advertisements.Instance.SetUserConsent(bool consent);

    If you call this method after the SDK is initialized, each advertiser SDK will do what it takes to update the consent, some will be reinitialized and some will just update a flag, as each of the providers specify in their documentation.
     
  28. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    23
    The most obvious way to deal with this is to load them during a splash screen or even a bit before, when the screen is dark.

    Ok, thx. The legal considerations and Apple's legendary sensitivity are sources of concern regarding this new regulation.

    Indeed, and their way to get out of legal trouble is to tell publishers that they have to query the user about his consent, so they can prove that the user accepted or declined to share his personal data.
    Advertisers (and ad-hungry publishers or other service providers) are obviously going to do anything they can to force targeted ads, hence their default stance, but it needs to be legally consented to by the user.

    Funny you suggest that because that's what I was about to do. Here's my reason:
    All in all, considering the kind of ads I was served with when playing games, I rather struggle to see how "targeted" they were. More precisely, I don't see how any of my personnal data could have possibly made a difference since I was only getting ads about other mainstream video games which were meant for all ages, all genders, all regions; nothing outside of the bounds of only checking the "video games" ads category in a network dashboard.

    Assuming ads don't represent one's only source of revenue, it could be simpler for a video game publisher to set the consent to "declined" by default at the start of the game and never ever annoy players with technical legalese which would just break the immersion and escapism, and to which, if it were properly explained, would more than likely result in him or her declining consent anyway!


    Nice, it's automatic then. :)
    I had this script ready but I had no clue how it would work.
    So I take it that I don't need to "reboot" the plugin on my side.
     
  29. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    23
    If using the Gley Mobile Ads mediation tool, does Unity's free plugin
    Unity Data Privacy Plug-in
    ...needs to be installed too if using Unity Ads?
     
  30. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    64
    That is a good questions, we will have to read about that ourselves and do some documentation and give you a response as soon as possible. That is a relatively new release by Unity and we think it is useful but we will provide you a more detailed information about this next days.
    If it is required we will try to integrate it by default in our plugin.
     
  31. GleyGames

    GleyGames

    Joined:
    Oct 16, 2015
    Posts:
    64
    Version 1.3.3 is now available on the Asset Store

    Changes in this version:
    • Support for Unity Monetization 3.0.0 that includes banner ads(banner ads are not available yet all over the world).
    • Updated plugin to support Chartboost SDK v7.3.0.
    • Fixed some mediation file related bugs.
    • Support for android.gms.play-services-ads-17 and above.
    • Better manifest handling.

    About data privacy unity plugin. is not mandatory if you are using Unity Ads. This is what we understand.