Search Unity

App rejected because Unity Ad's own data collection permission request violates ATT guidelines.

Discussion in 'Unity Ads & User Acquisition' started by krisventure, May 2, 2021.

  1. krisventure

    krisventure

    Joined:
    Mar 24, 2016
    Posts:
    118
    How can I disable the permission request by Unity Ads to collect data?
    It's violating Apple's new App Tracking Transparency guidelines by repeating the same question that was already asked in the ATT prompt. And if I remove Unity's own permission request, will Unity Ads detect whether or not the user's accepted or denied the ATT request (IDFA zeros or not)?

    More details:

    Our game has just been rejected on the ground of violating ATT guidelines because "A message asks users to reconsider their decision after they deny permission." And the screenshot attached by Apple to highlight the problematic part is a screenshot showing the permission request by Unity's Advertisement package to collect user data.

    Here is the full Apple feedback below and I've attached the screenshot by the Apple Reviewer showing the problematic permission request by Unity Ads.

     

    Attached Files:

    Last edited: May 2, 2021
  2. IvyKun

    IvyKun

    Joined:
    Sep 28, 2013
    Posts:
    132
    Unity Ads (or any other network) doesn't show ATT popup. What you see there is the GDPR popup, that is mandatory to show for EU users.

    But I understand that it should not be shown if you have previously shown the ATT popup and the user has denied it.

    Take a look at this:
    https://unityads.unity3d.com/help/resources/ios14-publisher-guide

    Make sure you're using Unity Ads 3.5.1 or higher.

    What you could do is don't initialize unity ads until you have shown the ATT popup, and wait until the user clicks on it.

    After that you initialize Unity Ads, and unity ads should take into account the user choice. If they don't have access to the IDFA they probably won't show the GDPR popup.

    But if they do (I'm not sure because I use admob mediation), what you have to do is pass the GDPR consent to Unity Ads before initializing, so they don't show that popup ever. I do that in my games and mediation. I show my custom dialog and pass the consent to them.

    You can see here how to do it (first bit of code)
    https://unityads.unity3d.com/help/legal/data-privacy-and-consent

    So if the user has denied the tracking, you just set the consent to false before initializing unity ads and that popup will not be shown.
     
    ngduykhanh, AxPetre and krisventure like this.
  3. krisventure

    krisventure

    Joined:
    Mar 24, 2016
    Posts:
    118

    @IvyKun Thank you for the reply, that's very helpful. I'm going to try and see if I can pass the ATT response to the Unity GDPR request to avoid it showing. I'll report my findings back here.

    And yes I'm already initializing Unity Ads AFTER the ATT pop-up. It doesn't take ATT response into account. Even if user denies ATT, Unity will show their dialogue again which comes off as urging / pressuring the user to reconsider their decision - the way Apple phrased it.

    Unity should hopefully realize that the GDPR pop-up is now redundant and since Apple started to reject apps they should add an easy to check / uncheck option in the Player / Other settings or just build some solution that automatically catches the ATT responses.

    Anyway, I'll keep you posted with the consent flag solution you suggested, it sounds very simple too.
     
  4. IvyKun

    IvyKun

    Joined:
    Sep 28, 2013
    Posts:
    132
    Yeah it's just 3 lines of code before initializing unity ads, that should be enough ;)
     
    krisventure likes this.
  5. krisventure

    krisventure

    Joined:
    Mar 24, 2016
    Posts:
    118
    @IvyKun I can confirm that after adding this code, Unity stopped showing the redundant GDPR consent window and our game's got accepted by Apple. Thank you again!
     
    Gametyme, jussikuosa_unity and IvyKun like this.
  6. IvyKun

    IvyKun

    Joined:
    Sep 28, 2013
    Posts:
    132
    Niiiice!
     
  7. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    612
    Do you show your ATT pop up immediately on first run of the game?

    I was wondering if it's acceptable to wait until player finishes a game or something to increase the consent rate.
    Probably add a custom dialog too explain the tracking uses before prompting the user with the native ATT popup.
     
  8. studentvz

    studentvz

    Joined:
    Dec 14, 2014
    Posts:
    149
    You could do that but I would not worry too much (unless you are doing UA and every percent matters to you). I was also very skeptical about upcoming ATT and zeroed IDFA, but from my stats (2K installs per day, 5K DAU):
    40% of DAU have zeroed IDFA (denied tracking)
    zeroed IDFA has around 10-15% lower ARPU than non-zeroed IDFA
    Overall that is around a 7% drop due to the new ATT, I was expecting more like a 25% drop. As more people migrate to iOS14 this 7% will increase to 10-15% but I'm sure that till that time ad networks will figure out some way to "fix" zeroed IDFA issue.
     
    krisventure and xjjon like this.
  9. krisventure

    krisventure

    Joined:
    Mar 24, 2016
    Posts:
    118
    No this wouldn't be allowed. First, Apple rejects apps that show any dialogue before or after the ATT that would try to convince people to opt in. They call it 'urging or manipulating user. Second, Apple also makes it clear that the ATT has to appear before any attribution tracking starts. At the moment as I know most SDKs (GameAnalytics, Facebook SDK, Unity Analytics) would immediately send the attribution data back to attribute the install as soon as you initialize them (or maybe even before, Im not sure). So I think right now you have to show the ATT window on your app launch screen before anything else. I couldn't find that info now so I may be wrong about this one. But you're definitely not allowed to collect data before the ATT is shown. The recommended approach is to show the ATT on a screen with a nice image showing some of your game in the background rather than just a solid color, they say those prompts got better consent rates. Also, prompts with max 12-14 words in the customizable message got better results than very long texts.
     
  10. IvyKun

    IvyKun

    Joined:
    Sep 28, 2013
    Posts:
    132
    It's better to show it at the beginning so when you load your first ads, they will use IDFA if the user has opted in. Also is what everyone it's doing.

    About adding a custom dialog it could improve opt-in rates, you can do that and apple allows it.
    I have it and had no problem, look at what instagram, facebook, tiktok have written on their custom dialogs.

    Apple allows it as long as it's explanatory and not trying to force the user to give consent. So you could write something like hey, give us consent so we can show personalized ads to you, or you will help maintaining this app free, etc. But you cannot say something like give us consent and you will get some extra coins or you will see less ads etc, then is when apple could reject it.
     
  11. krisventure

    krisventure

    Joined:
    Mar 24, 2016
    Posts:
    118

    I've found a couple of articles and forum discussions arguing that the ATT consent cannot be accepted as a consent for the GDPR so it would be illegal to hide the GDPR window and only show ATT. This article suggests one should do the other way around, hide the ATT prompt and show the GDPR prompt only.
    "Apple have started rejecting apps from being submitted to the AppStore that contain both the ATT dialog and a GDPR dialog. As we cannot convince Apple that GDPR is legally required, we need to stop the ATT dialog from being shown."

    I find this very confusing because I didn't think Apple would accept the GDPR pop up as a replacement but I may be wrong. But if this is correct, everyone already using GDPR dialogues should somehow detect if the user is in the EU and remove ATT dialogues for those users. Any thoughts?
     
  12. krisventure

    krisventure

    Joined:
    Mar 24, 2016
    Posts:
    118
    @IvyKun Good point, upon further reading ( https://github.com/Gimu/admob_consent/issues/6 ) I see that people who reported rejection due to "your app displays its own permission request prompt to the user before presenting the iOS permission request." managed to get their apps accepted eventually by re-phrasing their custom dialogue not to sound like a consent window but more like an explanation (eg. changing 'Allow' button to 'Ok' etc).
     
  13. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    612
    It seems you are allowed to show custom dialog before. I found documentation (scroll to bottom section) from apple that even suggests you to do it for a better user experience.


    Facebook example:



    I did some digging and it seems the opt-in basically allows you to access a non-zeroed IDFA for the user.

    The new prompt is just to get permission to access the users IDFA - even if they opt out, you can still send analytics and tracking, just wouldn't be able to use IDFA so your tracking most likely won't work cross-app / cross-network (at least with IDFA method)

    So it seems if your flow was the following:

    * initialize game (analytics, ads, etc)
    * player plays game (finishes 1 or 2 rounds)
    * show ad (will use zeroed out IDFA)
    * player plays game
    * show ATT prompt

    * next time you show ad/analytics, will be able to use IDFA

    So you may have initial data un-attributed, but after they accept, future runs of the game should be OK. The trade off being that you most likely will have higher consent rates if the player has played a few rounds (they like your game) and then you can explain the ATT to them.
     
    krisventure likes this.
  14. nickculbertson

    nickculbertson

    Joined:
    Oct 22, 2013
    Posts:
    7
    I choose not to show the prompt on my apps with ads. It may result in lower revenue, but I doubt many users will consent to tracking anyways.
     
  15. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    612
    I believe if you don't implement it they will flag you on the review process unless you remove the 3rd party ad libraries?

    This is cause if you don't show the prompt, the user does not see the setting to toggle ATT in their iOS settinsg
     
  16. krisventure

    krisventure

    Joined:
    Mar 24, 2016
    Posts:
    118
    @xjjon Interesting stuff, thanks for the info! I'll probably try that too.
     
  17. nickculbertson

    nickculbertson

    Joined:
    Oct 22, 2013
    Posts:
    7
    You might be right. I'm honestly not sure how it works now since iOS 14.5 dropped. In my updates prior to its release, I was able to include the skadnetwork details without including the ATT framework. I believe having the ATT framework included or the ATT explainer text in the info.plist is how they know to check for the prompt in review. My assumption is that all apps will return a device ID of 0's until the user accepts tracking. So not showing the prompt should have the same effect as a user selecting "don't track." I first got the idea of not showing the prompt when I read in another ad provider's docs "If you decide to include App Tracking Transparency (ATT) in your app..." I think I'll try submitting my updates without ATT, and if it is rejected, I'll adjust and go from there.
     
  18. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    612
    Just an update regarding what Apple will approve.

    1 - Submitted without ATT prompt integration - rejected. They allowed us to push update since it was a bug fix, but required us to add ATT or remove tracking by next version.

    2 - Integrated ATT prompt with custom dialog. The custom dialog explains to users what the tracking is used for, how it personalizes the ads, and how it helps the game earn more from ads (and therefore support the devs).

    This dialog shows up after the player plays 3 rounds of the game.

    Apple rejected on first review. In follow up message (resolution center) explained to the review how to see the prompt (enter and exit the game 3 times (3 rounds)). APPROVED.

    So it seems they are checking info.plist but also manually seeing if the prompt shows up.
     
    danishgoel and Sailendu like this.
  19. codebaby2

    codebaby2

    Joined:
    Apr 11, 2021
    Posts:
    6
    Also dealing with this problem, thanks for the advice @IvyKun .
    Just curious though @krisventure, how did u get those stats (2K installs per day, 5K DAU), that's a lot, do u use any app store optimisation?
     
  20. krisventure

    krisventure

    Joined:
    Mar 24, 2016
    Posts:
    118
    I think you're referring to @studentvz 's comment. I didn't mention my installs / DAU anywhere. Btw whether 2K installs per day is a lot or not that depends on a lot of things. For example it's easy to get 2K installs a day if you run worldwide campaign on a daily budget of $20-$40, There'll be thousands of users in downloading it from the cheapest countries like Iraq, India etc. You can easily achieve a cost per install of 3c-10c in those countries. Then again, advertisers will pay very little for an ad impression coming from those users and they'll also not spend on IAPs. On the other hand 2K installs in the US is much harder to get and the return value of in-app ads and IAPs is much higher there. So it really depends.
     
  21. codebaby2

    codebaby2

    Joined:
    Apr 11, 2021
    Posts:
    6
    Oh sorry, my mistake, but still thanks for getting back to me. I see, didn't really think about that to be honest but defo could be a good strategy, it makes a lot of sense also, I'm trying to get my user numbers up so i might try it out and just see how it goes. But yh I get that, I guess people in the US would probably spend a lot more.
     
  22. Roman_34

    Roman_34

    Joined:
    Nov 1, 2018
    Posts:
    19
    Hello! Apple rejected our application because we need an ATT request dialog now.
    I used this documentation:
    https://unityads.unity3d.com/help/monetization/ios14
    https://unityads.unity3d.com/help/unity/integration-guide-unity

    that is, I updated the Advertisement plugin from the Unity's Package Manager to version 3.7.1
    then I also installed the plugin "iOS 14 Advertising Support" from the Package Manager.
    Updated C# code:
    #if UNITY_IOS
    // Check the user's consent status.
    // If the status is undetermined, display the request request:
    if (ATTrackingStatusBinding.GetAuthorizationTrackingStatus()
    == ATTrackingStatusBinding.AuthorizationTrackingStatus.NOT_DETERMINED) {
    ATTrackingStatusBinding.RequestAuthorizationTracking();
    }
    #endif


    But now my project doesn't compile in XСode when I build it from Unity with the command "Build and Run".
    I get syntax errors in classes Libraries/Plugin/iOS/UnityAdsPurchasingWrapper.h:
    Expected identifier or '('
    and many errors in class Libraries/Plugin/iOS/UnityAdsUtilities.h
    the compiler just doesn't understand the syntax of declarations in the methods
    inline Il2CppChar* Il2CppStringFromNSString(NSString* str)
    inline Il2CppChar* Il2CppStringFromNSData(NSData* data)
    this declaration:
    Il2CppChar* buffer = new Il2CppChar[len + 1];

    Can anyone help me with this?
     
  23. codebaby2

    codebaby2

    Joined:
    Apr 11, 2021
    Posts:
    6
    Before I've tried to Build and Run on my laptop but it hasn't really worked for me, Build alone worked for me, one thing that might work would be to only Build (but not run), then open the resulting xcode project from the finder.
     
  24. Toastbyte

    Toastbyte

    Joined:
    Sep 1, 2016
    Posts:
    54
    Hi, I am having the same issue as you, @krisventure

    I implemented the ATT dialog box using the recommended iOS 14 support package, but the Unity Ads cookie banner pops up right after the ATT dialog box. This lead to Apple rejecting the binary, because -as you also mentioned- it comes off as pressurizing the user into accepting.

    I saw the links that were posted but am still unsure how to solve the problem.
    On the website (Data privacy and consent - Knowledge base (unity3d.com)) I gather that I am able to manually tell unity ads whether the user accepted or rejected tracking from the ATT dialog box, so the GDPR box doesn't show up, but I don't understand where I can find the answer of the user at the ATT prompt. Is there a hidden variable under some library, where I can read that response from?

    I also suppose I have to move the Unity ads installation from my Awake() or Start() function, because by then the user hasn't yet responded to the ATT tracking dialog box? Should I initialize the ads way later, for example when the user presses the play button on the menu screen of my app?

    I would really appreciate a response :)
     
  25. ltomov

    ltomov

    Joined:
    Aug 3, 2017
    Posts:
    96
    With AdMob if the user unchecks the consent checkboxes no ads are shown.
    So if you don't show the GDPR consent popup, doesn't that mean that anybody who rejects the ATT prompt (which as per my stats are ~70%) is not shown ads? Or does the mediation network fill in these gaps?

    Also I'm pretty sure that's not legally allowed, there's a clause in GDPR that seems to say users need to be given a choice to customise their consent and not just one "yes/no" question (I'm no lawyer though, I may be wrong). That's here, point "3.1.3 Granularity":
    https://ec.europa.eu/newsroom/article29/items/623051


    I'm in that position right now. I tried completely removing IDFA for everybody, but Apple still reject the app with no explanation. Just some boilerplate quote saying "You are tracking users, so you must show the ATT prompt and remove the GDPR consent screen. Or you may choose to remove the tracking.".
    I choose to remove the tracking and ask what other functionality I need to remove (I don't do anything else that could be qualified as "tracking", the ads are using SKAdnetwork which they specifically say does not require the ATT prompt), but again - rejection with no explanation, just that boilerplate quote.

    Pretty confusing...
     
  26. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    612
    You can check consent status by calling this from the unity package:

    ATTrackingStatusBinding.GetAuthorizationTrackingStatus();

    --

    For all the games I work on we don't show any ATT dialog until around 5 minutes of the user playing. They CAN view ads before seeing ATT dialog, just no IDFA is available.

    Apple will accept ATT implementations that use custom dialog and you can choose when to show the prompt. You just need to include in your review submissions directions on how the reviewer can see the prompt.
     
    Toastbyte likes this.
  27. JuicyBeetleGames

    JuicyBeetleGames

    Joined:
    Sep 15, 2019
    Posts:
    3
    Hey everyone! I would love to know what everyone is doing when a user "Declines" consent? Are you still showing ads, and if so, how?

    I found out that even non-personalized ads still have a form of tracking involved with them - https://support.google.com/admanager/answer/9005435?hl=en

    Or, are you just turning ads completely off when a user declines the consent? If so, that would be horrid, since all users could just turn off your ads with a click of a button, and without having to IAP.

    I'm trying to find a way to change tracking information in real-time within my app in order to accommodate for this change, but I'm a little stuck knowing exactly what to change in Unity Ads Dashboard (monetization). I though it was something to do with the 'Acquire Optimization' section, but I'm not entirely sure....

    Any help would be fantastic!

    Cheers,
     
  28. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    612
    Still show ads.

    The consent is just for being able to get the users IDFA. Other than asking the prompt, you don't / shouldn't modify any of your existing ad client logic.
     
  29. JuicyBeetleGames

    JuicyBeetleGames

    Joined:
    Sep 15, 2019
    Posts:
    3
    So essentially, if they click "accept", then Unity Ads will receive their IDFA, and if "declined", then it will return with 0's? But in terms of the ads and such, I won't need to do anything on them, and can continue showing them as normal?
     
  30. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    612
    Yeah that is correct
    Returning 0s for IDFA will just impact the tracking and attributions but they can still be shown ads.

    Btw Google is adding this same behavior to Android soon.
     
  31. JuicyBeetleGames

    JuicyBeetleGames

    Joined:
    Sep 15, 2019
    Posts:
    3
    Awesome! Thanks Xjjon. Now I just need to know how to implement this into the game. Using Block based programming, so need to wait for support.
     
  32. Toastbyte

    Toastbyte

    Joined:
    Sep 1, 2016
    Posts:
    54
    Hey @xjjon , thanks for your response.

    Something is still not clear to me.

    Suppose I have a game with unity ads ready to be published for iOS devices and I have implemented the ATT dialog to display 5 minutes into gameplay. What happens during those first 5 minutes of gameplay where the player has neither accepted nor denied the ATT dialog? Am I supposed to manually put something into my code that tells unity ads that no tracking request has happened yet, or does unity ads automatically recognize that there was no dialog box and automatically doesn't track the data of the player until they have accepted the ATT tracking request?

    What I gather from this thread, is that ATT is something optional developers can implement whenever they want during gameplay (not necessarily on startup of a game) to improve ad performance, because by default unity ads doesn't use tracking without having displayed before the ATT dialog box. Please correct me if I'm wrong.
     
    Last edited: Jun 5, 2021
  33. IvyKun

    IvyKun

    Joined:
    Sep 28, 2013
    Posts:
    132
    @Toastbyte you're right but is not something the ad network does, is the operating system.
    When an ad network or other SDK ask for the IDFA, iOS will send all zeroes unless the user has accepted tracking.

    That's why the sooner you show the ATT dialog the better. Because until you do, all ads are going to be not personalized.
     
    Toastbyte and xjjon like this.
  34. xjjon

    xjjon

    Joined:
    Apr 15, 2016
    Posts:
    612
    Partially correct. ATT is NOT optional as Apple will reject your app if you do not implement the prompt (unless you don't use any ads / tracking at all. So you must implement it.

    The reason you don't need to change any of your existing ad logic (except to show the prompt somewhere) is basically what @IvyKun mentions. The ad client basically will call something like GetIDFA() (which is from Apple) which will either return the IDFA of the user (if they opt-in) or something like '0000-0000-0000-0000-0000' if they decline or haven't been shown the prompt yet.
     
    IvyKun and Toastbyte like this.
  35. oliverwigren

    oliverwigren

    Joined:
    Jun 10, 2020
    Posts:
    5
    Can someone please show the code how you implanted the code to not show the Unity Ads prompt, don't get how it should be.
     
    shacharoz likes this.
  36. Ebonyblack

    Ebonyblack

    Joined:
    May 20, 2021
    Posts:
    1
    Can you show me how we can Initialize unity ads after the user approval
     
    shacharoz likes this.
  37. shacharoz

    shacharoz

    Joined:
    Jul 11, 2013
    Posts:
    98
  38. shacharoz

    shacharoz

    Joined:
    Jul 11, 2013
    Posts:
    98
    private void SetConsent(bool isConsent=false)
    {
    // user selection of sending their personal identifiable information outside of China:
    MetaData piplMetaData = new MetaData("pipl");
    piplMetaData.Set("consent", isConsent.ToString());
    Advertisement.SetMetaData(piplMetaData);

    // user selection of targeted advertising:
    MetaData gdprMetaData = new MetaData("gdpr");
    gdprMetaData.Set("consent", isConsent.ToString());
    Advertisement.SetMetaData(gdprMetaData);

    // user selection of targeted advertising:
    MetaData privacyMetaData = new MetaData("privacy");
    privacyMetaData.Set("consent", isConsent.ToString());
    Advertisement.SetMetaData(privacyMetaData);
    }


    I have wrote this, which just collects the 3 sections together. will this work?
    https://unityads.unity3d.com/help/l...91.1311499358.1639240500-725924689.1587559245
     
  39. shacharoz

    shacharoz

    Joined:
    Jul 11, 2013
    Posts:
    98
  40. hassaansandhu

    hassaansandhu

    Joined:
    May 26, 2021
    Posts:
    1
    Ca you post those three lines of code and where to use those lines.
     
    SamHancock-Smith48 likes this.
  41. nodatauk

    nodatauk

    Joined:
    Oct 30, 2022
    Posts:
    1
    https://docs.unity.com/ads/GDPRCompliance.html

    Swift:
    ```
    let meta = UADSMetaData()
    meta.setRaw("gdpr.consent", value: false)
    meta.commit()
    ```

    Objc
    ```
    UADSMetaData *gdprConsentMetaData = [[UADSMetaData alloc] init];
    [gdprConsentMetaData set: @"gdpr.consent" value: @no];
    [gdprConsentMetaData commit];
    ```