Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
layout: api_prebidjs
title: pbjs.getAdserverTargetingForAdUnitCodeStr(adunitCode)
description: getAdserverTargetingForAdUnitCodeStr API
sidebarType: 1
---

Returns the query string targeting parameters available at the moment for the specified ad unit.

**Kind**: static method of `pbjs`.

**Returns**: `Array` - list of targeting key-value strings.

**Request Params:**

{: .table .table-bordered .table-striped }

| Param | Type | Description |
| --- | --- | --- |
| `adunitCode` | `string` | adUnitCode to get the bid responses for |

**Example**

```javascript
const targetingStrings = pbjs.getAdserverTargetingForAdUnitCodeStr('div-1');
// ["hb_bidder=appnexus", "hb_adid=233bcbee889d46d", ...]
```
18 changes: 18 additions & 0 deletions dev-docs/publisher-api-reference/processQueue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
layout: api_prebidjs
title: pbjs.processQueue()
description: processQueue API
sidebarType: 1
---

Processes commands that were pushed onto `pbjs.cmd` or `pbjs.que` before Prebid.js finished loading.

**Kind**: static method of `pbjs`.

Calling this method manually is rarely necessary because Prebid.js runs it automatically when the library loads.

**Example**

```javascript
pbjs.processQueue();
```
28 changes: 28 additions & 0 deletions dev-docs/publisher-api-reference/registerAnalyticsAdapter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
layout: api_prebidjs
title: pbjs.registerAnalyticsAdapter(options)
description: registerAnalyticsAdapter API
sidebarType: 1
---

Registers an analytics adapter so it can listen to auction events.

**Kind**: static method of `pbjs`.

**Request Params:**

{: .table .table-bordered .table-striped }

| Param | Type | Description |
| --- | --- | --- |
| `options` | `object` | Object containing the adapter instance and code |

**Example**

```javascript
pbjs.registerAnalyticsAdapter({
adapter: myAnalyticsAdapter,
code: 'myAnalytics',
gvlid: 1
});
```
28 changes: 28 additions & 0 deletions dev-docs/publisher-api-reference/registerBidAdapter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
layout: api_prebidjs
title: pbjs.registerBidAdapter(bidderAdapter, bidderCode)
description: registerBidAdapter API
sidebarType: 1
---

Registers a custom bid adapter for use within Prebid.js.

**Kind**: static method of `pbjs`.

**Request Params:**

{: .table .table-bordered .table-striped }

| Param | Type | Description |
| --- | --- | --- |
| `bidderAdapter` | `function` | Adapter instance that returns a `callBids` function |
| `bidderCode` | `string` | Code that identifies the adapter |

**Example**

```javascript
function myAdapter() {
return { callBids: function() { /* ... */ } };
}
pbjs.registerBidAdapter(myAdapter, 'my');
```
16 changes: 16 additions & 0 deletions dev-docs/publisher-api-reference/triggerUserSyncs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
layout: api_prebidjs
title: pbjs.triggerUserSyncs()
description: triggerUserSyncs API
sidebarType: 1
---

Manually initiates user syncs when the `userSync.enableOverride` setting is enabled.

**Kind**: static method of `pbjs`.

**Example**

```javascript
pbjs.triggerUserSyncs();
```