Prebid.js Integration Instructions

Conversant Prebid.js Integration Instructions

These instructions should be considered part of the 'bidder params' page on the prebid.org website. All other implementation details should be obtained from the standard prebid.js instructions located at that site. Please also include the Publisher Common ID (PubCID) module when you integrate the Conversant bidder by following the instructions below.

Conversant Bidder

Bidder Code: conversant

Bid Params

Name Scope Description Example
site_id Required The Conversant provided specific site id. "12345"
bidfloor Optional The minimum bid for the ad slot. 1.50
secure Required for Secure Pages Whether or not the creative assets need to use HTTPS. 0 for non-secure, 1 for secure. Default is non-secure. 1, 0
tag_id Optional Identifies the ad placement or ad tag which the ad will serve to. "placement_1_A"
position Optional Position on the page. Please refer to the Position table below. 1
mimes Required for Video Supported content MIME types. ["video/mp4", "application/javascript"]
maxduration Optional Maximum duration in seconds for this video. 30
protocols Optional Supported VAST versions. [1,2,4,5]

Position

Value Description
0 Unknown
1 Above the Fold
3 Below the Fold
4 Header
5 Footer
6 Sidebar
7 Fullscreen

API

Value Description
1 VPAID 1.0
2 VPAID 2.0
3 MRAID 1.0
4 ORMMA
5 MRAID 2.0

Protocols

Value Description
1 VAST 1.0
2 VAST 2.0
3 VAST 3.0
4 VAST 1.0 Wrapper
5 VAST 2.0 Wrapper
6 VAST 3.0 Wrapper
7 VAST 4.0
8 DAAST 1.0

Example Implementation

pbjs.que.push(function() {
    var adUnits = [{
        code: 'div-gpt-ad-1438287399331-0',
        sizes: [[300, 250], [300, 600]],
        bids: [{
                bidder: 'conversant',
                params: {
                  site_id: '12345',
                  secure: 1
                }
            }]
    },{
        code: 'div-gpt-ad-1438287399331-1',
        sizes: [[728, 90], [970, 90]],
        bids: [{
                    bidder: 'conversant',
                    params: {
                      site_id: '12345',
                      bidfloor: 1.50,
                      secure: 1,
                      tag_id: 'placement_1_A',
                      position: 1
                    }
            }]
    }];
    pbjs.addAdUnits(adUnits);

    pbjs.requestBids({
        bidsBackHandler: function(bidResponses) {
            initAdserver();
        }
    });
});

Publisher Common ID

This module stores an unique user id in the first party domain and makes it accessible to all adapters. Similar to IDFA and AAID, this is a simple UUID that can be utilized to improve user matching, especially for iOS and MacOS browsers, and is compatible with ITP (Intelligent Tracking Prevention). It’s lightweight and self contained. Adapters that support Publisher Common ID will be able to pick up the user ID and return it for additional server-side cross device tracking.

How to Integrate

Simply check the Publisher Common ID box on Prebid's Download page or include the module in your build. Adapters that support this feature will be able to retrieve the ID and incorporate it in their requests.

Configuration

Param Type Description Example
enable boolean Enable or disable the module. Setting it to false will disable the module without having to remove it from the bundle. Default is true. true
expInterval decimal Expiration interval of the cookie in minutes. Default is 2628000, or 5 years. 525600

Example

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
pbjs.que.push(function() {
       pbjs.setConfig({pubcid: {expInterval: 525600}});
       pbjs.addAdUnits(adUnits);
});

Opt Out/In

Users must be allowed to opt out of targeted advertising.  When implementing this module, you are required to place a link in your privacy policy or elsewhere on your website which allows the user to implement this opt-out. User opt-out is supported by setting the _pubcid_optout cookie in the publisher’s domain. When this cookie is set, then Publisher Common ID is neither read nor updated, and it will not be made available to any adapters. The opt-out must also delete the Publisher Common ID cookie (shown in our example below).

  • Opt-In: _pubcid_optout cookie is not present or set to 0
  • Opt-Out: _pubcid_optout cookie is set to 1

Here is an example of implementing opt-out and opt-in for the Publisher Common Id.

<html>
<head>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.0/jquery-confirm.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.0/jquery-confirm.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#fpcsettings").click(function() {
showDialog();
});
});

function setCookie(name, value, days) {
var d = new Date;
d.setTime(d.getTime() + 24*60*60*1000*days);
document.cookie = name + "=" + value + ";path=/;expires=" + d.toGMTString();
}

function deleteCookie (name){
setCookie(name, '', -1);
}

function showDialog(){
$.confirm({
title: 'Publisher Common ID Opt Out',
content: 'Publisher Common ID Opt Out',
cancelButton: 'Opt Out',
buttons: {
optin:{
text: 'Opt Out',
action: function(){
setCookie('_pubcid_optout', '1', 1825);
deleteCookie('_pubcid');
}
}
}
});
}

</script>
</head>
<body>
To control Publisher Common ID settings <a id="fpcsettings">click here</a>.
</body>
</html>
<body>
To control Publisher Common ID settings <a id="fpcsettings">click here</a>.
</body>
</html>