Set up GAM

Last Updated on: 19 Sep, 2023

INFO

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

Login to your GAM Account

Log into your GAM Account.

Set Up Line Items

  1. Go to Delivery > Order and click on New order.
  2. Add order details.
  3. Continue with the creation of line items by clicking on Add line item.
  4. Select Ad Type as Display (Standalone).
  5. Select the Line Item Type as Price Priority and enter the expected creatives.
  6. Under Delivery Settings and Cost, enter the rate (enter up to 2 decimal points).

Set-Up Inventory Targeting

Under Add Targeting/Inventory, select the placements where you want to monetize using Meson.

Set-Up Keyword Targeting

Under Add Targeting/Custom, enter the key value you want to target. Meson will send the highest bid price to GAM with the keyword mes_hbbin.

The line item will capture the bids in the price tier $1.00 - $1.10, by targeting the keyword mes_hbbin set to 1.00 in the Key-Values section.

Click Save, to create the line item. Repeat this for all the price tiers created.

Set Up Creatives

  1. Click on the Creatives tab to add creatives.
  2. Select custom creative.
  3. Snippet for Standard creative.
<!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 = "%%PATTERN:mes_info%%";
    mesonBidData.mes_type = "%%PATTERN:mes_type%%";
    mesonBidData.hbbin = "%%PATTERN:mes_hbbin%%";
    mesonBidData.requestId = "%%PATTERN:mes_request_id%%";
    mesonBidData.bid = "%%PATTERN:mes_bid%%";
    try {
        if(mesonBid){
        mesonBid.renderAd(document, mesonBidData);
        }
    } catch (e) {
        document.write("An error occured "+ e.message);
    }
    </script>
</div>
</body>
</html>

  1. Click Save, to create the creative.

Verify the Line Items

Please make sure that you have line items configured for all price tiers in Meson, and for all GAM creative sizes.

WHAT'S NEXT

Next, let's test the integration.