- pbjs
- .getAdserverTargetingForAdUnitCode([adunitCode]) ⇒
object
- .getAdserverTargeting() ⇒
object
- .getBidResponses([adunitCode]) ⇒
object
- .getBidResponsesForAdUnitCode(adUnitCode) ⇒
Object
- .setTargetingForGPTAsync([codeArr])
- .allBidsAvailable() ⇒
bool
- .renderAd(doc, id)
- .removeAdUnit(adUnitCode)
- .requestAllBids()
- .requestBids(requestObj)
- .addAdUnits(Array)
- .addCallback(event, func) ⇒
String
- .removeCallback(cbId) ⇒
String
- .getAdserverTargetingForAdUnitCode([adunitCode]) ⇒
This function returns the query string targeting parameters available at this moment for a given ad unit. Note that some bidder's response may not have been received if you call this function too quickly after the requests are sent.
Kind: static method of pbjs
Returns: object
- returnObj return bids
Param | Type | Description |
---|---|---|
[adunitCode] | string |
adUnitCode to get the bid responses for |
returns all ad server targeting for all ad units
Kind: static method of pbjs
Returns: object
- Map of adUnitCodes and targeting values []
This function returns the bid responses at the given moment.
Kind: static method of pbjs
Returns: object
- map | object that contains the bidResponses
Param | Type | Description |
---|---|---|
[adunitCode] | string |
adunitCode adUnitCode to get the bid responses for |
Returns bidResponses for the specified adUnitCode
Kind: static method of pbjs
Returns: Object
- bidResponse object
Param | Type | Description |
---|---|---|
adUnitCode | String |
adUnitCode |
Set query string targeting on all GPT ad units. The logic for deciding query strings is described in the section Configure AdServer Targeting. Note that this function has to be called after all ad units on page are defined.
Kind: static method of pbjs
Param | Type | Description |
---|---|---|
[codeArr] | array |
an array of adUnitodes to set targeting for. |
Returns a bool if all the bids have returned or timed out
Kind: static method of pbjs
Returns: bool
- all bids available
This function will render the ad (based on params) in the given iframe document passed through. Note that doc SHOULD NOT be the parent document page as we can't doc.write() asynchrounsly
Kind: static method of pbjs
Param | Type | Description |
---|---|---|
doc | object |
document |
id | string |
bid id to locate the ad |
Remove adUnit from the pbjs configuration
Kind: static method of pbjs
Param | Type | Description |
---|---|---|
adUnitCode | String |
the adUnitCode to remove |
Request all bids configured in pbjs
Kind: static method of pbjs
Request bids ad-hoc. This function does not add or remove adUnits already configured.
Kind: static method of pbjs
Param | Type | Description |
---|---|---|
requestObj | Object |
|
requestObj.adUnitCodes | Array.<string> |
adUnit codes to request. Use this or requestObj.adUnits |
requestObj.adUnits | Array.<object> |
AdUnitObjects to request. Use this or requestObj.adUnitCodes |
[requestObj.timeout] | number |
Timeout for requesting the bids specified in milliseconds |
[requestObj.bidsBackHandler] | function |
Callback to execute when all the bid responses are back or the timeout hits. |
Add adunit(s)
Kind: static method of pbjs
Param | Type | Description |
---|---|---|
Array | string | Array.<string> |
of adUnits or single adUnit Object. |
Add a callback event
Kind: static method of pbjs
Returns: String
- id for callback
Param | Type | Description |
---|---|---|
event | String |
event to attach callback to Options: "allRequestedBidsBack" |
func | function |
function to execute. Paramaters passed into the function: ((bidResObj |
Remove a callback event
Kind: static method of pbjs
Returns: String
- id for callback
Param | Type | Description |
---|---|---|
cbId | string |
id of the callback to remove |