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?
[quote]* 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. Please see attached screenshot for details. It was taken before the first ad showed.
*[/quote]
*
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.
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?
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.
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?
@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.
@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
yield return new WaitForEndOfFrame();
if (PlayerProgress.Instance.data.PlayerData.playerDataNewInstall.hasRefusedATT){
MetaData gdprMetaData = new MetaData("gdpr");
gdprMetaData.Set("consent", "false");
Advertisement.SetMetaData(gdprMetaData);
Debug.Log("User refused ATT.. tell unity ads!");
}
else{
Debug.Log("User allowed ATT, do nothing!");
}
yield return new WaitForEndOfFrame();
Advertisement.Initialize(_gameId, _testMode, this);
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?
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?
using GoogleMobileAds.Api;
// Assuming you have a variable to store the user's consent status.
bool userConsentedToPersonalizedAds = GetUserConsentStatus(); // Implement this function to retrieve the user's consent status.
if (userConsentedToPersonalizedAds)
{
// User has consented to personalized ads.
ConsentStatus consentStatus = ConsentStatus.PERSONALIZED;
MobileAds.SetUserAgent("unity", "YOUR_APP_VERSION");
MobileAds.Initialize(initStatus => {
// Initialization complete, you can now load and display ads.
});
}
else
{
// User has refused personalized ads.
ConsentStatus consentStatus = ConsentStatus.NON_PERSONALIZED;
MobileAds.SetUserAgent("unity", "YOUR_APP_VERSION");
MobileAds.Initialize(initStatus => {
// Initialization complete, you can now load and display non-personalized ads.
});
}
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
void startTwo()
{
//want this to happen AFTER privacyTracking, which is in a Start()//
#if UNITY_IOS
//prevent stupid cookie popup from appearing if player already declined tracking transparency request on ios//
var status = ATTrackingStatusBinding.GetAuthorizationTrackingStatus();
if (status == ATTrackingStatusBinding.AuthorizationTrackingStatus.AUTHORIZED)
{
//tracking is authorized, so don't change anything//
}
else
{
//tracking is not authorized, so prevent Unity from being stupid and asking to track for ads//
MetaData gdprMetaData = new MetaData("gdpr");
gdprMetaData.Set("consent", "false");
Advertisement.SetMetaData(gdprMetaData);
Debug.Log("User refused ATT.. tell unity ads!");
}
#endif
Invoke("startThree", 0.1f);
}
void startThree()
{
//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//
Advertisement.Initialize(gameId, testMode, this);
}
I got this screenshot with "Guideline 5.1.2 - Legal - Privacy - Data Use and Sharing
" error
The app accesses web content you own where you collect cookies. Cookies may be used to track users, but you do not use App Tracking Transparency to request the user’s permission before collecting data used to track.
Apps need to receive the user’s permission through the AppTrackingTransparency framework before collecting data used to track them.
Did you add it in Xcode in the plist? in info.plist add “Privacy - Tracking Usage Description” and write something beside it like “Pressing ‘Allow’ uses your data for more relevant ad content”
Then it will have an authorization popup when the app is opened for the first time.
Do you have the code other people posted above where they check if the user gave authorization by accepting the popup?