Skip to content

Commit 4aaa75c

Browse files
Nate CoziMatt Kendall
Nate Cozi
authored and
Matt Kendall
committed
add an event that fires when requestBids is called (#939)
1 parent 5b89db8 commit 4aaa75c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/constants.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"TYPE": {
2020
"ALL_BIDS_BACK": "allRequestedBidsBack",
2121
"AD_UNIT_BIDS_BACK": "adUnitBidsBack",
22-
"BID_WON": "bidWon"
22+
"BID_WON": "bidWon",
23+
"REQUEST_BIDS": "requestBids"
2324
}
2425
},
2526
"objectType_function": "function",
@@ -35,7 +36,8 @@
3536
"BID_REQUESTED": "bidRequested",
3637
"BID_RESPONSE": "bidResponse",
3738
"BID_WON": "bidWon",
38-
"SET_TARGETING": "setTargeting"
39+
"SET_TARGETING": "setTargeting",
40+
"REQUEST_BIDS": "requestBids"
3941
},
4042
"EVENT_ID_PATHS": {
4143
"bidWon": "adUnitCode"

src/prebid.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ $$PREBID_GLOBAL$$.clearAuction = function() {
359359
* @param adUnitCodes
360360
*/
361361
$$PREBID_GLOBAL$$.requestBids = function ({ bidsBackHandler, timeout, adUnits, adUnitCodes }) {
362+
events.emit('requestBids');
362363
const cbTimeout = $$PREBID_GLOBAL$$.cbTimeout = timeout || $$PREBID_GLOBAL$$.bidderTimeout;
363364
adUnits = adUnits || $$PREBID_GLOBAL$$.adUnits;
364365

0 commit comments

Comments
 (0)