Prebid Integration Guide

How to setup Unruly’s Prebid Adapter (Client side)

We support Prebid Client-side! Please read this guide to implement the Unruly header bidding technology.


In order for you to request an ad from Unruly via Prebid and have an Unruly Outstream ad on your test page, you need to prepare a few things.

    1. Include Unruly’s Bidder Adapter in the version you generate of PreBid that you deploy on your site
    2. Include Unruly as the only bidder for the outstream ad slot on your test page
    3. Add Unruly line items in GAM/ DFP, for the purposes of a test you may choose to only have one line item (GAM/ DFP AdOps instructions here)
    4. A unique div Id to show Unruly Outstream Ads.
    5. Update  “code” in Prebid Config to match your unique Id.

You are able to decide where on the page you would like Unruly to display the outstream ad using “code” in the Prebid configuration. We advise you to put the Outstream ad after the third paragraph as we find out that viewability scores are usually highest there.

To choose a slot you need to:

● Generate an ID for the slot that you want to run your ad in.

● Put the ID in a div or other HTML element on the page

● Specify Unruly as a Bidder for the ad slot in the Prebid config. The example in the code block further below assumes the ad slot ID will be div-video-01.

pbjs.addAdUnits({
	code: 'div-video-01',
	mediaTypes: {
    	video: {
    		context: 'outstream',
            playerSize: [640, 480]
        }
	},
    bids: [
    		{
            	bidder: 'unruly',
               	params: {
                	targetingUUID: '123456',
                    siteId: 123456
               }
            }
		]
   });

Next steps

Unruly representative will send you your  “targetingUUID” and “siteID” params for your Prebid Configuration. They are typically the same ID across both. Please note targetingUUID is a string value (in quotes”) and siteId an integer.

Implement your updated Prebid.js. configuration and placement code with the Unruly adapter site-wide!

And finally! This is a really great page that answers most questions about setup specific to Outstream and includes information on how to integrate PreBid with your ad server.

More details on PreBid can be found on the PreBid documentation page.


Enabling Unmissable

Unmissable support can be enabled in Prebid by passing an additional feature toggle in the params section of Unruly bidder settings.

pbjs.addAdUnits({
  code: 'div-video-01',
  mediaTypes: {
    video: {
      context: 'outstream',
      playerSize: [640, 480]
    }
  },
  bids: [
    {
      bidder: 'unruly',
      params: {
        //  Start: Enable Unmissable support in Prebid:
        featureOverrides: {
            canRunUnmissable: true
        },
        //  End: Enable Unmissable support in Prebid
        targetingUUID: '123456',
        siteId: 123456
      }
    }
  ]
});



User Syncing Configuration for Prebid