Skip to content

Commit 4f06aec

Browse files
authored
OneKey RTD Module & OneKey Id Submodule: initial release (#3948)
* Add the OneKey Id sub-module and the OneKey RTD module User Id sub-module: prebid/Prebid.js#8685 RTD module: prebid/Prebid.js#8686 * Update the locations of the OneKey repositories
1 parent 893ebbd commit 4f06aec

File tree

2 files changed

+191
-0
lines changed

2 files changed

+191
-0
lines changed

dev-docs/modules/oneKeyRtdProvider.md

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
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+
```

dev-docs/modules/userId.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2383,6 +2383,50 @@ pbjs.setConfig({
23832383
});
23842384
{% endhighlight %}
23852385

2386+
### OneKey IDs & Preferences
2387+
2388+
The OneKey real-time data module in Prebid has been built so that publishers
2389+
can quickly and easily setup the OneKey Addressability Framework.
2390+
This module is used along with the oneKeyRtdProvider to pass OneKey data to your partners.
2391+
Both modules are required. This module will pass oneKeyData to your partners
2392+
while the oneKeyRtdProvider will pass the transmission requests.
2393+
2394+
Background information:
2395+
- [OneKey-Network/addressability-framework](https://github.com/OneKey-Network/addressability-framework)
2396+
- [OneKey-Network/OneKey-implementation](https://github.com/OneKey-Network/OneKey-implementation)
2397+
2398+
2399+
It can be added to you Prebid.js package with:
2400+
2401+
{: .alert.alert-info :}
2402+
gulp build –modules=userId,oneKeyIdSystem
2403+
2404+
⚠️ This module works with a RTD module. Both must be configured. See the [OneKey RTD Module](/dev-docs/modules/oneKeyRtdProvider.html).
2405+
2406+
#### OneKey Registration
2407+
2408+
OneKey is a community based Framework with a decentralized approach.
2409+
Go to [onekey.community](https://onekey.community/) for more details.
2410+
2411+
#### OneKey Configuration
2412+
2413+
{: .table .table-bordered .table-striped }
2414+
| Param under userSync.userIds[] | Scope | Type | Description | Example |
2415+
| --- | --- | --- | --- | --- |
2416+
| name | Required | String | The name of this module | `"oneKeyData"` |
2417+
2418+
2419+
#### OneKey Exemple
2420+
2421+
{% highlight javascript %}
2422+
pbjs.setConfig({
2423+
userSync: {
2424+
userIds: [{
2425+
name: 'oneKeyData'
2426+
}]
2427+
}
2428+
});
2429+
{% endhighlight %}
23862430

23872431
## Adapters Supporting the User ID Sub-Modules
23882432

0 commit comments

Comments
 (0)