Skip to main content

Set up MoPub


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.


Set Up Line Items#

Go to Orders and click on Create Order.


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


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.


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:



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>
<script src=''></script>
<div style='display:inline-block'>
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%%"; = "%%KEYWORD:mes_bid%%";
try {
mesonBid.renderAd(document, mesonBidData);
} catch (e) {
document.write("An error occured "+ e.message);


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.