From d15a0f2cac17a3aba22aa3080b94907fdaf9d5df Mon Sep 17 00:00:00 2001 From: Nicolas Faure Date: Thu, 28 Jun 2018 11:36:07 +0200 Subject: [PATCH 1/2] Add documentation for the onBidWon spec handler --- dev-docs/bidder-adaptor.md | 40 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/dev-docs/bidder-adaptor.md b/dev-docs/bidder-adaptor.md index 4940c080eb..24925b3471 100644 --- a/dev-docs/bidder-adaptor.md +++ b/dev-docs/bidder-adaptor.md @@ -191,7 +191,8 @@ export const spec = { buildRequests: function(validBidRequests[], bidderRequest) {}, interpretResponse: function(serverResponse, request) {}, getUserSyncs: function(syncOptions, serverResponses) {}, - onTimeout: function(timeoutData) {} + onTimeout: function(timeoutData) {}, + onBidWon: function(bid) {} } registerBidder(spec); @@ -359,6 +360,33 @@ Sample data received to this function: } {% endhighlight %} +### Registering on Bid Won + +The `onBidWon` function will be called when a bid from the adapter won the auction. + +Sample data received by this function: + +{% highlight js %} +{ + "bidder": "example", + "width": 300, + "height": 250, + "adId": "330a22bdea4cac", + "mediaType": "banner", + "cpm": 0.28 + "ad": "...", + "requestId": "418b37f85e772c", + "adUnitCode": "div-gpt-ad-1460505748561-0", + "size": "350x250", + "adserverTargeting": { + "hb_bidder": "example", + "hb_adid": "330a22bdea4cac", + "hb_pb": "0.20", + "hb_size": "350x250" + } +} +{% endhighlight %} + ## Supporting Video Follow the steps in this section to ensure that your adapter properly supports video. @@ -621,7 +649,15 @@ export const spec = { */ onTimeout: function(data) { // Bidder specifc code - } + } + + /** + * Register bidder specific code, which will execute if a bid from this bidder won the auction + * @param {Bid} The bid that won the auction + */ + onBidWon: function(bid) { + // Bidder specific code + } } registerBidder(spec); From ba1c8dd651383a3bf75b192c8b6402207b2e63b5 Mon Sep 17 00:00:00 2001 From: Nicolas Faure Date: Thu, 28 Jun 2018 11:46:58 +0200 Subject: [PATCH 2/2] Add documentation for the onSetTargeting spec handler --- dev-docs/bidder-adaptor.md | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/dev-docs/bidder-adaptor.md b/dev-docs/bidder-adaptor.md index 24925b3471..118bba8f8e 100644 --- a/dev-docs/bidder-adaptor.md +++ b/dev-docs/bidder-adaptor.md @@ -192,7 +192,8 @@ export const spec = { interpretResponse: function(serverResponse, request) {}, getUserSyncs: function(syncOptions, serverResponses) {}, onTimeout: function(timeoutData) {}, - onBidWon: function(bid) {} + onBidWon: function(bid) {}, + onSetTargeting: function(bid) {} } registerBidder(spec); @@ -387,6 +388,33 @@ Sample data received by this function: } {% endhighlight %} +### Registering on Set Targeting + +The `onSetTargeting` function will be called when the adserver targeting has been set for a bid from the adapter. + +Sample data received by this function: + +{% highlight js %} +{ + "bidder": "example", + "width": 300, + "height": 250, + "adId": "330a22bdea4cac", + "mediaType": "banner", + "cpm": 0.28, + "ad": "...", + "requestId": "418b37f85e772c", + "adUnitCode": "div-gpt-ad-1460505748561-0", + "size": "350x250", + "adserverTargeting": { + "hb_bidder": "example", + "hb_adid": "330a22bdea4cac", + "hb_pb": "0.20", + "hb_size": "350x250" + } +} +{% endhighlight %} + ## Supporting Video Follow the steps in this section to ensure that your adapter properly supports video. @@ -658,6 +686,14 @@ export const spec = { onBidWon: function(bid) { // Bidder specific code } + + /** + * Register bidder specific code, which will execute when the adserver targeting has been set for a bid from this bidder + * @param {Bid} The bid of which the targeting has been set + */ + onSetTargeting: function(bid) { + // Bidder specific code + } } registerBidder(spec);