Google Ad Manager Setup

Step 1: Create New Order

Pipeline Screenshot

Step 2: Create Line Item

To integrate the Prebid demand you have to create a Line Items with a specific price and targeting keywords.

Even though a Line Item can be named in any way, we strongly recommend to use the price or targeting keyword in the name. It will help to navigate through hundreds of them.

Select Type

Create a Line Item depending on the type of expected creative kind:

  • Display - for the Banner, HTML Interstitial
  • Video and Audio - for the Video Interstitial, Rewarded Video, and Outstream Video ads.

Pipeline Screenshot

Set sizes respectively to expected creatives.

Select Price

The Line Item price should be chosen according to the price granularity policy.

Pipeline Screenshot

Set Targeting Keywords

The Custom targeting property should contain a special keyword with the price of winning bid. The same as a Rate of the Line Item.

Pipeline Screenshot

Step 3: Prepare Prebid Creative

Display Banner, Video Banner, Display Interstitial, Video Interstitial

The Prebid SDK integrates with GAM basing on App Events feature, almost for all ad formats. That means that creative should contain a special tag that will be processed by Prebid’s GAM Event Handlers.

If GAM Event Handler receives the PrebidAppEvent event it will render the winning bid. Otherwise the control will be passed to the GAM Ad View and it will render the received creative.

<script type="text/javascript" src="https://media.admob.com/api/v1/google_mobile_app_ads.js">
</script>
<script type="text/javascript">admob.events.dispatchAppEvent("PrebidAppEvent","%%PATTERN:bidid%%");</script>

Pipeline Screenshot

Rewarded Video

Prebid rendering for Rewarded video ads is based on the OnAdMetadataChangedListener. So you need to set up a special VAST tag in the creative.

https://cdn.jsdelivr.net/npm/prebid-universal-creative/dist/prebid-mobile-rewarded-vast.xml

Pipeline Screenshot

If GAM Event Handler receives the tag’s info it will render the winning bid. Otherwise the control will be passed to the GAM Ad View and it will render the received creative.