Googleads-mobile-unity: What is the proper way to set Child Directed Treatment?

Created on 1 Jul 2020  路  1Comment  路  Source: googleads/googleads-mobile-unity


Hello,

Sorry if this is not the right place to ask this question.

In your sample code googleads-mobile-unity/samples/HelloWorld/Assets/Scripts/GoogleAdMobController.cs, what is the purpose of setting TagForChildDirectedTreatment.Unspecified

RequestConfiguration requestConfiguration =
            new RequestConfiguration.Builder()
            .SetTagForChildDirectedTreatment(TagForChildDirectedTreatment.Unspecified)
            .SetTestDeviceIds(deviceIds).build();

MobileAds.SetRequestConfiguration(requestConfiguration);

Later inCreateAdRequest() you call TagForChildDirectedTreatment(false), which I suspect serves the same purpose. The same goes for test device ids.

Could you please explain which way of setting Child Directed Treatment is preferred and what happens if both ways are being used with different parameters?

Thank you.

Most helpful comment

Hi @khdhhde21 - indeed, for support debugging your apps, can we request that you make a request on our support forum at https://groups.google.com/forum/#!categories/google-admob-ads-sdk/game-engines - they will be able to help debug your issue with you efficiently.

To answer your question though, you should only need to set TagForChildDirectedTreatment when you are actually setting the value to True, in other cases there isn't any value in setting it apart from changing from True back to False or Unspecified. The API you used is correct. If you set it multiple times, the most recent setting applies.

You can find more information on this in our documentation.

Hope that helps.

>All comments

Hi @khdhhde21 - indeed, for support debugging your apps, can we request that you make a request on our support forum at https://groups.google.com/forum/#!categories/google-admob-ads-sdk/game-engines - they will be able to help debug your issue with you efficiently.

To answer your question though, you should only need to set TagForChildDirectedTreatment when you are actually setting the value to True, in other cases there isn't any value in setting it apart from changing from True back to False or Unspecified. The API you used is correct. If you set it multiple times, the most recent setting applies.

You can find more information on this in our documentation.

Hope that helps.

Was this page helpful?
0 / 5 - 0 ratings