Line Item Setup for MoPub


To use Super Auction with MoPub as your primary SDK, you’ll need to setup line items in MoPub that correspond with the value of the incoming Super Auction demand. This is done via keyword targeting.

  • After receiving the bid via the MM SDK requestBid API, attach the bid price to the MoPub SDK request as a keyword parameter. In the MoPub UI, you will need a line item that targets that keyword and bid price combination.
  • If you had 1 line item for every bid at penny increments (i.e. $0.01, $0.02, $0.03, etc.), you would need 1,000 line items just to account for bids from $1 to $10. That level of granularity would give the most accurate representation of the bids, but is unwieldy.
  • Instead, publishers typically use price buckets in varying granularity for the price ranges that matter. For example, interstitial ad placements may earn you $4.50 eCPM on average. You could group bids in 10 cent increments from $3-$4 so that bids of $3.04 or $3.06 would be rounded down into a single price bucket of $3.00. Then you could use 5 cent increments for the more important $4-$5 range for increased accuracy. In that case, a $4.04 bid would be rounded down to the $4.00 price bucket, and a $4.06 bid would be rounded down to the $4.05 price bucket.

For each price bucket, add a new line item in the MoPub ad server and follow the instructions below.

Set the line item to Network and give it Priority 12 (MoPub’s default priority level) so that it competes with the rest of your demand. Please note that if you use another priority level as your default, you should use that for this line item.

The Class and Data that you will enter will depend on the OS and placement type. Please reference the table below and replace the JSON data placeholders with the correct values for your placement.

Type Class Data
iOS Banner MPMillennialBannerCustomEvent {“adUnitID”:”<placement_ID>”, “dcn”:”<site ID>”, “adWidth”:<width here>, “adHeight”:<height here>}
iOS Interstitial MPMillennialInterstitialCustomEvent {“adUnitID”:”<placement ID>”, “dcn”:”<site ID>”}
Android Banner com.mopub.mobileads.MillennialBanner {“adUnitID”:”<placement ID>”, “dcn”:”<site ID>”, “adWidth”:<width here>, “adHeight”:<height here>}
Android Interstitial com.mopub.mobileads.MillennialInterstitial {“adUnitID”:”<placement ID>”, “dcn”:”<site ID>”}


Next, set your line item to start immediately. Then, enter the eCPM for the price bucket. In this example, it has been set to $1.00. This line item will compete with your other demand on MoPub (as well as the MoPub exchange) at $1.00 eCPM.

Publishers will typically set the eCPM for their line items at the floor of the price bucket, which means bid prices may be higher than the eCPM, especially for less granular setups. There may be other methodologies that work better for you (e.g. setting eCPM as an average price).


Next, target the MoPub ad unit that corresponds to your Super Auction placement. Note that because of the line item’s placement and OS-specific Class and Data, each Super Auction placement must have its own MoPub ad unit and set of line items.


Finally, set your keyword targeting to include all prices within the line item’s price bucket. Note the keyword can be anything you choose, just make sure it is the same one you are using to send the prebid to MoPub. In this example, the keyword is ‘sa_keyword’ and the $1.00 line item includes bids from $1.00 to $1.49.