Skip to content

Commit

Permalink
update showheroes docs
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipStamenkovic committed Aug 20, 2024
1 parent 6c6e575 commit de0bdac
Showing 1 changed file with 124 additions and 2 deletions.
126 changes: 124 additions & 2 deletions dev-docs/bidders/showheroes-bs.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ gvl_id: 111
tcfeu_supported: true
usp_supported: true
schain_supported: true
userId: all
floors_supported: true
fpd_supported: true
multiformat_supported: will-bid-on-one
sidebarType: 1
---

Expand All @@ -19,6 +23,124 @@ sidebarType: 1
{: .table .table-bordered .table-striped }
| Name | Scope | Description | Example | Type |
|-------------|----------------------------------|-------------------------------------|------------------------------------------|-----------|
| `playerId` | required (if not send unitId) | VideoLibrary player ID | `'0151f985-fb1a-4f37-bb26-cfc62e43ec05'` | `string` |
| `unitId` | required (if not send playerId) | Monetize unit ID | `'AACBTwsZVANd9NlB'` | `string` |
| `vpaidMode` | optional | Vpaid wrapper; default: `false`. | `true` | `boolean` |

All other parameters should be sent inside openRTB request.

### openRTB2 support

{: .alert.alert-danger :}
Starting with Prebid.js version 9.15 ShowHeores bidder adapter is requesting bids via openRTB protocol. Publishers can use the `ortb2` method of setting [First Party Data](https://docs.prebid.org/features/firstPartyData.html). Bidder supports all first-party data fields: site, user, segments, and imp-level first-party data.

### testing

While developing or testing locally, you can 'fake' the page URL by setting the: `qa.pageURL` parameter.
This will automatically set the `test: 1` parameter inside the openRTB request, marking this bid request as a test request.

#### Outstream

Example of adunit configuration for the outstream unit:

```javascript

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
var adUnits = [
{
// Video adUnit
code: 'video-div-1',
mediaTypes: {
video: {
context: 'outstream',
playerSize: [640, 480],
mimes: ['video/mp4'],
playbackmethod: [2, 4, 6],
api: [1, 2, 4, 6],
protocols: [3, 4, 7, 8, 10],
placement: 1,
minduration: 0,
maxduration: 60,
startdelay: 0,
skip: 1
},
},
bids: [{
bidder: "showheroes-bs",
params: {
unitId: "AACBTwsZVANd9NlB",
qa: {
"endpoint": "https://vr-api.dev.showheroes.com/openrtb2/auction/",
"pageURL": "https://testing.domain.com/"
}
}
}],
renderer: {
url: 'https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js',
render: function (bid) {
// push to render queue because ANOutstreamVideo may not be loaded yet.
bid.renderer.push(() => {
ANOutstreamVideo.renderAd({
targetId: bid.adUnitCode, // target div id to render video.
adResponse: bid.adResponse
});
});
}
},
}
];
pbjs.que.push(function () {
pbjs.setConfig({...});
pbjs.addAdUnits(adUnits);
pbjs.requestBids({ bidsBackHandler: sendAdServerRequest });
});
```

You could use this example and place it in .html example pages inside the Prebid.js repository.

#### instream


Check failure on line 102 in dev-docs/bidders/showheroes-bs.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Multiple consecutive blank lines

dev-docs/bidders/showheroes-bs.md:102 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md012.md
Example of adunit configuration for the instream unit:

```javascript

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
var videoAdUnit = {
code: 'video1',
sizes: [640,480],
mediaTypes: {
video: {context: 'instream', playerSize: [640, 480]}
},
bids: [
{
bidder: 'showheroesBs',
params: {
unitId: "AAFo8FVWXycNdR8K",
qa: {
"endpoint": "https://vr-api.dev.showheroes.com/openrtb2/auction/",
"pageURL": "https://dev-pagetests.viralize.com/"
}
}
}
]
};
pbjs.que.push(function(){
pbjs.addAdUnits(videoAdUnit);
pbjs.setConfig({
cache: {
url: 'https://prebid.adnxs.com/pbc/v1/cache'
},
...,
});
pbjs.requestBids({
timeout: 10000,
bidsBackHandler : function(bids) {
var vastUrl = bids["video1"].bids[0].vastUrl
invokeVideoPlayer(vastUrl);
}
});
});
```

You could use this example and place it in the `test/pages/instream.html` example page inside the Prebid.js repository.

0 comments on commit de0bdac

Please sign in to comment.