Targeting

This guide explains how to provide targeting information to an ad request.

Prerequisites

Complete Get Started. Your Unity app should already have the Google Mobile Ads Unity plugin imported.

AdRequest

The AdRequest object collects targeting information to be sent with an ad request.

Gender

If your app already knows a user's gender, it can provide that information in the ad request for targeting purposes. The information is also forwarded to ad network mediation adapters if mediation is enabled.

AdRequest request = new AdRequest.Builder()
        .SetGender(Gender.Male)
        .Build();

Birthday

If your app already knows a user's birthday, it can provide that information in the ad request for targeting purposes. This information is also forwarded to ad network mediation adapters if mediation is enabled.

AdRequest request = new AdRequest.Builder()
        .SetBirthday(new DateTime(1985, 1, 1))
        .Build();

Designed for Families setting

If your app is opted into Google Play's Designed for Families program and you show ads in your app, you need to ensure those ads comply with the Designed for Families program requirements and ad policies.

Ad requests can be tagged as Designed for Families by setting the is_designed_for_families parameter to true in the extras:

AdRequest request = new AdRequest.Builder()
        .AddExtra("is_designed_for_families", "true")
        .Build();

For more information on implementing this setting, check out the Designed for Families help center article.

Child-directed setting

For purposes of the Children's Online Privacy Protection Act (COPPA), there is a setting called "tag for child-directed treatment."

As an app developer, you can indicate whether you want Google to treat your content as child-directed when you make an ad request. If you indicate that you want Google to treat your content as child-directed, we take steps to disable IBA and remarketing ads on that ad request. The setting can be used with all versions of the Google Play services SDK via AdRequest.Builder.TagForChildDirectedTreatment():

  • Call TagForChildDirectedTreatment on AdRequest.Builder with the argument true to indicate that you want your content treated as child-directed for the purposes of COPPA.
  • Call TagForChildDirectedTreatmenton AdRequest.Builder with the argument false to indicate that you don't want your content treated as child-directed for the purposes of COPPA.
  • Do not call TagForChildDirectedTreatment if you do not wish to indicate how you would like your content treated with respect to COPPA in ad requests.

The following example indicates that you want your content treated as child-directed for purposes of COPPA:

AdRequest request = new AdRequest.Builder()
        .TagForChildDirectedTreatment(true)
        .Build();

By setting this tag, you certify that this notification is accurate and you are authorized to act on behalf of the owner of the app. You understand that abuse of this setting may result in termination of your Google account.

Send feedback about...

AdMob for Unity
AdMob for Unity
Need help? Visit our support page.