Skip to content

Commit 64a25ea

Browse files
AdGeneration: Align segment parameter with OpenRTB spec
This commit updates the AdGeneration bidder documentation to reflect a new specification for processing First Party Data segments (ortb2.site.content.data[].segment). The updated specification defines two distinct behaviors: 1. If only `segment[].id` is provided (e.g., `{ id: "1001" }`), the 'id' is treated as a pre-arranged classification code. 2. If both `segment[].id` and `segment[].value` are provided (e.g., `{ id: "news", value: "sports" }`), the 'value' is read as the value for the 'id' key. The documentation example has been updated to demonstrate both use cases.
1 parent 33bba64 commit 64a25ea

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

dev-docs/bidders/adgeneration.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ In release 1.6.4 and later, publishers should use the `ortb2` method of setting
2727

2828
* ortb2.site.content.data[]
2929

30-
If `ad-generation.jp` is specified for ortb2.site.content.data[].name and `546` is specified for ortb2.site.content.data[].ext.segtax,
31-
`ortb2.site.content.data[].segment[].name` and `ortb2.site.content.data[].segment[].value` can be any string value.
30+
If `ad-generation.jp` is specified for ortb2.site.content.data[].name and `546` is specified for ortb2.site.content.data[].ext.segtax, the segment array objects are processed as follows:
31+
- segment[].id: Required. Must be a string.
32+
- segment[].value: Optional. Must be a string.
33+
- If only id is provided (e.g., { id: "1001" }), the id is treated as a pre-arranged classification code agreed upon with the publisher.
34+
- If both id and value are provided (e.g., { id: "news_category", value: "Sports_Sumo" }), the value is read as the value associated with the id (key).
3235

3336
Example first party data that's available to all bidders and all adunits:
3437

@@ -43,9 +46,13 @@ pbjs.setConfig({
4346
segtax: 546
4447
},
4548
segment: [
46-
{ name: "news_category", value: "Sports_Sumo" },// name and value must be string types
47-
{ name: "local_gourmet", value: "sushi" },
48-
{ name: "location", value: "tokyo" }
49+
// Only id (required, string) is provided; treated as a classification code
50+
{ id: "1001" }
51+
// Both id (required, string) and value (optional, string) are provided
52+
{ id: "news_category", value: "Sports_Sumo" },
53+
{ id: "local_gourmet", value: "sushi" },
54+
{ id: "location", value: "tokyo" },
55+
4956
]
5057
}]
5158
}

0 commit comments

Comments
 (0)