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

Prevent Unity Ads from Asking for Permission (Cookies) when First Played

Discussion in 'Unity Ads & User Acquisition' started by Plundergamesdev, Oct 15, 2019.

  1. Plundergamesdev

    Plundergamesdev

    Joined:
    Mar 5, 2015
    Posts:
    4
    Hello,
    When I install my game on a new device and the first time an ad video plays, Unity Ads is asking for permissions regarding personalized ads (cookies).

    Is there a way to disable this behavior? I didn't saw this in any other app with ads till now and I don't like this kind of interruption.

    I use Unity Ads with the normal Advertisements API and not the Monetarization API. I thought personalized ads are a feature of the latter. So I am kind of confused, why Unity Ads asks for the permission, when I don't use it.

    Does anybody know more? Didn't find something useful over the search.
     
    Arwahanoth likes this.
  2. Arwahanoth

    Arwahanoth

    Joined:
    Jan 25, 2016
    Posts:
    1
    Hello,

    Why no answer ???
     
  3. tritruonglihuhugames

    tritruonglihuhugames

    Joined:
    Mar 25, 2021
    Posts:
    1
    Yes, you can do that. Use my following code to pass the consent flag to Unity Ads SDK. And make the Unity Ads SDK not request cookie permissions for your users by setting this flag to false

    Code (CSharp):
    1. MetaData gdprMetaData = new MetaData("gdpr");
    2.     gdprMetaData.Set("consent", "false");
    3.     Advertisement.SetMetaData(gdprMetaData);
    4. // then Setup Unity ads
    For people who is using Ironsource Mediation and have Unity Ads in waterfall but having the same problem.
    Code (CSharp):
    1. IronSource.Agent.setConsent(false);
    2. // then Setup Unity ads
    Warrning: but if you do that, all ads will not be personalized. The best way I recommend to you is:
    On first opening, You need to show ATT (Application Tracking Transparency) popup. Then if the user clicks Allow then you set the consent to true if the user clicks Don't allow (Require apps not to track) then you set the consent false.
    by the way:
    If you don't want to show ATT in the first time. You need to set consent as false until ATT shows
     
  4. unitynoob24

    unitynoob24

    Joined:
    Dec 27, 2014
    Posts:
    398
    @tritruonglihuhugames My app was just rejected by apple due to this prompt appearing after the tester had declined ATT so it makes it look like my app is still trying to track stuff. I am just using the latest legacy unity ads and was under the impression that I didn't have to handle anything manually. So my question for you is, is there also metadata for CCPA, PIPL or will setting this flag for GDPR make this prompt go away for everything?