Skip to content

Releases: prebid/Prebid.js

Prebid 0.5.0 released!

11 Jan 16:58
Compare
Choose a tag to compare

New Features in this release

How to add bidder Pulsepoint:

var adUnits = [{
        code: '/9968336/header-bid-tag-0',
        sizes: [[300, 250], [300, 600]],
        bids: [{
            bidder: 'pulsepoint',
                params: {
                    cf: '300X250',  //String adSize identifier 
                    cp: 123345,     //Number Publisher Id
                    ct: 123456      //Number  Ad Tag Id
                }
        }]
}];

How to add bidder AOL:

var adUnits = [{
        code: '/9968336/header-bid-tag-0',
        sizes: [[300, 250], [300, 600]],
        bids: [{
            bidder: 'aol',
            params: {
                placement: 'TO ADD', //String placement
                network: 'TO ADD'    //String network,
                //optional params
                sizeId : 123,       //Number
                alias : 'TO ADD,    //String
                size : [300,250]    //Array[Number]
            }
        }]
}];

How to add bidder IndexExchange:

var adUnits = [{
        code: '/9968336/header-bid-tag-0',
        sizes: [[300, 250], [300, 600]],
        bids: [{
                bidder: 'indexExchange',
                params: {
                    id: 'TO ADD',  //String - id of placement required
                    siteID: TO ADD,  //Number - site id required
                    timeout: 1000, //Number Optional
                    tier2SiteID: 'TO ADD', //String Optional
                    tier3SiteID: 'TO ADD' //String Optional
                }
        }]
}];

Send custom query params in AppNexus Adapter:

bidder: 'appnexus',
    params: {
       placementId: '2251610',
       queryParam : 'value',  // <--- new unmatched params will automatically get sent in the query like "&queryParam=value&anotherQuery=value2"
       anotherQuery : 'value2'
    }

Real time Bid adjustment feature

    pbjs.bidderSettings = {
        aol: {
            bidCpmAdjustment : function(bidCpm){  // <-- new field - adjust the bid in real time before the auction takes place
                return bidCpm * .9;
            }
        }
    };

[beta] Alias Bidder

/**
 * Aliased bidders will use the existing adapter and require the same params as the existing adapter. 
 * The only change is the bidderCode is updated. Currently this feature is considered beta and only AppNexus adapter supports aliasing. 
 * @param  {String} bidderCode Existing bidderCode that should be aliased
 * @param  {String} alias      The aliased bidderCode
 */
pbjs.aliasBidder('appnexus', 'brealtime')

Inherit adServerTargeting setting from standard setting (#148)

pbjs.bidderSettings = {
    aol: {
        bidCpmAdjustment : function(bidCpm){
            return bidCpm * .9;
        }
        //AOL bidder will inherit from "standard" adserverTargeting keys below
    }
    standard: {
        adserverTargeting: [{
            key: "hb_bidder",
            val: function(bidResponse) {
                return bidResponse.bidderCode;
            }
        }, {
            key: "hb_adid",
            val: function(bidResponse) {
                return bidResponse.adId;
            }
        }, {
            key: "hb_pb",
            val: function(bidResponse) {
                return bidResponse.pbMg;
            }
        }]
    }
};

Bug fixes in this release

  • Fixed issue with timing of callback hanlder (e3bc5a7)
  • Fixed issue with Sovrn adapter sizzes (bd9b655)
  • Fixed issue with YieldBot adapter slot name cases sensitivity (f695c72)
  • Other misc bug fixes

Prebid 0.4.1 released

16 Nov 21:41
Compare
Choose a tag to compare

New Features in this release

  • Sovrn Adapter added (contributed by @pwfsd with support from Sovrn team)
  • [BETA] Analytics data collection and GA adapter added for quick integration

Breaking Change in this release

  • Casale renamed to IndexExchange

How to add bidder Sovrn:

var adUnits = [{
        code: '/9968336/header-bid-tag-0',
        sizes: [[300, 250], [300, 600]],
        bids: [{
            bidder: 'sovrn',
            params: {
                tagid: '123'
            }
        }]
}];

Analytics integration with GA

If your site uses analytics.js collection, a simple toggle will automatically send crucial data points to your account.

Enable GA collection:

ga('create', 'XXXXXX', 'auto');
//Send data from prebid.js automatically 
pbjs.que.push(function() {
    pbjs.enableAnalytics({
        provider: 'ga',
        options: {
            global: 'ga', // <string> name of GA global. Default is 'ga'
            enableDistribution: false, // <bool> enable/disable distribution data (see prebid.org for more information). If you're working with more than 3 bidders, we recommend this flag set to false for the following reason (in notes).
        }
    });
});

Note: GA throttles the max number of requests that can be sent with analytics.js to 20 initial + 2/second. If you're using more than 5 bidders, the GA throttling may prevent some data from being sent. We're implementing a data reporting queue in the next few releases to address this issue. See this link for details on GA's throttling.

Breaking Change: Deprecated bidder name Casale - now called IndexExchange

The bidderCode casale has been updated to indexExchange. Please update your configuration appropriately if using this bidder. Also of note is that IndexExchange will be upgraded to v9 of the their API in the next prebid.js release.

Before

var adUnits = [{
        code: '/9968336/header-bid-tag-0',
        sizes: [[300, 250], [300, 600]],
        bids: [{
            bidder: 'casale',
             params: {
                    slotId: 'TO ADD',    // <String>
                    casaleUrl: 'TO ADD'  //  <String>
                }
        }]
}];

After

var adUnits = [{
        code: 'div-id-header-bid-tag-0',
        sizes: [[300, 250], [300, 600]],
        bids: [{
             bidder: 'indexExchange',
             params: {
                    slotId: 'TO ADD',   // <String>
                    indexUrl: 'TO ADD'  //  <String>
                }
        }]
}];

Bug fixes in this release

  • Fixed issue with YieldBot adapter not sending back bad bids
  • Fixed issue with bidsBackHandler execution timing (#98)
  • Fixed issue with clearing DFP slot targeting (#104)
  • Fixed issue with RefreshBids with adUnitCodes not working correctly (#101)
  • Fixed issue with alwaysUseBid=true not working correctly
  • Other misc bug fixes

Prebid 0.4.0 released!

23 Oct 15:06
Compare
Choose a tag to compare
Pre-release

New 0.4.0 release with some minor configuration adjustments and functionality.

Recommended configuration change for use with DFP

Recommend to use div_id for the adUnit.code instead of the adUnitPath that was previously recommended. See this link for details.

Before

var adUnits = [{
        code: '/9968336/header-bid-tag-0',
        sizes: [[300, 250], [300, 600]],
        bids: [{
            bidder: 'appnexus',
            params: { placementId: 'TO ADD' }
        }]
}];

After

var adUnits = [{
        code: 'div-id-header-bid-tag-0',
        sizes: [[300, 250], [300, 600]],
        bids: [{
            bidder: 'appnexus',
            params: { placementId: 'TO ADD' }
        }]
}];

Adding a custom adapter

 pbjs.que.push(function(){
        var customAdapter = function customAdapter() {
            return {
                callBids: function(params) {
                    pbjs.loadScript('//path.to.custom.demand.js', function() {
                        var bid = pbjs.createBid(1);
                        //set bid options
                        //bid.cpm = ...
                        //add bid to responses
                        pbjs.addBidResponse(adunitCode, bid);
                    });
                }
            };
        };
        //register your custom adapter
        pbjs.registerBidAdapter(customAdapter, 'customAdapter');

        //other configs
        ...
        pbjs.requestBids();

    });

Enhancements in this release

  • Added dynamic adapter support. Adapters can be added in configuration now (API is public)
  • Yieldbot sponsored adapter committed
  • DFP targeting can now use Div Ids as well as slot ids (issue #69)
  • alwaysUseBid configuration param available for sending custom key targeting
  • Updated integration example page
  • Some basic unit tests added

Bug fixes in this release

  • Fix issue with price buckets
  • Fix issue with Criteo adapter
  • Fix issue with bidsBackHandler not getting bidResponses
  • Other misc bug fixes

Prebid release 0.3.2 - new adapters and bug fixes

15 Sep 19:16
Compare
Choose a tag to compare

Bug fixes and enhancements in this release

  • Add adapters
    • Yieldbot
    • Casale
  • Updated integration example page
  • Add event timings
  • Bower package management
  • Misc bug fixes

Major API Updates for Refreshing Ad Units

24 Aug 23:32
Compare
Choose a tag to compare

In the new API, we've made the below changes to better support the refresh functionality. Note that this new API has introduced a few breaking changes:

Breaking Changes

Change 1: A command queue

Now all pbjs commands should be wrapped by pbjs.que.push. This ensures pbjs commands are in scope and are executed in the right order. Example:

pbjs.que.push(function() {
   pbjs.setTargetingForGPTAsync();
});
Change 2: Add ad units

Instead of directly pushing objects into the pbjs.adUnits array (as in the previous versions), the new API requires the function pbjs.addAdUnits(adUnits). Example:

var adUnits = [{
        code: '/9968336/header-bid-tag-0',
        sizes: [[300, 250], [300, 600]],
        bids: [{
            bidder: 'appnexus',
            params: { placementId: 'TO ADD' }
        }]
}];
pbjs.addAdUnits(adUnits);
Change 3: Request bids

Previously, prebid.js automatically sends out bid requests as soon as the library loads. This isn't needed for many sites. The new API requires the page to explicit call pbjs.requestBids to send out bid requests. Example:

pbjs.requestBids({
    bidsBackHandler: function(bidResponses) { }
});
Change 4: Bids back callback

The callback when requested bids are returned are now in pbjs.requestBids (as in the above example). No more pbjs.registerBidCallbackHandler()

Deprecated Functions

1. Function getAdserverTargetingParamsForAdUnit(adUnitCode)

It's now split into getAdserverTargeting() and getAdserverTargetingForAdUnitCode([adunitCode])
Find out docs here

2. Function requestBidsForAdUnit(adUnitCode)

It's now requestBids()

3. Function registerBidCallbackHandler()

It's now a callback within the requestBids()

New Features

1. Request selected array of bids
pbjs.requestBids({
    adUnitCodes: ['/99336/slot-0'],
    bidsBackHandler: function() {
        pbjs.setTargetingForGPTAsync(['/99336/slot-0']);
        googletag.pubads().refresh([slotObj]); 
    }
});

See docs for pbjs.requestBids()
http://prebid.org/publisher-api.html#function-reference

2. New callback functionality (more events will be added)

A new callback when all bids are back for individual ad units:

pbjs.addCallback('adUnitBidsBack', function(adUnitCode){
       console.log('ad unit bids back for : ' + adUnitCode);
});

Version 0.2.1 - Many bug fixes

13 Aug 02:10
Compare
Choose a tag to compare
Pre-release

Bug story fixes:

  • pbjs.getBidResponses returns String not Object
  • OpenX - jstag always loads
  • hasOwn not defined problem
  • Updated the price map: pbLg, pbMg
  • The below Rubicon creative doesn't serve.
  • Remove empty bids in targeting params
  • Refresh API call for Prebid.js
  • Prebid.js Loops
  • Implement per ad unit: pbjs.requestBidsForAdUnit( code )

First Release

06 Aug 22:37
Compare
Choose a tag to compare
First Release Pre-release
Pre-release

Bidders supported:

  • AppNexus
  • OpenX
  • Pubmatic
  • Rubicon
  • Amazon (not well)
  • Criteo (not well)

Ad server supported:

  • GPT
  • Custom

API functions supported (docs here):

  • setTargetingForGPTAsync()
  • getAdserverTargetingParamsForAdUnit(adUnitCode)
  • requestBidsForAdUnit()
  • registerBidCallbackHandler()

The script is decently tested and live. However, we'll call this a pre-release due to limited amount of testing done.