From 6d7eec9951e543a1b4fff8eab972103307aca65e Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Tue, 28 Sep 2021 13:38:37 -0400 Subject: [PATCH 1/3] Update firstPartyData.md --- features/firstPartyData.md | 49 +++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/features/firstPartyData.md b/features/firstPartyData.md index cceb41322d..bdf438272c 100644 --- a/features/firstPartyData.md +++ b/features/firstPartyData.md @@ -63,7 +63,7 @@ pbjs.setConfig({ userrating: "4", data: [{ name: "www.dataprovider1.com", - ext: { "segtax": 1 }, + ext: { segtax: 4 }, segment: [ { id: "687" }, { id: "123" } @@ -177,6 +177,53 @@ pbjs.setBidderConfig({ // different bidders can receive different data }); {% endhighlight %} +### Supplying App Content Data + +Occasionally, an app which embeds a webview might run Prebid.js. In this case, the app object is often specified for OpenRTB, and the site object would be invalid. When this happens, one should specify app.content.data in place of site.content.data. + +{% highlight js %} +pbjs.setConfig({ + ortb2: { + app: { + name: "myappname", + keywords: "power tools, drills", + content: { + data: [ + { + name: "www.dataprovider1.com", + ext: { + segtax: 6 + }, + segment: [ + { + id: "687" + }, + { + id: "123" + } + ] + }, + { + name: "www.dataprovider1.com", + ext: { + segtax: 7 + }, + segment: [ + { + id: "456" + }, + { + id: "789" + } + ] + } + ] + } + } +} + +{% endhighlight %} + ## Segments and Taxonomy The [IAB](https://iab.com) offers standard content and audience taxonomies for categorizing sites and users. Prebid supports defining these values as first party data in `site.content.data` or `user.data` as shown in the examples above. From 40218f39516b6af0c15fa5a28631f9a4864a7b0a Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Tue, 28 Sep 2021 13:42:42 -0400 Subject: [PATCH 2/3] Update firstPartyData.md --- features/firstPartyData.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/firstPartyData.md b/features/firstPartyData.md index bdf438272c..1b50a77880 100644 --- a/features/firstPartyData.md +++ b/features/firstPartyData.md @@ -220,7 +220,7 @@ pbjs.setConfig({ ] } } -} +}) {% endhighlight %} From 7c866b82fa602311c912a1892924518e9188e69d Mon Sep 17 00:00:00 2001 From: bretg Date: Tue, 28 Sep 2021 17:15:49 -0400 Subject: [PATCH 3/3] fixing indentation --- features/firstPartyData.md | 67 +++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/features/firstPartyData.md b/features/firstPartyData.md index 1b50a77880..1d8f94ca29 100644 --- a/features/firstPartyData.md +++ b/features/firstPartyData.md @@ -183,44 +183,45 @@ Occasionally, an app which embeds a webview might run Prebid.js. In this case, t {% highlight js %} pbjs.setConfig({ - ortb2: { - app: { - name: "myappname", - keywords: "power tools, drills", - content: { - data: [ - { - name: "www.dataprovider1.com", - ext: { - segtax: 6 - }, - segment: [ - { - id: "687" + ortb2: { + app: { + name: "myappname", + keywords: "power tools, drills", + content: { + data: [ + { + name: "www.dataprovider1.com", + ext: { + segtax: 6 }, - { - id: "123" - } - ] - }, - { - name: "www.dataprovider1.com", - ext: { - segtax: 7 + segment: [ + { + id: "687" + }, + { + id: "123" + } + ] }, - segment: [ - { - id: "456" + { + name: "www.dataprovider1.com", + ext: { + segtax: 7 }, - { - id: "789" - } - ] - } - ] + segment: [ + { + id: "456" + }, + { + id: "789" + } + ] + } + ] + } } } -}) +) {% endhighlight %}