Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Admob Mediation with Unity Ads Advertising Id Problem For Kid Game

Discussion in 'Unity Ads & User Acquisition' started by beisoftstudio, May 10, 2022.

  1. beisoftstudio


    Apr 16, 2018
    Hello i have kid games on google play. I am using admob mediation and its show admob and unity ads. I got mail about
    "Apps targeting children should not transmit the following from children or users of unknow age:
    • Android Advertising ID (AAID)
    • SIM Serial
    • Build Serial
    • BSSID
    • MAC
    • SSID
    • IMEI
    • IMSI "
    I understood what changes to make on the Admob side. But the admob document did not tell me what to do for unity ads. It just says you can do the following in optional steps. "
    Follow the instructions below to enable or disable personalized ads for Unity Ads.

    Unity Ads provides a GDPR Compliance guide that describes both automatic and manual solutions for user consent.

    The Google Mobile Ads mediation plugin for Unity Ads version 1.1.2 adds the UnityAds.SetGDPRConsentMetaData() method. The following sample code shows how to pass consent information to the Unity Ads SDK manually. If you choose to call this method, it is recommended that you do so prior to requesting ads via the Google Mobile Ads SDK.
    Code (CSharp):
    1. using GoogleMobileAds.Api.Mediation.UnityAds;
    2. // ...
    4. UnityAds.SetGDPRConsentMetaData(true);

    It is not enough for me to state from the Unity dashboard that the game is for children under the age of 13. Because I got the same email for another child app that only shows unity ads (
    children under the age of 13 selected on dashboard). Its solution is explained in this link in unity document

    So what do I need to do to make the unity ads that I display with admob mediation comply with google family policy according to the new regulation. Thanks in advance
  2. Unity_Jae


    Unity Technologies

    Aug 30, 2021
    Hello beisoftstudio,

    The Unity Ads SDK needs a signal from the application prior to initialization, in order to prevent transmitting any device IDs from the user’s physical device.

    So, you should set metadata before initialing the ads SDK. Below is the example,

    Code (CSharp):
    1. private void Awake() {
    2. ...
    3.    MetaData metaData = new MetaData("privacy");
    4.    metaData.Set("mode", "app"); // This app is directed at children; no users will receive personalized ads.
    5.    Advertisement.SetMetaData(metaData);
    6. ...
    7.    Advertisement.Initialize(_gameId, _testMode, this);
    8. }
    However, If you integrate the UnityAds SDK through 3rd party mediation (for example, AdMob, MAX, ironSource, etc.) you should follow their documentation and contact them for any questions.

    So in your case, please follow the instruction from Google you've mentioned.

    Code (CSharp):
    1. using GoogleMobileAds.Api.Mediation.UnityAds;
    2. // ...
    4. UnityAds.SetGDPRConsentMetaData(true);
    If you have any other questions, please let me know.
    beisoftstudio likes this.