Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document rewarded display declaration #4468

Merged
merged 1 commit into from
Apr 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions features/firstPartyData.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,13 @@ pbjs.setConfig({
}]
},
ext: {
data: { // fields that aren't part of openrtb 2.5
data: { // fields that aren't part of openrtb 2.6
pageType: "article",
category: "repair"
}
}
},
user: {
yob: 1985,
gender: "m",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: these fields are deprecated

keywords: "a,b",
data: [{
name: "dataprovider.com",
Expand Down Expand Up @@ -169,6 +167,30 @@ pbjs.addAdUnits({
});
{% endhighlight %}

Another case is [declaring rewarded](https://github.com/InteractiveAdvertisingBureau/openrtb2.x/blob/422eedb76e8730c89dcac75c7427c18cfa10e8c4/2.6.md?plain=1#L993). Here is how one might do that:


{% highlight js %}
pbjs.addAdUnits({
code: "test-div-rewarded",
mediaTypes: {
banner: {
sizes: [[300,250]]
}
},
ortb2Imp: {
rwdd: 1,
ext: {
data: {
pbadslot: "my-rewarded-rectangle",
adUnitSpecificAttribute: "123"
}
}
},
...
});
{% endhighlight %}

You may also specify adUnit-specific transaction IDs using `ortb2Imp.ext.tid`, and Prebid will use them instead of generating random new ones. This is useful if you are auctioning the same slots through multiple header bidding libraries. Note: you must take care to not re-use the same transaction IDs across different ad units or auctions. Here's a simplified example passing a tid through the [requestBids](/dev-docs/publisher-api-reference/requestBids.html) function:

{% highlight js %}
Expand Down