Advanced Initialization Options

The following code examples describe how to configure advanced initialization options when you initialize the FairBid SDK for different use cases, such as enabling logs for debugging, disabling auto-requesting for ads or the collection and transmission of AAID, and flagging certain users as children.

Kotlin
FairBid.configureForAppId("your_app_id")
    .enableLogs()              // Enables logs for debugging
    .disableAutoRequesting()   // Disables auto-requesting of ads
    .disableAdvertisingId()    // Disables collection and transmission of AAID
    .setUserAChild()           // Flags certain users as children
    .start(context)
Java
FairBid.configureForAppId("your_app_id")
    .enableLogs()              // Enable logs for debugging
    .disableAutoRequesting()   // Disable auto-requesting of ads
    .disableAdvertisingId()    // Disable collection and transmission of AAID
    .setUserAChild()           // Flag certain users as children
    .start(context);

App ID

In the initialization code above, you must replace the your_app_id value with your App ID and pass it as a string. To locate the DT App ID, log in to the DT Consolearrow-up-right, and go to Monetization→App Management. The Apps dashboard displays a list of your apps, and App IDs display below each app name.

Setting User as Child

This API enables publishers to flag certain users as children. The term children refers to individuals under a certain age, as defined under applicable data privacy laws. This API must be called before SDK initialization. For more information about flagging users as children, see Flag End-Users as a Child.

Setting User Consent for Personalized Ads

This API allows publishers to indicate consent for delivering personalized ads from DT Exchange to specific mediated networks.

The usage of this API has the following effects:

  • The consent information is forwarded to the mediated networks using their API. For more information, see the mediated networks that support this API below.

  • The Google Advertising ID (GAID) is sent as a string of zeros when the FairBid auction request is performed.

By default, the FairBid SDK assumes consent is given.

The following mediated networks support this API:

  • Meta Audience Network: If the consent was rejected prior to FairBid start, the Meta adapter and the SDK do not initialize. If the consent was rejected after FairBid starts, Meta adapter is prevented from performing ad requests in the current session. If the consent was granted, there is no change in the adapter behavior.

  • Pangle: Pangle SDK’s API for Personalized Advertising is called: PAGConfig.setPAConsent(paConsent)

Last updated