|
| 1 | +##### Server-side Rewarded Ad Unit Configuration |
| 2 | + |
| 3 | +The Rewarded Ad Unit assumes special behavior that should be configurable by the platform or publisher according to the application or ad experience guides. |
| 4 | + |
| 5 | +Configuration of rewarded ad unit can be done by defining the Prebid Server [passthrough extension](https://docs.prebid.org/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#request-passthrough) or by using a stored impression-level request on the server. |
| 6 | + |
| 7 | +Prebid SDK will search for a particular `rwdd` object in `$.seatbid.bid.ext.prebid.passthrough` of bid response to configure the behavior and rendering of the Rewarded Ad Unit. The following table describes the structure and usage purpose of `rwdd` configuration parameters. |
| 8 | + |
| 9 | +{: .table .table-bordered .table-striped } |
| 10 | +| Attribute | Type | Description | Example | |
| 11 | +|-----------|------|-------------|---------| |
| 12 | +| `reward` | object <br> (optional) | Metadata provided by the publisher to describe the reward. |<code>{<br> "type": "SuperDollars",<br> "count": 10<br>}</code> | |
| 13 | +| `reward.type` | string | Type of the reward in the app's coins. | `"SuperDollars"` | |
| 14 | +| `reward.count` | integer | Amount of coins. | `10` | |
| 15 | +| `reward.ext` | object | For future extensions. | <code>{<br> "ext": {}<br>}</code> | |
| 16 | +| `completion` | object <br> (optional) | Describes the condition when the SDK should send a signal to the app that the user has earned the reward. |<code>{<br> "video": {<br> "endcard": {<br> "time": 5 <br> } <br> } <br>}</code> | |
| 17 | +| `completion.banner` | object | Details for banner ad completion. |<code>{<br> "time": 5,<br> "event": "custom_event_url" <br>}</code> | |
| 18 | +| `completion.banner.time` | integer | Period of time the banner ad is on screen. | `5` | |
| 19 | +| `completion.banner.event` | string | URL with custom schema sent by the creative to indicate that the user did earn a reward. | `"rwdd://userDidEarnReward"` | |
| 20 | +| `completion.video` | object | Details for video ad completion. |<code>{<br> "endcard": {<br> "time": 5 <br> } <br>}</code> | |
| 21 | +| `completion.video.time` | integer | Period of time the video ad is on screen. | `10` | |
| 22 | +| `completion.video.playbackevent` | string | The playback event stage in the video. | `"start"`, `"firstquartile"`, `"midpoint"`, `"thirdquartile"`, `"complete"` | |
| 23 | +| `completion.video.endcard` | object | Properties for the end card. |<code>{<br> "time": 5 <br>}</code> | |
| 24 | +| `completion.video.endcard.time` | integer | Period of time the end card is on screen. | `5` | |
| 25 | +| `completion.video.endcard.event` | string | URL with custom schema sent by the creative for end card. | `"rwdd://userDidEarnReward"` | |
| 26 | +| `close` | object <br> (optional) | Describes the ad close behavior after the reward is earned. |<code>{<br> "postrewardtime": 3,<br> "action": "autoclose"<br>}</code> | |
| 27 | +| `close.postrewardtime` | integer | Time interval (seconds) after reward event when SDK should close interstitial. | `3` | |
| 28 | +| `close.action` | string | Action SDK should make: `"autoclose"` (close interstitial) or `"closebutton"` (show close button) | `"autoclose"` | |
| 29 | + |
| 30 | + |
| 31 | +An example of an impression-level stored request: |
| 32 | + |
| 33 | +```json |
| 34 | +{ |
| 35 | + "video": { |
| 36 | + "h": 480, |
| 37 | + "w": 320, |
| 38 | + "mimes": ["video/mp4"], |
| 39 | + "linearity": 1, |
| 40 | + "placement": 2, |
| 41 | + "playbackmethod": [2] |
| 42 | + }, |
| 43 | + "ext": { |
| 44 | + "prebid": { |
| 45 | + "passthrough": [ |
| 46 | + { |
| 47 | + "type": "prebidmobilesdk", |
| 48 | + "rwdd": { |
| 49 | + "reward": { |
| 50 | + "type": "SuperDollars", |
| 51 | + "count": 10 |
| 52 | + }, |
| 53 | + "completion": { |
| 54 | + "video": { |
| 55 | + "endcard": { |
| 56 | + "time": 5 |
| 57 | + } |
| 58 | + } |
| 59 | + }, |
| 60 | + "close": { |
| 61 | + "postrewardtime": 3, |
| 62 | + "action": "autoclose" |
| 63 | + } |
| 64 | + } |
| 65 | + } |
| 66 | + ] |
| 67 | + } |
| 68 | + } |
| 69 | +} |
| 70 | +``` |
| 71 | + |
| 72 | +More details about the SDK behavior according to the `rwdd` configuration you can find in the [GitHub Proposal](https://github.com/prebid/prebid-mobile-ios/pull/1058). |
0 commit comments