|
| 1 | +--- |
| 2 | +layout: page_v2 |
| 3 | +title: OneKey RTD Module |
| 4 | +display_name: OneKey RTD Module |
| 5 | +description: OneKey Real Time Data Module |
| 6 | +page_type: module |
| 7 | +module_type: rtd |
| 8 | +module_code : oneKeyRtdProvider |
| 9 | +enable_download : false |
| 10 | +vendor_specific: true |
| 11 | +sidebarType : 1 |
| 12 | +--- |
| 13 | + |
| 14 | +# OneKey Data Provider |
| 15 | + |
| 16 | +{:.no_toc} |
| 17 | + |
| 18 | +* TOC |
| 19 | +{:toc} |
| 20 | + |
| 21 | +## Overview |
| 22 | + |
| 23 | +The OneKey real-time data module in Prebid has been built so that publishers |
| 24 | +can quickly and easily setup the OneKey Addressability Framework. |
| 25 | +This module is used along with the oneKeyIdSystem to pass OneKey data to your partners. |
| 26 | +Both modules are required. This module will pass transmission requests to your partners |
| 27 | +while the oneKeyIdSystem will pass the oneKeyData. |
| 28 | + |
| 29 | +Background information: |
| 30 | +- [OneKey-Network/addressability-framework](https://github.com/OneKey-Network/addressability-framework) |
| 31 | +- [OneKey-Network/OneKey-implementation](https://github.com/OneKey-Network/OneKey-implementation) |
| 32 | + |
| 33 | + |
| 34 | +## Implementation for Publishers |
| 35 | + |
| 36 | +### Integration |
| 37 | + |
| 38 | +1) Compile the OneKey RTD Provider and the OneKey UserID sub-module into your Prebid build. |
| 39 | + |
| 40 | +{: .alert.alert-info :} |
| 41 | +gulp build --modules=rtdModule,oneKeyRtdProvider |
| 42 | + |
| 43 | +2) Publishers must register OneKey RTD Provider as a Real Time Data provider by using `setConfig` |
| 44 | +to load a Prebid Config containing a `realTimeData.dataProviders` array: |
| 45 | + |
| 46 | +```javascript |
| 47 | +pbjs.setConfig({ |
| 48 | + ..., |
| 49 | + realTimeData: { |
| 50 | + auctionDelay: 100, |
| 51 | + dataProviders: [ |
| 52 | + { |
| 53 | + name: 'oneKey', |
| 54 | + waitForIt: true |
| 55 | + } |
| 56 | + ] |
| 57 | + } |
| 58 | +}); |
| 59 | +``` |
| 60 | + |
| 61 | +3) Configure the OneKey RTD Provider with the bidders that are part of the OneKey community. If there is no bidders specified, the RTD provider |
| 62 | +will share OneKey data with all adapters. |
| 63 | + |
| 64 | +⚠️ This module works with a User Id sub-module. Both must be configured. See the [OneKey Id Sub-Module](/dev-docs/modules/userId.html#onekey-ids--preferences). |
| 65 | + |
| 66 | +### Parameters |
| 67 | + |
| 68 | +| Name |Type | Description | Notes | |
| 69 | +| :------------ | :------------ | :------------ |:------------ | |
| 70 | +| name | String | Real time data module name | Always 'oneKey' | |
| 71 | +| waitForIt | Boolean | Required to ensure that the auction is delayed until prefetch is complete | Optional. Defaults to false | |
| 72 | +| params | Object | | Optional | |
| 73 | +| params.bidders | Array | List of bidders to restrict the data to. | Optional | |
| 74 | + |
| 75 | +## Implementation for Bidders |
| 76 | + |
| 77 | +### Bidder Requests |
| 78 | + |
| 79 | +The data will provided to the bidders using the `ortb2` object. |
| 80 | +The following is an example of the format of the data: |
| 81 | + |
| 82 | +```json |
| 83 | +"user": { |
| 84 | + "ext": { |
| 85 | + "paf": { |
| 86 | + "transmission": { |
| 87 | + "seed": { |
| 88 | + "version": "0.1", |
| 89 | + "transaction_ids": ["06df6992-691c-4342-bbb0-66d2a005d5b1", "d2cd0aa7-8810-478c-bd15-fb5bfa8138b8"], |
| 90 | + "publisher": "cmp.pafdemopublisher.com", |
| 91 | + "source": { |
| 92 | + "domain": "cmp.pafdemopublisher.com", |
| 93 | + "timestamp": 1649712888, |
| 94 | + "signature": "turzZlXh9IqD5Rjwh4vWR78pKLrVsmwQrGr6fgw8TPgQVJSC8K3HvkypTV7lm3UaCi+Zzjl+9sd7Hrv87gdI8w==" |
| 95 | + } |
| 96 | + } |
| 97 | + } |
| 98 | + } |
| 99 | + } |
| 100 | +} |
| 101 | +``` |
| 102 | + |
| 103 | +```json |
| 104 | +"ortb2Imp": { |
| 105 | + "ext": { |
| 106 | + "data": { |
| 107 | + "paf": { |
| 108 | + "transaction_id": "52d23fed-4f50-4c17-b07a-c458143e9d09" |
| 109 | + } |
| 110 | + } |
| 111 | + } |
| 112 | +} |
| 113 | +``` |
| 114 | + |
| 115 | +### Bidder Responses |
| 116 | + |
| 117 | +Bidders who are part of the OneKey Addressability Framework and receive OneKey |
| 118 | +transmissions are required to return transmission responses as outlined in |
| 119 | +[OneKey-Network/addressability-framework](https://github.com/OneKey-Network/addressability-framework). Transmission responses should be appended to bids |
| 120 | +along with the releveant content_id using the meta.paf field. The paf-lib will |
| 121 | +be responsible for collecting all of the transmission responses. |
| 122 | + |
| 123 | +Below is an example of setting a transmission response: |
| 124 | + |
| 125 | +```javascript |
| 126 | +bid.meta.paf = { |
| 127 | + content_id: "90141190-26fe-497c-acee-4d2b649c2112", |
| 128 | + transmission: { |
| 129 | + version: "0.1", |
| 130 | + contents: [ |
| 131 | + { |
| 132 | + transaction_id: "f55a401d-e8bb-4de1-a3d2-fa95619393e8", |
| 133 | + content_id: "90141190-26fe-497c-acee-4d2b649c2112" |
| 134 | + } |
| 135 | + ], |
| 136 | + status: "success", |
| 137 | + details: "", |
| 138 | + receiver: "dsp1.com", |
| 139 | + source: { |
| 140 | + domain: "dsp1.com", |
| 141 | + timestamp: 1639589531, |
| 142 | + signature: "d01c6e83f14b4f057c2a2a86d320e2454fc0c60df4645518d993b5f40019d24c" |
| 143 | + }, |
| 144 | + children: [] |
| 145 | + } |
| 146 | +} |
| 147 | +``` |
0 commit comments