Skip to content

Targeting

Francisco Dias edited this page Jul 29, 2026 · 9 revisions

Targeting

Functions for targeting ads to the right audience. All of these must be called before admob_initialize.

Functions

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.

Constants

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.



Back To Top

admob_targeting_coppa

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



Back To Top

admob_targeting_under_age

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



Back To Top

admob_targeting_max_ad_content_rating

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



Back To Top

AdMobMaxAdContentRating

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.


Clone this wiki locally