Skip to main content

Set up MoPub

info

Proceed if you have a verified MoPub Publisher account, and you have registered your app with MoPub.

Login to your MoPub Account#

Login to your MoPub Account.

configure-mopub

Set Up Line Items#

Go to Orders and click on Create Order.

configure-mopub

Continue with creation of a line items by clicking on Save & create line item.

Each line item should map to a price tier. So if you have a price tier at $10.00 CPM, enter the following

  • Line item name. For example: Meson_10.00
  • Rate. For example: $10.00

configure-mopub

And click on Next.

Set Up Ad Unit Targeting#

Each line item created for a price tier in MoPub, needs to be mapped to all MoPub ad units that will be monetized using Meson.

configure-mopub

And click on Next.

Set Up Keyword Targeting#

Since wrap cannot submit bids directly to MoPub Ad Server, we send a keyword that maps to the bid in the ad request. You need to target your line item on this keyword.

For example, if the price tier and rate are set for $10.00, the keyword that needs to be entered is mes_hbbin:10.00.

Please stick to this syntax:

mes_hbbin:<PRICE_TIER>

configure-mopub

Click Save and proceed to create the next line item.

If you have configure 'n' price tiers in Meson, you will have to create 'n' line items in MoPub.

Set Up Creatives#

Configure creatives for each line item. If you are managing one set of line items across MoPub ad units, we recommend creating multiple creatives for different formats and creative dimensions.

Snippet for HTML Creative Type

<!DOCTYPE html>
<html>
<head>
<script src='https://d1mh3brs31ioia.cloudfront.net/js/creative.js'></script>
</head>
<body>
<div style='display:inline-block'>
<script>
var mesonBidData = {};
mesonBidData.mes_info = "%%KEYWORD:mes_info%%";
mesonBidData.mes_type = "%%KEYWORD:mes_type%%";
mesonBidData.hbbin = "%%KEYWORD:mes_hbbin%%";
mesonBidData.requestId = "%%KEYWORD:mes_request_id%%";
mesonBidData.bid = "%%KEYWORD:mes_bid%%";
try {
if(mesonBid){
mesonBid.renderAd(document, mesonBidData);
}
} catch (e) {
document.write("An error occured "+ e.message);
}
</script>
</div>
</body>
</html>

configure-mopub

Click Save and proceed to add the next creative.

Reach out to your Meson contact, to create line items.

Verify the Line Items#

Please make sure that you have line items configured for all price tiers in Meson, and for all MoPub formats and creative dimensions.

What Next?

Next, let's test the integration.