Search Unity

Question iOS Rejected Because of Cookie Prompt After User Selects No for Tracking

Discussion in 'Unity Ads & User Acquisition' started by danielexali, Jun 13, 2022.

  1. danielexali

    danielexali

    Joined:
    Dec 10, 2017
    Posts:
    10
    Hello all,

    My iOS game has been rejected by review team saying these with the screenshot below. I am using mediation of unity, initializing mediation first(before consent dialog), then load ads after user consent dialog. What I can do to disable this cookie prompt, what is the correct behaviour to be set up?

    Screenshot-0613-073345.jpg
     
  2. Unity_Jae

    Unity_Jae

    Unity Technologies

    Joined:
    Aug 30, 2021
    Posts:
    50
    Hello danielexali,

    Please copy and paste the below into your rejection appeal to Apple. If your appeal gets rejected then we can escalate to Apple. In case your appeal gets rejected, please contact us.

     
    danielexali likes this.
  3. danielexali

    danielexali

    Joined:
    Dec 10, 2017
    Posts:
    10
    Thanks Jae for the reply.

    So UnityAds does not track the user even if the cookie prompt pops up after user has denied tracking?
    Can't I just tell mediation do not show these messages if user denied tracking?
     
  4. Unity_Jae

    Unity_Jae

    Unity Technologies

    Joined:
    Aug 30, 2021
    Posts:
    50
    About the first question, it is not equal to Unity doesn't collect any data at all. Please check this document for more details. https://unity3d.com/legal/privacy-policy

    And we don't continuously show the consent message. But the message will show up when a user first sees the Unity Ads.

    If you want to use your own consent, which is developer consent, please check the following document. https://docs.unity.com/ads/ImplementingDataPrivacy.html
     
    danielexali likes this.
  5. danielexali

    danielexali

    Joined:
    Dec 10, 2017
    Posts:
    10
    Okay,

    Apple has accepted the request, but to be sure, I set all data privacy flags to "no consent given" after initialization if user has denied tracking(there is no MetaData class in mediation, it can't be possible to set flags before initialization). So even if prompt appears, Unity won't collect any data if I set the flags before that, am I right?

    Thanks for your replies.
     
  6. BillionEyes

    BillionEyes

    Joined:
    Nov 2, 2022
    Posts:
    9

    Can i see your code for this. I am dealing with the same issues.
     
  7. unitynoob24

    unitynoob24

    Joined:
    Dec 27, 2014
    Posts:
    398
    @Unity_Jae I was just rejected for what I think is the same reason. It is super confusing. I am using Unity Ads (the latest legacy, no mediation) Apple review says they declined ATT but then I guess got the unity ad cookie consent message and this is why I was rejected?

    "We noticed you collect data to track after the user selects "Ask App Not to Track" on the App Tracking Transparency permission request.

    Specifically, we noticed your app accesses web content you own and collects cookies for tracking after the user asked you not to track them.

    Next Steps

    To resolve this issue, please revise your app so that you do not collect data for tracking purposes if the user does not give permission for tracking.

    Alternatively, if you do not collect cookies for tracking purposes, revise the cookie prompts that appear in your app to clarify you do not track users."


    It's kind of confusing, basically the app starts up - it shows ATT prompt if its running on iOS then after that I show the general opt-in/opt-out which is for GDPR, CCPA, PIPL (i use ads and analytics) which has backlinks to some privacy policies.

    After that screen it goes to my apps landing screen, where it connects to my server over HTTPS where I basically have a text file that tells the app what mode to be in - this is a one way communication and im using it to change some assets based on what mode I want the app to be in. For example if it is halloween, I can tell the server to notify the app that its halloween and it will change some music and sprites to be spooky lol.

    So I'm not sure specifically what apple is complaining about. They included an image in the rejection which is of a unity ads cookie notification asking the user to accept. Do I need to explicitly tell unity ads about their ATT selection? I also did a quick test with ads in live mode, I declined ATT and then triggered an ad and it did NOT ask me for cookie data, which seems correct. I have reached out asking for clarification to Apple but still have not heard back.
     
    Last edited: Aug 24, 2023
  8. BillionEyes

    BillionEyes

    Joined:
    Nov 2, 2022
    Posts:
    9

    what did you do to resolve it? im dealing with this issue now
     
  9. AsifNaeem

    AsifNaeem

    Joined:
    Apr 12, 2016
    Posts:
    29


    Need help iOS Rejected Because of Cookie Prompt After User Selects No for Tracking - Appeal is also rejected




    I appealed with the text provided by @Unity_Jae and got rejected.
     
  10. unitynoob24

    unitynoob24

    Joined:
    Dec 27, 2014
    Posts:
    398
    @BillionEyes @AsifNaeem
    I'm not sure on the specifics of your applications. But my issue was due to having an ATT prompt where a user could opt out, but then when my ads would run for the first time (unity ads) by default they will also have their own opt in/opt out prompt and Apple doesn't like that. So basically I set a flag to true if the user on iOS opts out of ATT, then BEFORE I initialize my unity ads singleton I run this check and adjust the meta data prior to calling initialize on the advertisment singleton. I also wrapped it with yield return waitforendofframe just to reinforce that these happen one at a time. (totally overkill though) But after making this change Apple accepted me! Hope this helps :)

    Code (csharp):
    1.  
    2. yield return new WaitForEndOfFrame();
    3. if (PlayerProgress.Instance.data.PlayerData.playerDataNewInstall.hasRefusedATT){
    4.     MetaData gdprMetaData = new MetaData("gdpr");
    5.     gdprMetaData.Set("consent", "false");
    6.     Advertisement.SetMetaData(gdprMetaData);
    7.     Debug.Log("User refused ATT.. tell unity ads!");
    8. }
    9. else{
    10.     Debug.Log("User allowed ATT, do nothing!");
    11. }
    12.  
    13. yield return new WaitForEndOfFrame();
    14. Advertisement.Initialize(_gameId, _testMode, this);
    15.  
    16.  
     
    hibbygames likes this.
  11. AsifNaeem

    AsifNaeem

    Joined:
    Apr 12, 2016
    Posts:
    29
    Hello,

    I appreciate your suggestion, but I'm currently utilizing the AdMob SDK along with Unity mediation. Could you please guide me on how to implement the call to `Advertisement.SetMetaData(gdprMetaData);` within this mediation integration?
     
  12. unitynoob24

    unitynoob24

    Joined:
    Dec 27, 2014
    Posts:
    398
    It looks like Google Admob has it's own consent framework that you will need to work with. I'm not sure what version you are using, but something like this possibly?

    Code (csharp):
    1.  
    2. using GoogleMobileAds.Api;
    3.  
    4. // Assuming you have a variable to store the user's consent status.
    5. bool userConsentedToPersonalizedAds = GetUserConsentStatus(); // Implement this function to retrieve the user's consent status.
    6.  
    7. if (userConsentedToPersonalizedAds)
    8. {
    9.    // User has consented to personalized ads.
    10.    ConsentStatus consentStatus = ConsentStatus.PERSONALIZED;
    11.    MobileAds.SetUserAgent("unity", "YOUR_APP_VERSION");
    12.    MobileAds.Initialize(initStatus => {
    13.        // Initialization complete, you can now load and display ads.
    14.    });
    15. }
    16. else
    17. {
    18.    // User has refused personalized ads.
    19.    ConsentStatus consentStatus = ConsentStatus.NON_PERSONALIZED;
    20.    MobileAds.SetUserAgent("unity", "YOUR_APP_VERSION");
    21.    MobileAds.Initialize(initStatus => {
    22.        // Initialization complete, you can now load and display non-personalized ads.
    23.    });
    24. }
    25.  
     
  13. hibbygames

    hibbygames

    Joined:
    Mar 19, 2015
    Posts:
    49
    Your solution worked for me! I had the exact same problem as you, Apple rejected it for the same reason. I'm using Advertisement Legacy 4.4.2. I wasn't smart enough to know how to listen for the player opting out, so I couldn't listen to set a flag, but this worked, I basically pasted your code and then it was approved by Apple

    Code (CSharp):
    1. void startTwo()
    2.     {
    3. //want this to happen AFTER privacyTracking, which is in a Start()//
    4. #if UNITY_IOS
    5.         //prevent stupid cookie popup from appearing if player already declined tracking transparency request on ios//
    6.         var status = ATTrackingStatusBinding.GetAuthorizationTrackingStatus();
    7.         if (status == ATTrackingStatusBinding.AuthorizationTrackingStatus.AUTHORIZED)
    8.         {
    9.             //tracking is authorized, so don't change anything//
    10.         }
    11.         else
    12.         {
    13.             //tracking is not authorized, so prevent Unity from being stupid and asking to track for ads//
    14.             MetaData gdprMetaData = new MetaData("gdpr");
    15.             gdprMetaData.Set("consent", "false");
    16.             Advertisement.SetMetaData(gdprMetaData);
    17.             Debug.Log("User refused ATT.. tell unity ads!");
    18.         }
    19. #endif
    20.  
    21.         Invoke("startThree", 0.1f);
    22.     }
    23.     void startThree()
    24.     {
    25.  
    26.         //want advertisment to initialize AFTER I check if they opted out of tracking, and need to manually tell unity ads not to request more tracking//
    27.         Advertisement.Initialize(gameId, testMode, this);
    28.  
    29.  
    30.    
    31.        
    32.     }