Skip to content

Commit

Permalink
Add onSetTargeting handler to bid adapters spec (#1008)
Browse files Browse the repository at this point in the history
* Add documentation for the onBidWon spec handler

* Add documentation for the onSetTargeting spec handler
  • Loading branch information
jsfaure authored and bretg committed Nov 14, 2018
1 parent 6429e0d commit 4a38b77
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion dev-docs/bidder-adaptor.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,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);

Expand Down Expand Up @@ -409,6 +410,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.
Expand Down Expand Up @@ -680,6 +708,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);

Expand Down

0 comments on commit 4a38b77

Please sign in to comment.