Setting up Prebid Native in DFP (Alpha)
This page describes how to set up native creatives in DFP for use with Prebid.js.
For more information about DFP native ad setup, see the DFP native ads documentation.
- 1. Add a native ad unit
- 2. Create a custom native ad format
- 3. Create new native style
- 4. Create new native order and line items
- 5. Create a new native creative
- Related Topics
1. Add a native ad unit
You can specify a size for the ad unit, or specify the “fluid” size. In this case we’ll go with Fluid.
2. Create a custom native ad format
For Prebid, create a custom native ad format.
Make sure to remove all variables except Click-through URL.
3. Create new native style
In this example, we’re targeting
"prebid_native_adunit", so the Size is set to Fluid.
Add the HTML and CSS that define your native ad template. Note that
Native impression tracking requirements
You must include the
postMessage code snippet as shown in the screenshot and example code below so impression trackers will fire.
Example HTML and CSS:
4. Create new native order and line items
- Add the native format created in Step 1 under Inventory Sizes (in this case, “Prebid Native Format”)
- Be sure to set inventory targeting and key-value targeting on
hb_pbcorresponding to the line item’s CPM.
5. Create a new native creative
- Be sure to select the format you created in Step 1 (in this case, “Prebid Native Format”)
- Under Click-through URL, add any value. This will be overwritten by Prebid.