AdGeneration: Align segment parameter with OpenRTB spec(id必須, valueは非必須) #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🏷 Type of documentation
📋 Checklist
Background
This commit updates the AdGeneration bidder documentation (adgeneration.md) to address two issues related to First Party Data segments (ortb2.site.content.data[].segment).
Align with OpenRTB Specification (Fix name to id)
The OpenRTB specification requires the id field for objects within data segment arrays (like site.content.data[].segment). The previous documentation example incorrectly used the name field.
This discrepancy caused valid FPD to be filtered out by Prebid's validationFpdModule, which correctly enforces the spec by rejecting segments lacking the required id field.
This commit replaces all instances of name with id in the example code to ensure compliance.
Clarify Segment Handling Logic
The documentation is also updated to detail AdGeneration's specific handling of the segment object fields, reflecting a new publisher requirement:
segment[].id: Required.
segment[].value: Optional.
If only id is provided (e.g., { id: "1001" }): The id is treated as a pre-arranged classification code.
If both id and value are provided (e.g., { id: "news", value: "sports" }): The value is read as the value associated with the id (key).
The example code has been updated to demonstrate both of these use cases clearly. This ensures publishers understand how to send both key-value pairs and classification codes correctly.