-
Notifications
You must be signed in to change notification settings - Fork 4
Targeting
Functions for targeting ads to the right audience. All of these must be called before admob_initialize.
This module offers a collection of functions designed to address specific tasks and provide utilities for various purposes. Explore the available functions to make the most of the functionalities provided by this module.
This module includes a set of predefined constants that can be utilized for various purposes. Browse through the available constants to find values relevant to your needs and enhance the efficiency of your code.
Marks (or unmarks) ad requests as child-directed, for COPPA compliance. Must be called before admob_initialize - calling it after initialization has no effect.
Syntax:
admob_targeting_coppa(coppa)
| Argument | Type | Description |
|---|---|---|
| coppa | Boolean |
true to tag requests as child-directed. |
Returns:
N/A
Marks (or unmarks) the user as under the age of consent, for GDPR-related targeting rules. Must be called before admob_initialize - calling it after initialization has no effect.
Syntax:
admob_targeting_under_age(under_age)
| Argument | Type | Description |
|---|---|---|
| under_age | Boolean |
true to tag the user as under the age of consent. |
Returns:
N/A
Sets the maximum content rating for ads returned by future ad requests. Must be called before admob_initialize - calling it after initialization has no effect.
Syntax:
admob_targeting_max_ad_content_rating(content_rating)
| Argument | Type | Description |
|---|---|---|
| content_rating | AdMobMaxAdContentRating | The maximum content rating to allow. |
Returns:
N/A
Extension-defined numeric mapping to Google's G/PG/T/MA content-rating constants,
used by admob_targeting_max_ad_content_rating.
These constants are referenced by the following functions:
| Member | Description |
|---|---|
General |
Content suitable for a general audience. |
ParentalGuidance |
Content suitable for most audiences with parental guidance. |
Teen |
Content suitable for teen and older audiences. |
MatureAudience |
Content suitable only for mature audiences. |
YoYoGames 2026