Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equativ Bid Adapter: adding more examples #5823

Merged
merged 22 commits into from
Jan 20, 2025
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
7633791
SADR-6590: initial documentation for Equativ JS bid adapter
jefftmahoney Nov 4, 2024
282ec59
SADR-6590: doc refinements
jefftmahoney Nov 5, 2024
2fd38e6
Update equativ.md
jefftmahoney Nov 6, 2024
1c87179
SADR-6590: fix linting issues
jefftmahoney Nov 6, 2024
4535848
SADR-6590: another linting issue
jefftmahoney Nov 6, 2024
f846dda
update app.publisher.id
krzysztofequativ Nov 7, 2024
73f2212
SADR-6590: providing link to Equativ OpenRTB API documentation
jefftmahoney Nov 7, 2024
0e6b85e
Merge pull request #4 from smartadserver/SADR-6590
jefftmahoney Nov 7, 2024
90164a0
Merge branch 'master' into master
jefftmahoney Nov 7, 2024
e6d7fa9
SADR-6590: providing additional required fields for documentation
jefftmahoney Nov 7, 2024
dba1a52
SADR-6590: adding peer answers to questions
jefftmahoney Nov 8, 2024
e941973
Merge pull request #5 from smartadserver/SADR-6590
jefftmahoney Nov 8, 2024
5d49167
SADR-6590: remove FPD section for now
jefftmahoney Nov 8, 2024
ebf5521
Merge pull request #6 from smartadserver/SADR-6590
jefftmahoney Nov 8, 2024
b5ad685
Merge branch 'master' into master
jefftmahoney Nov 8, 2024
0ea3970
Merge branch 'prebid:master' into master
jefftmahoney Dec 3, 2024
b91a985
Equativ: updating documentation on bid adapter parameter requirements
jefftmahoney Dec 3, 2024
93d24ef
Merge pull request #7 from smartadserver/SADR-6750
jefftmahoney Dec 6, 2024
995334c
Merge branch 'prebid:master' into master
jefftmahoney Jan 10, 2025
bd7b6c5
Merge branch 'prebid:master' into master
jefftmahoney Jan 16, 2025
16aa89e
SADR-6882: expanding documentation with additional examples
jefftmahoney Jan 17, 2025
a783730
Merge pull request #8 from smartadserver/SADR-6882
jefftmahoney Jan 20, 2025
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
297 changes: 253 additions & 44 deletions dev-docs/bidders/equativ.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ sidebarType: 1

The Equativ bidder adapter requires setup and approval from the Equativ service team. Please reach out to your account manager for more information to start using it.

### Bid params
### Bid Params

#### Fields

{: .table .table-bordered .table-striped }
| Name | Scope | Description | Example | Type |
Expand All @@ -40,29 +42,66 @@ The Equativ bidder adapter requires setup and approval from the Equativ service
| `pageId` | optional | The placement page ID. _See **Bid Parameter Usage** notes below for more information_. | `1234` | `integer` |
| `formatId` | optional | The placement format ID. _See **Bid Parameter Usage** notes below for more information_. | `1234` | `integer` |

#### Bid Parameter Usage
#### Usage

Different combinations of parameters are required depending upon which ones you choose to use.

There are two options for passing parameters:
There are two options for passing Equativ-specific bidder parameters: through bidder params, or through ortb2.

##### Through bidder params Object

Publishers can specify required and/or optional parameters through the bidder params object hierarchy like this:

```javascript
var adUnits = [
{
/// ... mediaType and other stuff here
bids: [
{
bidder: 'equativ',
params: {
networkId: 42, // REQUIRED
siteId: 142, // optional
pageId: 242, // optional
formatId: 342, // optional
},
},
],
},
];
```

##### Through ortb2

- **Option 1**. Specify `networkId` by itself (_and optionally providing_ `siteId`, `pageId` and `formatId`), or
- **Option 2**. Specify either `ortb2.site.publisher.id`, `ortb2.app.publisher.id` or `ortb2.dooh.publisher.id`
A second way to specify Equativ-specific bidder parameters is through the `ortb2` object. The example below references a `ortb2.site.publisher.id` hierarchy, but publishers can also use `ortb2.app.publisher.id` or `ortb2.dooh.publisher.id` as their needs dictate.

See **Sample Banner Setup** for examples of these parameter options.
```javascript
pbjs.setBidderConfig({
bidders: ['equativ'],
config: {
ortb2: {
site: {
publisher: {
id: 42,
},
},
},
},
});
```

### Supported Media Types

{: .table .table-bordered .table-striped }
| Type | Support |
|---|---|
| `banner` | Supported |
| `video` | Not currently supported |
| `native` | Not currently supported |
| `video` | Supported |
| `native` | Supported |

### User Syncing

To enable cookie syncing, make sure their configuration setup is properly invoked.
To enable cookie syncing, make sure the configuration setup is properly invoked.

This involves adding an entry for `setConfig()` that allows user syncing for iframes with `'equativ'` included as a bidder:

Expand All @@ -88,54 +127,224 @@ pbjs.bidderSettings = {
};
```

### Configuration Example
### Ad Unit Setup

#### Sample Banner Setup
#### Banner

As mentioned in the **Bid Parameter Usage** section, when including `'equativ'` as one of your available bidders your adunit setup, there are two approaches to how you can specify parameters. Below are examples that illustrate them.
As mentioned in the **Bid Params > Usage** section, when including `'equativ'` as one of the available bidders in an adunit setup, there are two approaches to how publishers can specify parameters. The below example uses the approach using the `params` object.

#### Option 1 -- Using networkId as a parameter
```javascript
var bannerAdUnits = [
{
code: 'div-123',
mediaTypes: {
banner: {
sizes: [
[600, 500],
[300, 600],
],
},
},
bids: [
{
bidder: 'equativ',
params: {
networkId: 42, // REQUIRED
siteId: 142, // optional
pageId: 242, // optional
formatId: 342, // optional
},
},
],
},
];

```html
<script>
var adUnits = [
{
code: 'div-123',
mediaTypes: {
banner: {
sizes: [
[600, 500],
[300, 600],
],
pbjs.que.push(function () {
pbjs.addAdUnits(bannerAdUnits);
});
```

#### Video

As mentioned in the **Bid Params > Usage** section, when including `'equativ'` as one of the available bidders in an adunit setup, there are two approaches to how publishers can specify parameters. The below example uses the approach using the `params` object.

Note that the `optional`, `recommended` and `REQUIRED` comments apply to the property itself, and not necessarily the values used in this example (_i.e._ `skip` _is a recommended property to include, but it is up to publishers to decide what particular value it should have_).

```javascript
var videoAdUnits = [
{
code: 'div-123',
mediaTypes: {
video: {
context: 'instream',
mimes: ['video/mp4'], // REQUIRED
linearity: 1, // optional
minduration: 10, // recommended
maxduration: 30, // recommended
placement: 1, // REQUIRED
skip: 1, // recommended
startdelay: 1, // recommended
pos: 1, // optional
playbackmethod: 1, // optional
battr: [10, 11], // optional
api: [1, 2], // optional
playerSize: [640, 480], // recommended
},
},
bids: [
{
bidder: 'equativ',
params: {
networkId: 42, // REQUIRED
siteId: 142, // optional
pageId: 242, // optional
formatId: 342, // optional
},
},
bids: [
{
bidder: 'equativ',
params: {
networkId: 42, // REQUIRED
siteId: 142, // optional
pageId: 242, // optional
formatId: 342, // optional
},
],
},
];

pbjs.que.push(function () {
pbjs.addAdUnits(videoAdUnits);
});
```

#### Native

As mentioned in the **Bid Params > Usage** section, when including `'equativ'` as one of the available bidders in an adunit setup, there are two approaches to how publishers can specify parameters. The below example uses the approach using the `params` object.

```javascript
var nativeAdUnits = [
{
code: 'native-div',
mediaTypes: {
native: {
adTemplate: `<div class="sponsored-post">
<div class="thumbnail" style="background-image: url(##hb_native_asset_id_2##);"></div>
<div class="content">
<h1>
<a href="%%CLICK_URL_UNESC%%##hb_native_linkurl##" target="_blank" class="pb-click" hb_native_asset_id="1">##hb_native_asset_id_1##</a>
</h1>
<p>##hb_native_asset_id_9##</p>
<div class="attribution">##hb_native_asset_id_6##</div>
</div>
</div>`,
ortb: {
context: 1,
plcmttype: 1,
assets: [
{
id: 1,
required: 1,
title: {
len: 80, // Title (corresponds with id 1 from ad markup)
},
},
{
id: 2,
required: 1,
img: {
type: 3, // Main Image (corresponds with id 2 from ad markup)
w: 300,
h: 180,
},
},
{
id: 6,
required: 1,
img: {
type: 1, // Additional image (corresponds with id 6 from ad markup)
w: 100,
h: 100,
},
},
{
id: 9,
required: 1,
data: {
type: 2, // Additional text (description) (dodatkowy )corresponds with id 9 from ad markup)
},
},
],
eventtrackers: [
{
event: 1,
methods: [1],
},
],
ver: '1.2',
privacy: 1,
},
],
},
},
];
bids: [
{
bidder: 'equativ',
params: {
networkId: 73,
formatId: 142,
pageId: 242,
siteId: 342,
},
},
],
},
];

pbjs.que.push(function () {
pbjs.addAdUnits(adUnits);
});
</script>
pbjs.que.push(function () {
pbjs.addAdUnits(nativeAdUnits);
});
```

#### Option 2 - Using ortb2 for parameter info
#### Audio

It is possible to specify audio inventory through the Equativ adapter. To do so, publishers can define a video-formatted ad unit and specify audio information through the `ortb2Imp` property, like the example shown below.

You can also, as an alternative to using bidder params, specify a value for `publisher.id` that may be nested under an `app`, `site` or `dooh` object. The Equativ adapter will, in turn, look for these property paths under the `ortb2` property of the request:
Note that the `optional`, `recommended` and `REQUIRED` comments apply to the property itself, and not necessarily the values used in this example (_i.e._ `minduration` _is a recommended property to include, but it is up to publishers to decide what particular value it should have_).

```javascript
var audioAdUnits = [
{
code: '/19968336/header-bid-tag-1',
mediaTypes: {
video: {
context: 'instream',
playerSize: [640, 480],
},
},
ortb2Imp: {
audio: {
mimes: ['audio/mpeg', 'audio/mp4'], // REQUIRED
api: [7], // optional
delivery: [2, 4], // optional
minbitrate: 128, // optional
maxbitrate: 192, // optional
minduration: 10, // recommended
maxduration: 30, // recommended
maxextended: -1, // optional
protocols: [1, 3, 4, 7], // recommended
startdelay: 5, // recommended
},
},
bids: [
{
bidder: 'equativ',
params: {
networkId: 1234,
},
},
],
},
];

pbjs.que.push(function () {
pbjs.addAdUnits(audioAdUnits);
});
```

- `ortb2.app.publisher.id`
- `ortb2.site.publisher.id`
- `ortb2.dooh.publisher.id`
{: .alert.alert-warning :}
**Note**: If a demand partner of Equativ is not capable of reading an audio object, the audio object will be converted into a video object with audio mime types. There is, as of this writing, no built-in/default support for serving audio assets in Prebid, so publishers that wish to do so will need to ensure their ad server setups can process whatever hand-offs are necessary.

### Additional Resources

Expand Down
Loading