UserPropertiesBuilder

Builder class for configuring user properties used in ad targeting. This class allows setting various user attributes and preferences for personalized ad delivery. Note: Contact NAM admin before using these properties.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun addCustomParam(key: String, value: String): <Error class: unknown class>

Adds a single custom parameter. Note: AdParam settings take precedence over these parameters.

Link copied to clipboard

Builds and returns a UserProperties instance with the configured settings.

Link copied to clipboard
fun childDirectedTreatment(tagForChildDirectedTreatment: Boolean?): <Error class: unknown class>

Sets the child-directed treatment flag (COPPA compliance).

fun childDirectedTreatment(tagForChildDirectedTreatment: String?): <Error class: unknown class>

Sets the child-directed treatment flag using a string value.

Link copied to clipboard
fun country(country: String): <Error class: unknown class>

Sets the user's country code.

Link copied to clipboard
fun gender(gender: GenderType): <Error class: unknown class>

Sets the user's gender information.

Link copied to clipboard
fun id(id: String): <Error class: unknown class>

Sets the service user ID for error log tracking.

Link copied to clipboard
fun language(language: String): <Error class: unknown class>

Sets the user's language code.

Link copied to clipboard
fun setContentId(contentId: String): <Error class: unknown class>

Sets the content ID for targeted advertising.

Link copied to clipboard
fun setCustomParam(customParam: Map<String, String>): <Error class: unknown class>

Sets multiple custom parameters at once. Note: AdParam settings take precedence over these parameters.

Link copied to clipboard
fun setDisableAdId(disableAdId: Boolean): <Error class: unknown class>

Sets whether to disable ADID usage regardless of privacy policies.

Link copied to clipboard
fun underAgeOfConsent(tagForUnderAgeOfConsent: Boolean?): <Error class: unknown class>

Sets the under age of consent flag (CCPA/PDPA compliance).

fun underAgeOfConsent(tagForUnderAgeOfConsent: String?): <Error class: unknown class>

Sets the under age of consent flag using a string value.

Link copied to clipboard
fun yob(yob: Int): <Error class: unknown class>

Sets the user's year of birth.