DFP client-side header bidding

AATKit supports client-side header bidding for DFP, enabling custom targeting values to be passed for specific price points. To pass your own targeting values:

  • Set up AATKit configuration first:

val conf = AATKitConfiguration(application)
// set up AATKit configuration
// [...]
AATKit.init(conf)
  • Pass custom targeting values for given prices, e.g.:

AATKit.setDFPBiddingValues(
    listOf(
        DFPBiddingValue(lowerValue = 16.00, mappedValue = "hbpb_16.00+"),
        DFPBiddingValue(lowerValue = 2.00, mappedValue = "hbpb_2.00-16.00"),
        DFPBiddingValue(lowerValue = 1.80, mappedValue = "hbpb_1.80-2.00"),
        DFPBiddingValue(lowerValue = 1.60, mappedValue = "hbpb_1.60-1.80"),
        DFPBiddingValue(lowerValue = 1.40, mappedValue = "hbpb_1.40-1.60"),
        DFPBiddingValue(lowerValue = 1.00, mappedValue = "hbpb_1.00-1.40"),
        DFPBiddingValue(lowerValue = 0.90, mappedValue = "hbpb_0.90-1.00"),
        DFPBiddingValue(lowerValue = 0.80, mappedValue = "hbpb_0.80-0.90"),
        DFPBiddingValue(lowerValue = 0.70, mappedValue = "hbpb_0.70-0.80"),
        DFPBiddingValue(lowerValue = 0.02, mappedValue = "hbpb_0.02-0.70"),
        DFPBiddingValue(lowerValue = 0.00, mappedValue = "hbpb_0.00-0.02"),
    )
)
  • Pass custom key if needed instead of default ghb_pb:

  • Create placements and start requesting ads.

Last updated