GDPR & ATT Consent
Privacy compliance for EU users and iOS App Tracking Transparency.
Required for Full mode. Optional but recommended for Prototype.
Why You Need This
- GDPR: EU law requires user consent before collecting data
- ATT: iOS 14.5+ requires permission for cross-app tracking
- App Store: Required for approval in EU regions
1. AdMob Setup (GDPR)
- Create account at admob.google.com
- Add your app
- Go to Privacy & messaging → GDPR
- Click Create message
- Configure:
- Select your app
- Customize consent form appearance
- Enable Custom ad partners
- Add: AppLovin, AdMob, Meta, Unity
- Click Publish
2. Unity Setup
- Open AppLovin → Integration Manager
- Under Mediated Networks, install Google Ad Manager (or Google AdMob). This is required - MAX uses the Google Mobile Ads SDK to render the UMP consent form. Without it, only the MAX privacy popup appears, not the GDPR CMP dialog.
- Enable MAX Terms and Privacy Policy Flow
- Set Privacy Policy URL (your company's policy)
- Set User Tracking Usage Description:
This identifier will be used to deliver personalized ads to you. - Click Save
3. Add Privacy Button
GDPR requires users to change consent anytime. Add to your settings:
using Sorolla.Palette;
using UnityEngine;
using UnityEngine.UI;
public class SettingsScreen : MonoBehaviour
{
[SerializeField] Button privacyButton;
void Start()
{
// Only show if user is in GDPR region
privacyButton.gameObject.SetActive(Palette.PrivacyOptionsRequired);
privacyButton.onClick.AddListener(OnPrivacyClicked);
}
void OnPrivacyClicked()
{
Palette.ShowPrivacyOptions(() => {
Debug.Log("Privacy settings updated");
});
}
}
Testing
- Build to device
- First launch should show consent dialog
- Use Debug UI to verify consent status
- To test again: Delete app and reinstall
Reset Consent (Testing Only)
Use Debug UI → Privacy → Reset Consent to test the flow again.
API Reference
// Check if privacy button should be shown
bool showButton = Palette.PrivacyOptionsRequired;
// Current consent status
ConsentStatus status = Palette.ConsentStatus;
// Can ads be shown?
bool canShow = Palette.CanRequestAds;
// Show privacy options dialog
Palette.ShowPrivacyOptions(onComplete: () => { });
Troubleshooting
| Issue | Solution |
|---|---|
| Dialog not showing | Verify GDPR message is published in AdMob AND Google Ad Manager adapter is installed in MAX Integration Manager |
| ATT not appearing | iOS 14.5+ only, shows once per install |
| Consent always denied | Check Privacy Policy URL is valid |
| Ads not loading after consent | Wait for consent callback to complete |