diff --git a/.sass-cache/5eb7d1ad8f5d191bdc09ff706ecde9f0bb94342b/main.scssc b/.sass-cache/5eb7d1ad8f5d191bdc09ff706ecde9f0bb94342b/main.scssc new file mode 100644 index 0000000000..487a2b9b62 Binary files /dev/null and b/.sass-cache/5eb7d1ad8f5d191bdc09ff706ecde9f0bb94342b/main.scssc differ diff --git a/404.md b/404.md index cd0bcb203a..c8ba3fe41a 100644 --- a/404.md +++ b/404.md @@ -2,7 +2,7 @@ layout: fourofour title: Page Not Found description: -hide: true + --- diff --git a/CNAME b/CNAME index 3c93479163..d329f03eb1 100644 --- a/CNAME +++ b/CNAME @@ -1 +1 @@ -prebid.org \ No newline at end of file +docs.prebid.org \ No newline at end of file diff --git a/_data/dropdown_v2.yml b/_data/dropdown_v2.yml index 794f585f6f..fdd1690b34 100644 --- a/_data/dropdown_v2.yml +++ b/_data/dropdown_v2.yml @@ -10,7 +10,7 @@ - subsectionId: 0 sectionId: 0 sectionName: Overview - title: What is Prebid? + title: Introduction link: /overview/intro.html needsDivider: 0 isHeader: 0 @@ -19,56 +19,22 @@ - subsectionId: 0 sectionId: 0 sectionName: Overview - title: Project Principles - link: /principles.html - needsDivider: 0 - isHeader: 0 - isSubSectionStart: 0 - - - subsectionId: 0 - sectionId: 0 - sectionName: Overview - title: Contributing - link: /contributing/contribute.html - needsDivider: 0 - isHeader: 0 - isSubSectionStart: 0 - - - subsectionId: 0 - sectionId: 0 - sectionName: Overview - title: About Prebid.Org - link: /overview/what-is-prebid-org.html + title: Developers + link: /developers.html needsDivider: 0 isHeader: 0 - isSubSectionStart: 0 + isSubSectionStart: 1 - subsectionId: 0 sectionId: 0 sectionName: Overview - title: Membership - link: /partners/partners.html + title: Ad Ops + link: /adops/before-you-start.html needsDivider: 0 isHeader: 0 - isSubSectionStart: 0 + isSubSectionStart: 1 - - subsectionId: 0 - sectionId: 0 - sectionName: Overview - title: Privacy Policy - link: /privacy.html - needsDivider: 0 - isHeader: 0 - isSubSectionStart: 0 - - subsectionId: 0 - sectionId: 0 - sectionName: Overview - title: Events - link: /prebid/events.html - needsDivider: 0 - isHeader: 0 - isSubSectionStart: 0 #----------Product SubNav------------ @@ -144,7 +110,7 @@ sectionId: 1 sectionName: Product title: Prebid Server - link: /prebid-server/prebid-server-overview.html + link: /prebid-server/overview/prebid-server-overview.html needsDivider: 1 isHeader: 0 isSubSectionStart: 1 @@ -320,15 +286,6 @@ isHeader: 0 isSubSectionStart: 0 - - subsectionId: 4 - sectionId: 2 - sectionName: Support - title: Blog - link: /blog.html - needsDivider: 0 - isHeader: 0 - isSubSectionStart: 1 - #-----------_Downloads--------------- - sectionId: 3 @@ -373,3 +330,30 @@ needsDivider: 0 isHeader: 0 isSubSectionStart: 0 + +#-----------Resources--------------- + +- sectionId: 4 + sectionName: Resources + link: + isHeader: 1 + hasSubMenus: 1 + submenus: + + - subsectionId: 0 + sectionId: 4 + sectionName: Resources + title: Prebid.org + link: http://www.prebid.org + needsDivider: 1 + isHeader: 0 + isSubSectionStart: 1 + + - subsectionId: 1 + sectionId: 4 + sectionName: Resources + title: Blog + link: http://www.prebid.org/blog + needsDivider: 0 + isHeader: 0 + isSubSectionStart: 1 diff --git a/_data/message.yml b/_data/message.yml index 648d16c179..987d4697f4 100644 --- a/_data/message.yml +++ b/_data/message.yml @@ -1,4 +1,4 @@ #-------------Message---------------- - messageId: 1 - messageText: - messageCreateDt: + messageText: Register for our webinar on Aug 27, 2020: How to Make Prebid the Supply Path Buyers Choose + messageCreateDt: 08_04_2020 diff --git a/_data/partners.yml b/_data/partners.yml index 5049b37343..8a606fc372 100644 --- a/_data/partners.yml +++ b/_data/partners.yml @@ -1,3 +1,13 @@ +- company: IndexExchange + link: https://www.indexexchange.com/ + imgURL: /assets/images/partners/leader/IX-logo.png + type: leader + +- company: Magnite + link: https://www.magnite.com/ + imgURL: /assets/images/partners/leader/Magnite_logo.png + type: leader + - company: MediaMath link: https://www.mediamath.com/ imgURL: /assets/images/partners/leader/MediaMath-wordmark.png @@ -13,11 +23,6 @@ imgURL: /assets/images/partners/leader/pubmatic.png type: leader -- company: Rubicon Project - link: https://rubiconproject.com/header-bidding-for-publishers/ - imgURL: /assets/images/partners/founders/rubicon.png - type: leader - - company: SpotX link: https://spotx.tv imgURL: /assets/images/partners/leader/spotx_logo.png @@ -103,6 +108,16 @@ imgURL: /assets/images/partners/publisher/chegg.png type: publisher +- company: diDNA + link: https://didna.io/ + imgURL: /assets/images/partners/publisher/didna-logo.png + type: publisher + +- company: Freestar + link: https://freestar.com/ + imgURL: /assets/images/partners/publisher/freestar-logo.png + type: publisher + - company: Glewed TV link: https://www.glewed.tv/ imgURL: /assets/images/partners/publisher/glewed_logo.png @@ -153,6 +168,11 @@ imgURL: /assets/images/partners/publisher/sortable.png type: publisher +- company: Havas + link: https://havasmedia.com/ + imgURL: /assets/images/partners/buyer/Havas_Media_Logo.png + type: buyer + - company: AdForm link: https://site.adform.com/ imgURL: /assets/images/partners/community/Adform-Logo.png @@ -210,11 +230,19 @@ link: https://jwplayer.com type: community +- company: Konduit + link: https://konduitvideo.com/ + type: community + - company: LiveIntent link: https://www.liveintent.com imgURL: /assets/images/partners/community/liveintent_logo.png type: community +- company: Lotame + link: https://www.lotame.com/ + type: community + - company: Media.net link: https://media.net type: community @@ -243,3 +271,11 @@ - company: Yeahmobi link: https://yeahmobi.com type: community + +- company: Yieldlab + link: https://yieldlab.de + type: community + +- company: Zeta Global + link: https://zetaglobal.com/ + type: community diff --git a/_data/sidebar.yml b/_data/sidebar.yml index c174d16a9a..5256fbe7be 100644 --- a/_data/sidebar.yml +++ b/_data/sidebar.yml @@ -76,7 +76,7 @@ subgroup: 1 - sbSecId: 0 - title: '  Header Bidding Wrapper' + title: '  Header Bidding' link: /wrapper_code_of_conduct.html isHeader: 0 isSectionHeader: 0 @@ -90,6 +90,13 @@ isSectionHeader: 0 subgroup: 0 +- sbSecId: 0 + title: '  Module Rules' + link: /dev-docs/module-rules.html + isHeader: 0 + isSectionHeader: 0 + subgroup: 0 + - sbSecId: 0 title: "Policies" link: @@ -536,6 +543,15 @@ sectionTitle: subgroup: 5 +- sbSecId: 1 + title: GPT Pre-Auction Module + link: /dev-docs/modules/gpt-pre-auction.html + isLastSubSectionItem: 1 + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 5 + - sbSecId: 1 title: External Interfaces link: @@ -1340,6 +1356,22 @@ sectionTitle: subgroup: 1 +- sbSecId: 4 + title: '  Akamai AMP' + link: /examples/video/instream/akamai/pb-ve-amp.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 1 + +- sbSecId: 4 + title: '  AdPlayer.Pro' + link: /examples/video/instream/adplayerpro/pb-ve-adplayerpro.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 1 + - sbSecId: 4 title: '  Brid' link: /examples/video/instream/brid/pb-ve-brid.html @@ -1568,6 +1600,14 @@ sectionTitle: subgroup: 1 +- sbSecId: 4 + title: '  AdPlayer.Pro' + link: /examples/video/outstream/pb-ve-outstream-app.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 1 + - sbSecId: 4 title: '  No Server' link: /examples/video/outstream/pb-ve-outstream-no-server.html @@ -1607,7 +1647,7 @@ sbCollapseId: prebid-server - sbSecId: 5 - title: Prebid Server Overview + title: Overview link: isHeader: 1 headerId: serveroverview @@ -1617,182 +1657,315 @@ - sbSecId: 5 title: Overview - link: /prebid-server/prebid-server-overview.html + link: /prebid-server/overview/prebid-server-overview.html isHeader: 0 isSectionHeader: 0 sectionTitle: subgroup: 0 - sbSecId: 5 - title: Developers + title: '  PBS+Prebid.js' + link: /prebid-server/use-cases/pbs-pbjs.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 0 + +- sbSecId: 5 + title: '  PBS+SDK' + link: /prebid-server/use-cases/pbs-sdk.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 0 + +- sbSecId: 5 + title: '  PBS+AMP' + link: /prebid-server/use-cases/pbs-amp.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 0 + +- sbSecId: 5 + title: '  PBS+Long-Form Video' + link: /prebid-server/use-cases/pbs-lfv.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 0 + +- sbSecId: 5 + title: '  Managed Solutions' + link: /prebid-server/hosting/hosted-servers.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 0 + +- sbSecId: 5 + title: '  Hosting Your Own PBS' + link: /prebid-server/hosting/pbs-hosting.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 0 + +- sbSecId: 5 + title: '  Bid Adapter List' + link: /dev-docs/pbs-bidders.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 0 + +- sbSecId: 5 + title: Versions link: isHeader: 1 - headerId: serverdevelopers + headerId: pbsversions isSectionHeader: 0 sectionTitle: - subgroup: 1 + subgroup: 2 - sbSecId: 5 - title: Add A New Analytics Module - link: /prebid-server/developers/add-new-analytics-module.html + title: '  Overview' + link: /prebid-server/versions/pbs-versions-overview.html isHeader: 0 isSectionHeader: 0 sectionTitle: - subgroup: 1 + subgroup: 2 - sbSecId: 5 - title: Add A Bidder - link: /prebid-server/developers/add-new-bidder.html + title: '  Go' + link: /prebid-server/versions/pbs-versions-go.html isHeader: 0 isSectionHeader: 0 sectionTitle: - subgroup: 1 + subgroup: 2 - sbSecId: 5 - title: Prebid Server Bidders - Additional Info - link: /prebid-server/developers/pbs-bidder-info.html + title: '  Java' + link: /prebid-server/versions/pbs-versions-java.html isHeader: 0 isSectionHeader: 0 sectionTitle: - subgroup: 1 + subgroup: 2 + +- sbSecId: 5 + title: Product Features + link: + isHeader: 1 + headerId: serverfeatures + isSectionHeader: 0 + sectionTitle: + subgroup: 3 - sbSecId: 5 - title: Cookie Sync Technical Details - link: /prebid-server/developers/cookie-syncs.html + title: Feature Summary + link: /prebid-server/features/pbs-feature-idx.html isHeader: 0 isSectionHeader: 0 sectionTitle: - subgroup: 1 + subgroup: 3 - sbSecId: 5 - title: COPPA Compliance - link: /prebid-server/developers/coppa.html + title: Caching + link: /prebid-server/features/pbs-caching.html isHeader: 0 isSectionHeader: 0 sectionTitle: - subgroup: 1 + subgroup: 3 - sbSecId: 5 - title: Currency Converter - link: /prebid-server/developers/currency-converter.html + title: Currency Conversion + link: /prebid-server/features/pbs-currency.html isHeader: 0 isSectionHeader: 0 sectionTitle: - subgroup: 1 + subgroup: 3 - sbSecId: 5 - title: Default Request - link: /prebid-server/developers/default-request.html + title: Interstitials + link: /prebid-server/features/pbs-interstitials.html isHeader: 0 isSectionHeader: 0 sectionTitle: - subgroup: 1 + subgroup: 3 - sbSecId: 5 - title: GDPR Mechanics - link: /prebid-server/developers/gdpr.html + title: Privacy Support (GDPR, CCPA, etc) + link: /prebid-server/features/privacy/pbs-privacy.html isHeader: 0 isSectionHeader: 0 sectionTitle: - subgroup: 1 + subgroup: 3 - sbSecId: 5 title: Stored Requests - link: /prebid-server/developers/stored-requests.html + link: /prebid-server/features/pbs-storedreqs.html isHeader: 0 isSectionHeader: 0 sectionTitle: - subgroup: 1 + subgroup: 3 + +- sbSecId: 5 + title: Deals + link: /prebid-server/features/pbs-deals.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 3 + +- sbSecId: 5 + title: Developers + link: + isHeader: 1 + headerId: serverdevelopers + isSectionHeader: 0 + sectionTitle: + subgroup: 5 + +- sbSecId: 5 + title: Cookie Sync + link: /prebid-server/developers/pbs-cookie-sync.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 5 + +- sbSecId: 5 + title: Building a Bidder Adapter + link: /prebid-server/developers/add-new-bidder-go.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 5 + +- sbSecId: 5 + title: Building an Analytics Adapter + link: /prebid-server/developers/pbs-build-an-analytics-adapter.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 5 + +- sbSecId: 5 + title: Code Reviews + link: /prebid-server/developers/code-reviews.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 5 - sbSecId: 5 title: Endpoints link: isHeader: 1 - headerId: endpoints + headerId: pbsendpoints isSectionHeader: 0 sectionTitle: - subgroup: 2 + subgroup: 6 - sbSecId: 5 - title: Info - Bidders - link: /prebid-server/endpoints/info/bidders.html + title: Overview + link: /prebid-server/endpoints/pbs-endpoint-overview.html isHeader: 0 isSectionHeader: 0 sectionTitle: - subgroup: 2 + subgroup: 6 - sbSecId: 5 - title: Info - Bidder Name - link: /prebid-server/endpoints/info/bidders/bidderName.html + title: '  /info' + link: /prebid-server/endpoints/info/pbs-endpoint-info.html isHeader: 0 isSectionHeader: 0 sectionTitle: - subgroup: 2 + subgroup: 6 - sbSecId: 5 - title: Bidders - Params - link: /prebid-server/endpoints/bidders/params.html + title: '  /cookie_sync' + link: /prebid-server/endpoints/pbs-endpoint-cookieSync.html isHeader: 0 isSectionHeader: 0 sectionTitle: - subgroup: 2 + subgroup: 6 - sbSecId: 5 - title: Starting Cookie Sync - link: /prebid-server/endpoints/cookieSync.html + title: '  /openrtb2/auction' + link: /prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html isHeader: 0 isSectionHeader: 0 sectionTitle: - subgroup: 2 + subgroup: 6 - sbSecId: 5 - title: Prebid Server Auction - link: /prebid-server/endpoints/openrtb2/auction.html + title: '  /openrtb2/amp' + link: /prebid-server/endpoints/openrtb2/pbs-endpoint-amp.html isHeader: 0 isSectionHeader: 0 sectionTitle: - subgroup: 2 + subgroup: 6 - sbSecId: 5 - title: Prebid Server AMP - link: /prebid-server/endpoints/openrtb2/amp.html + title: '  /openrtb2/video' + link: /prebid-server/endpoints/openrtb2/pbs-endpoint-video.html isHeader: 0 isSectionHeader: 0 sectionTitle: - subgroup: 2 + subgroup: 6 - sbSecId: 5 - title: Prebid Server Video - link: /prebid-server/endpoints/openrtb2/video.html + title: '  /setuid' + link: /prebid-server/endpoints/pbs-endpoint-setuid.html isHeader: 0 isSectionHeader: 0 sectionTitle: - subgroup: 2 + subgroup: 6 - sbSecId: 5 - title: Saving User Syncs - link: /prebid-server/endpoints/setuid.html + title: '  /getuids' + link: /prebid-server/endpoints/pbs-endpoint-getuids.html isHeader: 0 isSectionHeader: 0 sectionTitle: - subgroup: 2 + subgroup: 6 - sbSecId: 5 - title: Get User Syncs - link: /prebid-server/endpoints/getuids.html + title: '  /status' + link: /prebid-server/endpoints/pbs-endpoint-status.html + Item: 1 isHeader: 0 isSectionHeader: 0 sectionTitle: - subgroup: 2 + subgroup: 6 - sbSecId: 5 - title: Get Status - link: /prebid-server/endpoints/status.html + title: '  Event Endpoints' + link: /prebid-server/endpoints/pbs-endpoint-event.html Item: 1 isHeader: 0 isSectionHeader: 0 sectionTitle: - subgroup: 2 + subgroup: 6 + +- sbSecId: 5 + title: '  Admin Endpoints' + link: /prebid-server/endpoints/pbs-endpoint-admin.html + Item: 1 + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 6 + +- sbSecId: 5 + title: '  Prebid Cache Endpoints' + link: /prebid-server/endpoints/pbs-endpoints-pbc.html + Item: 1 + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 6 #--------------Formats--------------| diff --git a/_includes/adops/adops-creative-declaration.html b/_includes/adops/adops-creative-declaration.html new file mode 100644 index 0000000000..e7fcc0d2a8 --- /dev/null +++ b/_includes/adops/adops-creative-declaration.html @@ -0,0 +1,10 @@ +As of August 2020, privacy regulations have changed such that new creatives entered +in GAM may require a declaration of the ad technology provider. The first step +is to note the domain you serve the creative from. The examples above offer the +use of the jsdelvr.com CDN. However, you may obtain the creative from a managed +service or you may host it yourself. If you receive a warning from ad manager +about "declaring self-created ad technology", you should be able to work around +this by editing the creative and filling out the "Associated Ad Technology Provid +ers" section as shown in this screen capture: + +

Creative Declaration

diff --git a/_includes/adops/adops-gam-setup.html b/_includes/adops/adops-gam-setup.html index 5b1aed0ca3..f5c9eee240 100644 --- a/_includes/adops/adops-gam-setup.html +++ b/_includes/adops/adops-gam-setup.html @@ -34,17 +34,17 @@

Step 1. Add a line item

Enter all of the inventory sizes that your website has.

-

Inventory Sizes

+

Inventory Sizes

Because header bidding partners return prices, set the Line Item Type to Price priority to enable them to compete on price.

-

Price Priority

+

Price Priority


Set the Rate to $0.50 so that this line item will compete with your other demand sources at $0.50 ECPM.

-

Rate

+

Rate


@@ -52,7 +52,7 @@

Step 1. Add a line item

Set Rotate Creatives to Evenly.

-

Display and Rotation

+

Display and Rotation

Choose the inventory that you want to run header bidding on.

@@ -62,7 +62,7 @@

Step 1. Add a line item

You must enter the value to two decimal places, e.g., 1.50. If you don’t use two decimal places, header bidding will not work.

-

Key-values

+

Key-values


@@ -97,23 +97,33 @@

Step 2. Add a Creative

</script> -

New creative

+

New creative

Make sure the creative size is set to 1x1. This allows us to set up size override, which allows this creative to serve on all inventory sizes.

Note that safeframes don’t work with older versions of Prebid.js (v1.23 and before) in combination with recent versions of Prebid Universal Creative.

+As of August 2020, privacy regulations have changed such that new creatives entered +in GAM may require a [declaration of the ad technology provider](https://support.google.com/admanager/answer/9972771?hl=en). The first step +is to note the domain you serve the creative from. The examples above offer the +use of the jsdelvr.com CDN. However, you may obtain the creative from a managed +service or you may host it yourself. If you receive a warning from ad manager +about "declaring self-created ad technology", you should be able to work around +this by editing the creative and filling out the "Associated Ad Technology Providers" section as shown in this screen capture: + +

Creative Declaration

+

Step 3. Attach the Creative to the Line Item

Next, let’s attach the creative to the $0.50 line item you just created. Click into the Line Item, then the Creatives tab.

There will be yellow box showing each ad spot that you haven’t uploaded creatives for yet. Since you’ve already made the creatives, click use existing creatives next to each size.

-

Use existing creatives list

+

Use existing creatives list

In the pop-up dialog that appears, click Show All to remove the default size filters and see the 1x1 creatives. Include the prebid creative and click Save.

-

Use existing creatives dialog

+

Use existing creatives dialog

Back in the line item, go into the Creatives tab again, and click into the creative you just added.

diff --git a/_includes/adops/adops-gam-video-setup.html b/_includes/adops/adops-gam-video-setup.html index 67ea3ac629..5aa6714df9 100644 --- a/_includes/adops/adops-gam-video-setup.html +++ b/_includes/adops/adops-gam-video-setup.html @@ -49,13 +49,13 @@

Single Cache Location

If you’re using a single order for all bidders, then the VAST URL will be the same for each bidder:

-
   https://prebid.adnxs.com/pbc/v1/cache?uuid=%%PATTERN:hb_cache_id%%
+
   https://prebid.adnxs.com/pbc/v1/cache?uuid=%%PATTERN:hb_uuid%%
 or
    [other bidder cache location]

If you’re using different orders for each bidder, the VAST URL for each will include the bidder-specific targeting variable:

-
   https://prebid.adnxs.com/pbc/v1/cache?uuid=%%PATTERN:hb_cache_id_BIDDERCODE%%
+
   https://prebid.adnxs.com/pbc/v1/cache?uuid=%%PATTERN:hb_uuid_BIDDERCODE%%
 or
    [other bidder cache location]
diff --git a/_includes/head.html b/_includes/head.html index e7caaf4207..1fd9868492 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -7,42 +7,43 @@ - + - - + + {% if page.head_title %} {{page.head_title}} {% else %} {{page.title}} for Header Bidding {% endif %} - + + + + + - - - - + + - - + - + - + - + diff --git a/_includes/video/pb-is-amp.html b/_includes/video/pb-is-amp.html new file mode 100644 index 0000000000..f860fe9596 --- /dev/null +++ b/_includes/video/pb-is-amp.html @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + {% if page.head_title %} + {{page.head_title}} + {% else %} + {{page.title}} for Header Bidding + {% endif %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_includes/video/pb-is-amp.html b/_includes/video/pb-is-amp.html new file mode 100644 index 0000000000..f860fe9596 --- /dev/null +++ b/_includes/video/pb-is-amp.html @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + {% if page.head_title %} + {{page.head_title}} + {% else %} + {{page.title}} for Header Bidding + {% endif %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_includes/video/pb-is-app.html b/_includes/video/pb-is-app.html new file mode 100644 index 0000000000..82498b5a45 --- /dev/null +++ b/_includes/video/pb-is-app.html @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + {% if page.head_title %} + {{page.head_title}} + {% else %} + {{page.title}} for Header Bidding + {% endif %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_includes/video/pb-os-app.html b/_includes/video/pb-os-app.html new file mode 100644 index 0000000000..8a2af8afba --- /dev/null +++ b/_includes/video/pb-os-app.html @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + {% if page.head_title %} + {{page.head_title}} + {% else %} + {{page.title}} for Header Bidding + {% endif %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_includes/video/pb-ve-lf-fw.html b/_includes/video/pb-ve-lf-fw.html new file mode 100644 index 0000000000..875f0bd6e2 --- /dev/null +++ b/_includes/video/pb-ve-lf-fw.html @@ -0,0 +1,355 @@ + + + + + + + + + + + + + + {% if page.head_title %} + {{page.head_title}} + {% else %} + {{page.title}} for Header Bidding + {% endif %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_includes/wth_form.html b/_includes/wth_form.html new file mode 100644 index 0000000000..441c3e7b4f --- /dev/null +++ b/_includes/wth_form.html @@ -0,0 +1,25 @@ + +
+ +
+ +
 
+ +
+

Was this page helpful?

+
+ +
+ +
+ +
+
+

+ +

+ +
+
+ +
diff --git a/_layouts/home.html b/_layouts/home.html index 4f6aff783e..46b859ff1f 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -3,179 +3,151 @@ {% include nav.html %}
- -
- -

{% include footer.html %}

-
- -
- -
-
-

Header bidding unwrapped

-

Earn more from your advertising with Prebid, a transparent, open-source solution that increases advertiser demand while maintaining a fast and responsive user experience.

-
+ +
+ +
+
 
+
+
Visit Prebid.org for general product overviews, blog updates, and additional information on membership and events. +
- - -
-
- + - + +
; +

Prebid Outstream Video Ad

+

- \ No newline at end of file diff --git a/faq/faq.md b/faq/faq.md index db5e22e002..de57ee611b 100644 --- a/faq/faq.md +++ b/faq/faq.md @@ -24,5 +24,5 @@ Check out the [Prebid.js FAQ](/dev-docs/faq.html). If you don't find what you ne If you don't find answers to your questions in the [Prebid Server FAQ](/faq/prebid-server-faq.html), you can learn more here: - [Troubleshooting](/troubleshooting/troubleshooting.html) -- [Prebid Server Overview](/prebid-server/prebid-server-overview) +- [Prebid Server Overview](/prebid-server/overview/prebid-server-overview.html) - [Resources](/support/index.html) diff --git a/faq/prebid-server-faq.md b/faq/prebid-server-faq.md index 46063c8bc7..a8aa0be63d 100644 --- a/faq/prebid-server-faq.md +++ b/faq/prebid-server-faq.md @@ -101,77 +101,4 @@ the hosting company in some scenarios, but it's technically unavoidable and bett ## How does Prebid Server support privay signals? -### Mobile 'Limit Ad Tracking' flag - -If PBS receives 'device.lmt' flag in the OpenRTB request, it does the following anonymization: - -- Mask take off the last byte of the IPv4 address and the last 2 bytes of IPv6 addresses -- Removes user.id and user.buyeruid -- Removes the request.device.ifa attribute -- Rounds the request.device.geo. {lat,lon} to two decimal places - -### GDPR - -Prebid Server host companies and publishers have the ability to control the enforcement -activities that take place. - -The enforcement strategy changed significantly between TCF 1.1 and TCF 2.0. [TCF2](https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20Consent%20string%20and%20vendor%20list%20formats%20v2.md) is a -more nuanced and stricter policy. - -#### TCF 1.1 - -If Prebid Server determines that the user is in GDPR scope and doesn't consent -to *all* of the vendor's 'purposes' as declared in the Global Vendor List, it 'anonymizes' -the request to the adapters: - -- Mask take off the last byte of the IPv4 address and the last 2 bytes of IPv6 addresses -- Removes user.id and user.buyeruid -- Removes the request.device.ifa attribute -- Rounds the request.device.geo. {lat,lon} to two decimal places - -Full details are available [here](https://github.com/rubicon-project/prebid-server-java/blob/master/docs/developers/PrebidServerJava_GDPR_Requirements.pdf). - -#### TCF 2.0 - -If Prebid server determines the user is in GDPR scope, then consent is independently tested -for each 'Purpose' with different consequences for each: - -{: .table .table-bordered .table-striped } -| TCF Purpose | Consequence of Not Obtaining Consent | -| ----------- | ------------------------------------ | -| 1 - Device Access | Prevents one or more usersync activities for one or more vendors. | -| 2 - Basic Ads | May result in skipping one or more bid adapters in the auction. | -| 4 - Personalized Ads | May result in removing the userIds before calling one or more bid adapters. | -| 7 - Measure Ad Performance | May result in skipping one or more analytics adapters. | -| Special Feature 1 - Use precise geolocation data | May result in rounding lat/long values and IP address before sending to server-side adapters. | - -{: .alert.alert-danger :} -Note: Support for TCF purposes other than Device Access is still under development and is -expected to be released in May 2020. - -More details are available [here](https://docs.google.com/document/d/1fBRaodKifv1pYsWY3ia-9K96VHUjd8kKvxZlOsozm8E/edit#). - -### COPPA - -The [Children's Online Privacy Protection Act (COPPA)](https://www.ftc.gov/enforcement/rules/rulemaking-regulatory-reform-proceedings/childrens-online-privacy-protection-rule) is a law in the US which imposes certain requirements on operators of websites or online services directed to children under 13 years of age, and on operators of other websites or online services that have actual knowledge that they are collecting personal information online from a child under 13 years of age. -If `regs.coppa` is set to '1' on the OpenRTB request, the following anonymization actions take place before going to the adapters: - -- Removes all ID fields: device.ifa, device.macsha1, device.macmd5, device.dpidsha1, device.dpidmd5, device.didsha1, device.didmd5 -- Truncate ip field - remove lowest 8 bits. -- Truncate ipv6 field - remove lowest 32 bits. -- Remove geo.lat, geo.lon. geo.metro, geo.city, and geo.zip -- Remove user.id, user.buyeruid, user.yob, and user.gender - -### CCPA / US-Privacy - -The [California Consumer Privacy Act (CCPA)](https://oag.ca.gov/privacy/ccpa) is a law in the US. which covers consumer rights relating to the access to, deletion of, and sharing of personal information that is collected by businesses. -The IAB has generalized -this state-specific rule into a [US Privacy](https://iabtechlab.com/standards/ccpa/) compliance framework. -If `regs.ext.us_privacy` is parsed to find that the user has opted-out of a "sale", -the following anonymization steps are taken: - -- Mask the last byte of the IPv4 address and the last 2 bytes of IPv6 addresses -- Removes user.id and user.buyeruid -- Removes the request.device.ifa attribute -- Rounds the request.device.geo. {lat,lon} to two decimal places - +See the [Prebid Server Privacy Feature Page](/prebid-server/features/privacy/pbs-privacy.html) diff --git a/features/pbAdSlot.md b/features/pbAdSlot.md index 8f891ee77f..8b72ebb6a7 100644 --- a/features/pbAdSlot.md +++ b/features/pbAdSlot.md @@ -34,7 +34,7 @@ Example page function: // Use adunit.fpd.context.pbAdSlot if it exists. Otherwise, if the // the adunit.code is a div ID, then look for a data-adslotid attribute, then look a matching slot in GPT // Otherwise, just use the AdUnit.code -var setPbAdSlot = function setPbAdSlot(adunits) { +var setPbAdSlot = function setPbAdSlot(adUnits) { // set pbAdSlot for all ad units adUnits.forEach(function (adUnit) { if (!adUnit.fpd) { @@ -100,7 +100,7 @@ Some scenarios that could be supported: ## Prebid Server -The OpenRTB location for the Prebid Ad Slot is `imp[].ext.context.data.adslot`: +The OpenRTB location for the Prebid Ad Slot is `imp[].ext.context.data.pbadslot`: - The Prebid SDK will place the value there. - AMP Stored Requests should place the value there if desired. diff --git a/formats/amp.md b/formats/amp.md index 303e5abf83..484b14b34c 100644 --- a/formats/amp.md +++ b/formats/amp.md @@ -26,7 +26,7 @@ At a high level, setting up AMP pages for header bidding with Prebid has these s ## Developers -+ [How Prebid on AMP works]({{site.baseurl}}/dev-docs/how-prebid-on-amp-works.html) -+ [Prebid AMP Implementation Guide]({{site.baseurl}}/dev-docs/show-prebid-ads-on-amp-pages.html) -+ [Prebid Server AMP endpoint documentation]({{site.baseurl}}/prebid-server/endpoints/openrtb2/amp.html) ++ [How Prebid on AMP works](/prebid-server/use-cases/pbs-amp.html) ++ [Prebid AMP Implementation Guide](/dev-docs/show-prebid-ads-on-amp-pages.html) ++ [Prebid Server AMP endpoint documentation](/prebid-server/endpoints/openrtb2/pbs-endpoint-amp.html) diff --git a/guide.md b/guide.md index c464046cdb..35e8d5a788 100644 --- a/guide.md +++ b/guide.md @@ -3,7 +3,7 @@ layout: page_v2 title: prebid.org website guide description: details about how the site works isNew: false -hide: true + sidebarType: 0 --- diff --git a/overview/analytics.md b/overview/analytics.md index 87eadbe24b..022a2dbc77 100644 --- a/overview/analytics.md +++ b/overview/analytics.md @@ -30,6 +30,7 @@ There are several analytics adapter plugins available to track header bidding pe | Media.net |
Contact vendor| [Website](https://media.net) | | PrebidAnalytics by Roxot | [Paid]( http://prebidanalytics.roxot.com/) | [Website](http://prebidanalytics.roxot.com/) | | [Prebid Manager](https://prebidmanager.com/) | Free trial and free up to a certain volume. See [pricing](http://prebidmanager.com/#pricing) | [Website](http://prebidmanager.com/) | +| [Pubperf](https://www.pubperf.com/) | Free trial. See [pricing](https://www.pubperf.com/pricing) | [Website](http://www.pubperf.com/) | | [Pubstack](https://pubstack.io?source=prebid.org-analytics) ~ Real Time Analytics For Prebid and GAM | Start a free trial / Talk to the Sales Team | [Website](https://pubstack.io?source=prebid.org-analytics) | | PubWise | Free & Paid, see [pricing](https://pubwise.io/pricing/) | [Website](https://www.pubwise.io/) | | PulsePoint | Contact vendor | [Website](https://www.pulsepoint.com/) | @@ -44,7 +45,7 @@ There are several analytics adapter plugins available to track header bidding pe | Tercept Analytics | Contact vendor | [Website](https://www.tercept.com/)| | ucfunnel | Contact vendor | [Website](https://www.ucfunnel.com/)| | Yieldone | Contact vendor | [Website](https://www.platform-one.co.jp/) | -| YuktaMedia Analytics | Contact vendor | [Website](https://yuktamedia.com/publishers/prebid/) | +| YuktaOne Analytics by YuktaMedia | Freemium \| Contact vendor | [Website](https://yuktamedia.com/prebid/) | None of these analytics options are endorsed or supported by Prebid.org. diff --git a/overview/intro.md b/overview/intro.md index dd4eb22fa0..d1940f8769 100644 --- a/overview/intro.md +++ b/overview/intro.md @@ -77,7 +77,7 @@ A simple Prebid.js process follows these steps: Prebid Server provides a server-side solution to header bidding. Built on the same core principles as Prebid.js, our server solution can reduce latency and improve page load time. Several Prebid.org members provide hosted solutions, enabling publishers to receive the benefits of server-side header bidding without the need to implement and manage the process themselves. -If a publisher would prefer to implement their own solution, [source code](https://github.com/prebid/prebid-server) is available from our Github page and detailed instructions for configuring, deploying and testing your implementation can be found in the [Prebid Server section](/prebid-server/prebid-server-overview.html) of this site. +If a publisher would prefer to implement their own solution, [source code](https://github.com/prebid/prebid-server) is available from our Github page and detailed instructions for configuring, deploying and testing your implementation can be found in the [Prebid Server section](/prebid-server/overview/prebid-server-overview.html) of this site. **Prebid Server process** @@ -112,7 +112,7 @@ The PBM header bidding process follows these steps: ![Prebid Mobile Flowchart](/assets/images/flowcharts/pb-mobile.png) ## Further Reading -+ [Prebid.js]({{site.baseurl}}/prebid/prebidjs.html) -+ [Prebid Server]({{site.baseurl}}/dev-docs/get-started-with-prebid-server.html) -+ [Prebid Mobile]({{site.baseurl}}/prebid-mobile/prebid-mobile.html) ++ [Prebid.js](/prebid/prebidjs.html) ++ [Prebid Server](/prebid-server/overview/prebid-server-overview.html) ++ [Prebid Mobile](/prebid-mobile/prebid-mobile.html) + [Managed Prebid Solutions](/prebid/managed.html) diff --git a/overview/prebid-troubleshooting-guide.md b/overview/prebid-troubleshooting-guide.md index 0a9c6bbb91..5ad659f146 100644 --- a/overview/prebid-troubleshooting-guide.md +++ b/overview/prebid-troubleshooting-guide.md @@ -4,7 +4,7 @@ title: Prebid.js Troubleshooting Guide head_title: Prebid.js Troubleshooting Guide description: How to troubleshoot Prebid.js from the perspective of an ad call from start to finish. pid: 0 -hide: true + sidebarType: 0 --- diff --git a/overview/prebid-universal-creative.md b/overview/prebid-universal-creative.md index 11f52b9084..77e1a99d17 100644 --- a/overview/prebid-universal-creative.md +++ b/overview/prebid-universal-creative.md @@ -8,24 +8,23 @@ nav_section: intro
-# Prebid Universal Creative Overview +# Prebid Universal Creative {:.no_toc} The Prebid Universal Creative makes it easier for publishers to configure Prebid in their ad server. The Prebid Universal Creative provides a single creative configuration that can be used across many formats, platforms, devices, and ad servers. -## Where to Use Prebid Universal Creative +Specifically, you need to use the Universal Creative in these scenarios: -The Prebid Universal Creative supports the following formats: +- AMP and Prebid SDK (these require loading creatives from cache) +- when you need to support safeframes +- when you need to support native -- Banner -- Outstream video -- SafeFrame/Non-SafeFrame +If you only ever need to display non-safeframed banner and outstream-video creatives, you may use +the original simple approach of just calling the Prebid.js `renderAd` function directly: -The Prebid Universal Creative supports the following channels: - -- Web/mobile web -- Mobile app -- AMP pages +``` + +``` ## How to Implement diff --git a/overview/what-is-prebid-org.md b/overview/what-is-prebid-org.md index 5a20989c39..213e6a5388 100644 --- a/overview/what-is-prebid-org.md +++ b/overview/what-is-prebid-org.md @@ -5,8 +5,6 @@ description: An overview of Prebid.org, the organization behind Prebid, and what sidebarType: 0 --- - - # About Prebid.org Header bidding has seen incredible adoption across the industry, and Prebid.js has been an integral part of that. AppNexus (now Xandr) created Prebid.js, but considered it too important to be owned by any one company. Thus, Prebid.org was created. @@ -17,6 +15,33 @@ Prebid.org is open to all companies who are part of the programmatic ecosystem, [Learn more](/partners/partners.html) about becoming a member of Prebid.org. +## Operations +Managed through Product Management Committees (PMCs) +- Each PMC has a Chair and Members. +- The Chair manages the PMC process and facilitates how the members contribute. +- PMCs drive open source software development as well as events and activities. +- To obtain more information about becoming a member of Prebid.org, email membership@prebid.org. + +## Focus on Value +We focus on providing value-add to publishers and encourage the industry to deploy fair and efficient wrappers. +Prebid takes two approaches to accomplish this: + +### Wrapper Code of Conduct +Prebid members must agree to support the [Wrapper Code of Conduct](http://prebid.org/wrapper_code_of_conduct.html +). This ensures that all wrapper providers are operating within the same principles. + +### Trademark +We support wrappers based on Prebid technology with rights to the **Powered by Prebid** brand. + +## Current Projects +All Prebid projects are open source and licensed under Apache License 2.0. +- [Prebid.js](/prebid/prebidjs.html), including [Prebid Video](/prebid-video/video-overview.html) and [Prebid Native](/dev-docs/examples/native-ad-example.html): Header bidding on desktop and mobile web. +- [Prebid Server](/prebid-server/overview/prebid-server-overview.html): Server-to-server header bidding. +- [Prebid Mobile](/prebid-mobile/prebid-mobile.html): SDK for mobile app header bidding on iOS and Android. Works in conjunction with Prebid Server. +- Continuing work on our tools, website, and documentation. +Prebid welcomes any contribution on these projects! + + Read more here: * [Prebid.org Members and Partners](/partners/partners.html) diff --git a/prebid-mobile/adops-native-setup.md b/prebid-mobile/adops-native-setup.md index b7f969488a..0c274fbb58 100644 --- a/prebid-mobile/adops-native-setup.md +++ b/prebid-mobile/adops-native-setup.md @@ -10,21 +10,19 @@ sidebarType: 3 Prebid Mobile enables publishers to display native ads within their apps. This page provides instructions for setting up ad ops for both Google Ad Manager and MoPub. -* TOC -{:toc } ## Google Ad Manager -Follow these instructions to set up a Native ad with HTML and CSS. For more detailed information refer to the [Google Ad Manager documentation](https://support.google.com/admanager/answer/7661907). +The following instructions are for setting up a Native ad with HTML and CSS. For more detailed information refer to the [Google Ad Manager documentation.](https://support.google.com/admanager/answer/7661907) 1. Sign in to your Google Ad Manager account. -2. Click **Delivery > Native**. -3. Click **New Native Ad**. -4. Click **Select** in the "HTML & CSS editor" box. The *Define ad settings* page will appear. On this page, do the following to create your native ad template: +2. Click Delivery > Native. +3. Click New Native Ad. +4. Click Select in the "HTML & CSS editor" box. The *Define ad settings* page will appear. - a. Select an ad size of `fluid`. This tells Ad Manager to automatically size the ad to match available space. + a. Select an ad size of `fluid`. With the Fluid size, Ad Manager will automatically size the ad to match available space. b. Select an existing format or create a new one. (Formats are the variables that make up the content of your ad.) - c. Style your ad with HTML and CSS. (See the code sample below.) + c. Style your ad with HTML and CSS. (See code sample below) Add your styles in the CSS tab in Ad Manager. A native ad is made up of assets, image URL, titles, descriptions, icons, etc. that are plugged into the template we've just created. The template includes placeholder macros for those assets, and may be styled to match the form of the surrounding page. @@ -35,8 +33,8 @@ Follow these instructions to set up a Native ad with HTML and CSS. For more deta d. Set the targeting to default and save. -5. [Create a line item](/prebid-mobile/adops-line-item-setup-dfp.html) targeting this ad unit and an `hb_pb price`; for expected creatives, put in the ad format you specified in step 4.b. -6. Create a native creative using the native styles (and the ad format created/used with the native styles), associating it with the line item. +5. [Create a line item](/prebid-mobile/adops-line-item-setup-dfp.html) targeting this ad unit and a `hb_pb price`, for expected creatives, put in the ad format in step 4.b. +6. Create a native creative using the native styles (and the ad format created/used with the native styles), associating it with the line item
**Example** @@ -61,10 +59,10 @@ Follow these instructions to set up a Native ad with HTML and CSS. For more deta ## MoPub -These instructions describe how to add a Native ad with the MoPub SDK. For more detailed information review the MoPub Native ad documentation for [iOS](https://developers.mopub.com/publishers/ios/native/) and [Android](https://developers.mopub.com/publishers/android/native/). +The instructions below describe how to add a Native ad with the MoPub SDK. For more detailed information review the MoPub Native ad documentation for [iOS](https://developers.mopub.com/publishers/ios/native/) and [Android](https://developers.mopub.com/publishers/android/native/). - 1. Create a `Medium rectangle` Ad Unit. - 2. Create a non-guaranteed line item targeting this ad unit and an `hb_pb price`. + 1. Create a `Medium rectangle` Ad Unit + 2. Create a non-guaranteed line item targeting this ad unit and a `hb_pb price` 3. Create a creative with 300x250 Medium Rectangle format, choose HTML and put in the following code: ```html @@ -86,7 +84,7 @@ These instructions describe how to add a Native ad with the MoPub SDK. For more ``` {% capture noteAlert %} -Do not to check Mraid ad.z. +Note not to check Mraid ad.z {% endcapture %} {% include alerts/alert_note.html content=noteAlert %} diff --git a/prebid-mobile/adops-price-granularity.md b/prebid-mobile/adops-price-granularity.md index 1358b82b25..4d883ba8ff 100644 --- a/prebid-mobile/adops-price-granularity.md +++ b/prebid-mobile/adops-price-granularity.md @@ -1,26 +1,24 @@ --- layout: page_v2 -title: Price Granularity -description: Price granularity -pid: 2 -top_nav_section: prebid-mobile -nav_section: prebid-mobile-adops +title: Mobile Price Granularity +description: Mobile Price granularity sidebarType: 3 --- -# Price Granularity +# Prebid Mobile Price Granularity -With Prebid Mobile, you’ll need to setup line items to tell your ad server how much money the “bidder” demand is worth to you. This process is done via key-values. +With Prebid Mobile, you’ll need to setup line items to tell your ad server how much money the “bidder” demand is worth to you. This process is done with an ad server key-value pair: `hb_pb`, which stands for "header bidding price bucket". Example: - * Prebid Mobile is going to call Prebid Server which calls your bidders for their price, then passes it into your ad server on the query-string. You want to target this bid price with a line item that earns you the same amount if it serves. * If you had 1-line item for every bid at a penny granularity of $0.01, $0.02, $0.03, ..., 1.23, ..., $4.56 you’d need 1,000 line items just to represent bids from $0-$10. We call this the “Exact” granularity option. * Creating 1,000 line items can be a hassle, so publishers typically use price buckets to represent price ranges that matter. For example, you could group bids into 10 cent increments, so bids of $1.06 or $1.02 would be rounded down into a single price bucket of $1.00. +The SDK itself doesn't deal with granularity. Instead, these details are set up in Prebid Server and your ad server. The specific details about how to set up the price granularity will differ for each Prebid Mobile managed service company -- check with your provider to get details for their system. + ## Accepted values for price granularity + `"low"`: $0.50 increments, capped at $5 CPM @@ -28,6 +26,12 @@ Example: + `"high"`: $0.01 increments, capped at $20 CPM + `"auto"`: Applies a sliding scale to determine granularity as shown in the [Auto Granularity](#autoGranularityBucket) table below. + `"dense"`: Like `"auto"`, but the bid price granularity uses smaller increments, especially at lower CPMs. For details, see the [Dense Granularity](#denseGranularityBucket) table below. ++ `"custom"`: If none of the above apply, your service provider should provide a way to establish arbitrary price buckets. + +Notes: +- Banner and outstream video generally share the same ad server line items. +- PBS-Java support the "mediatypepricegranularity" enhancement, which lets you define different +granularities for banner and video @@ -54,10 +58,8 @@ Example: | CPM > $20 | Caps the price bucket at $20 | $24.82 floored to $20.00 | -{: .alert.alert-success :} -**Action Item:** Once you have decided the price granularity, go to Prebid Server [account page](https://prebid.adnxs.com/account/) to set the price granularity setting for your account. - +Please contact your Prebid Mobile host company for details about how to implement granularity. -The below screenshot is taken from the Prebid Server account page where you can choose your price granularity setting from the options. +## Further Reading -![Key-values]({{ site.github.url }}/assets/images/prebid-mobile/adops-price-granularity/pg-setting.png){: .pb-md-img :} +- [Prebid.js MediaTypePriceGranularity](/dev-docs/publisher-api-reference.html#setConfig-MediaType-Price-Granularity) diff --git a/prebid-mobile/pbm-api/android/pbm-adunit-android.md b/prebid-mobile/pbm-api/android/pbm-adunit-android.md index 2e158fff73..5a2acdc87d 100755 --- a/prebid-mobile/pbm-api/android/pbm-adunit-android.md +++ b/prebid-mobile/pbm-api/android/pbm-adunit-android.md @@ -33,6 +33,14 @@ The `AdUnit` object is an abstract object that cannot be instantiated. Use the [ - `periodMillis`: Integer defining the refresh time in milliseconds. Default = 0, meaning no auto refresh. - `keywords`: ArrayList containing keys and values. +#### pbAdSlot + +PB Ad Slot is an identifier tied to the placement the ad will be delivered in. The use case for PB Ad Slot is to pass to exchange an ID they can use to tie to reporting systems or use for data science driven model building to match with impressions sourced from alternate integrations. A common ID to pass is the ad server slot name. + +`adUnit.pbAdSlot = "/1111111/homepage/med-rect-2"` + +--- + ## Methods ### fetchDemand @@ -41,12 +49,14 @@ Trigger a call to Prebid Server to retrieve demand for this Prebid Mobile ad uni **Parameters** -- `adObj`: bid request object +- `adObj`: This is the ad server request object (for [Google Ad Manager](https://developers.google.com/android/reference/com/google/android/gms/ads/doubleclick/PublisherAdRequest) and for [Mopub](https://developers.mopub.com/publishers/reference/android/MoPubView/)). If you do not wish to add any additional /custom key values to the ad server after the Prebid auction, pass `adObj` to the fetchDemand function, where Prebid SDK will set all the Prebid targeting keys as well as any keys added prior to auction +- As of Prebid SDK 1.7, a publisher can optionally pass the Google Ad Manager `builder` object of the [Google Ad Manager Mobile Ads SDK](https://developers.google.com/android/reference/com/google/android/gms/ads/doubleclick/PublisherAdRequest.Builder) to pass custom keys to Google Ad Manager after the Prebid Auction - `onCompleteListener`: listener object + ### setAutoRefreshPeriodMillis If set on a given Prebid Mobile ad unit, the `fetchDemand` function will be called every `periodMillis` until `stopAutoRefresh` is called. Each call to `fetchDemand` will invoke the `onComplete` function. This refresh only pertains to Prebid Mobile and not to any ad server refresh processes. It is suggested that the adServers refresh be turned off. @@ -209,6 +219,19 @@ interstitialAdUnit.fetchDemand(publisherAdRequest, new onCompleteListener() { dfpInterstitial.loadAd(publisherAdRequest); } }); + +//As of Prebid SDK 1.7, the fetchDemand method supports passing a request builder object to append custom key values to the build object. See fetchDemand above for furher details. + +final PublisherAdRequest.Builder builder = new PublisherAdRequest.Builder(); + +adUnit.fetchDemand(builder, new OnCompleteListener() { + @Override + public void onComplete(ResultCode resultCode) { + builder.addCustomTargeting("key1", "value1"); + PublisherAdRequest request = builder.build(); + amBanner.loadAd(request); + } +}); ``` ## Related Topics diff --git a/prebid-mobile/pbm-api/android/pbm-banneradunit-android.md b/prebid-mobile/pbm-api/android/pbm-banneradunit-android.md index cf643aac7d..e48b1378aa 100755 --- a/prebid-mobile/pbm-api/android/pbm-banneradunit-android.md +++ b/prebid-mobile/pbm-api/android/pbm-banneradunit-android.md @@ -27,6 +27,26 @@ Create a new Banner Ad Unit associated with a Prebid Server configuration ID and - `width`: Integer; Width of the ad unit. - `height`: Integer; Height of the ad unit. + +#### Parameters + + +Parameters is a sub class of BannerAdUnit. Create a new Parameters class to define the parameters of the video ad unit. Parameters contain the OpenRTB video attributes. + +`api: [int]`: OpenRTB placement + +**Parameters** + +Array of integers or a predefined constant representing the supported [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) Frameworks. While OpenRTB allows additional API Frameworks, they were intentionally left out as constants since they do not make sense in a banner context. If there is a desire to pass API Frameworks that are not represented as a constants within Parameters, they can be passed an integer, where Prebid SDK will pass Prebid Server whatever is present: + +* `3` or `Signals.Api.MRAID_1` : MRAID-1 support signal +* `5` or `Signals.Api.MRAID_2` : MRAID-2 support signal +* `6` or `Signals.Api.MRAID_3` : MRAID-3 support signal +* `7` or `Signals.Api.OMID_1` : signals OMSDK support + + + + ## Methods `BannerAdUnit` inherits all methods from the [AdUnit](/prebid-mobile/pbm-api/android/pbm-adunit-android.html) object. It also includes the following additional methods: @@ -50,7 +70,7 @@ none ## Example -``` +```java PublisherAdView dfpAdView = new PublisherAdView(context); dfpAdView.setAdUnitId("/12345/foo"); dfpAdView.setAdSizes(new AdSize(300, 250)); @@ -59,6 +79,11 @@ final PublisherAdRequest request = builder.build(); BannerAdUnit bannerAdUnit = new BannerAdUnit("PREBID_SERVER_CONFIGURATION_ID", 300, 250); bannerAdUnit.setUserKeyword("my_key", "my_value"); +BannerBaseAdUnit.Parameters parameters = new BannerBaseAdUnit.Parameters(); +parameters.setApi(Arrays.asList(new Signals.Api(6, 7))); +// alternate representation using an enum parameters.setApi(Arrays.asList(Signals.Api.MRAID_3, Signals.Api.OMID_1)); + +bannerAdUnit.setParameters(parameters); bannerAdUnit.fetchDemand(request, new onCompleteListener() { @Override public void onComplete(ResultCode resultCode) { diff --git a/prebid-mobile/pbm-api/android/pbm-bannerinterstitialadunit-android.md b/prebid-mobile/pbm-api/android/pbm-bannerinterstitialadunit-android.md index 5741d3652a..c9a2a1b02a 100755 --- a/prebid-mobile/pbm-api/android/pbm-bannerinterstitialadunit-android.md +++ b/prebid-mobile/pbm-api/android/pbm-bannerinterstitialadunit-android.md @@ -41,6 +41,23 @@ Prebid Server will send the eligible size list to each bidder to solicit a bid. InterstitialAdUnit(@NonNull String configId, int minWidthPerc, int minHeightPerc) ``` +#### Parameters + + +Parameters is a sub class of BannerAdUnit. Create a new Parameters class to define the parameters of the video ad unit. Parameters contain the OpenRTB video attributes. + +`api: [int]`: OpenRTB placement + +**Parameters** + +Array of integers or a predefined constant representing the supported [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) Frameworks. While OpenRTB allows additional API Frameworks, they were intentionally left out as constants since they do not make sense in a banner context. If there is a desire to pass API Frameworks that are not represented as a constants within Parameters, they can be passed an integer, where Prebid SDK will pass Prebid Server whatever is present: + +* `3` or `Signals.Api.MRAID_1` : MRAID-1 support signal +* `5` or `Signals.Api.MRAID_2` : MRAID-2 support signal +* `6` or `Signals.Api.MRAID_3` : MRAID-3 support signal +* `7` or `Signals.Api.OMID_1` : signals OMSDK support + + ## Methods `InterstitialAdUnit` inherits all methods from the [AdUnit](/prebid-mobile/pbm-api/android/pbm-adunit-android.html) object. @@ -49,6 +66,10 @@ InterstitialAdUnit(@NonNull String configId, int minWidthPerc, int minHeightPerc ```java AdUnit interstitialAdUnit = new InterstitialAdUnit("12345", 50, 70); +BannerBaseAdUnit.Parameters parameters = new BannerBaseAdUnit.Parameters(); +parameters.setApi(Arrays.asList(new Signals.Api(6, 7))); +// alternate representation using an enum parameters.setApi(Arrays.asList(Signals.Api.MRAID_3, Signals.Api.OMID_1)); +interstitialAdUnit.setParameters(parameters); interstitialAdUnit.fetchDemand(publisherAdRequest, new onCompleteListener() { @Override public void onComplete(ResultCode resultCode) { diff --git a/prebid-mobile/pbm-api/android/prebidmobile-object-android.md b/prebid-mobile/pbm-api/android/prebidmobile-object-android.md index 58851e672f..97bd8bc04a 100755 --- a/prebid-mobile/pbm-api/android/prebidmobile-object-android.md +++ b/prebid-mobile/pbm-api/android/prebidmobile-object-android.md @@ -212,6 +212,15 @@ none void clearStoredBidResponses() ``` +### pbsDebug + +`pbsDebug`: adds the debug flag ("test":1) on the outbound http call to Prebid Server. The test:1 flag will signal to Prebid Server to emit the full resolved request (resolving any Stored Request IDs) as well as the full Bid Request and Bid Response to and from each bidder. +```java +pbsDebug(Boolean) +``` + +Example: +PrebidMobile.setPbsDebug(true); ## Related Topics diff --git a/prebid-mobile/pbm-api/ios/code-integration-ios.md b/prebid-mobile/pbm-api/ios/code-integration-ios.md index 8f27680876..61d145fd18 100644 --- a/prebid-mobile/pbm-api/ios/code-integration-ios.md +++ b/prebid-mobile/pbm-api/ios/code-integration-ios.md @@ -28,6 +28,54 @@ target 'MyAmazingApp' do end ``` +### Include with Carthage + +If you are not familiar with the Carthage package builder, please refere to the project [github page](https://github.com/Carthage/Carthage) for more details. + +Since Prebid SDK architecture supports a multi-module feature for future enhancements, that currently use the same module name for every schema, please use CarthageBuild.sh script to build a necessary binary. + +There are two shared schemes available ([issue #239](https://github.com/prebid/prebid-mobile-ios/issues/239)): + +- PrebidMobile +- PrebidMobileCore + +Follow the next steps: + +1. Add PrebidSDK dependency into Cartfile. Release notes +``` +github "prebid/prebid-mobile-ios" == 1.5 +``` +2. Update Carthage +``` +carthage update +``` + +3. Build the specific schema `CarthageBuild.sh` + + **Variant 1** + + - Run CarthageBuild.sh script from Cartfile folder. The path should be: + `.../Carthage/Checkouts/prebid-mobile-ios/scripts/CarthageBuild.sh` + + - Enter Schema name (PrebidMobile or PrebidMobileCore) + - If you run CarthageBuild.sh and see Permission denied use: + `chmod +x ` + + **Variant 2** + + - Open `PrebidMobile.xcodeproj` at `.../Carthage/Checkouts/prebid-mobile-ios/PrebidMobile.xcodeproj` using Xcode + + - Manage Schemes -> Check Shared checkbox for a necessary schema + + - run `carthage build prebid-mobile-ios` +4. Integrate the binary into your project + + + +You can find the schema name in the build PrebidSDK framework inside Info.plist with `PrebidMobileName` key + + + ### Build framework from source Build Prebid Mobile from source code. After [cloning the repo](https://github.com/prebid/prebid-mobile-ios), use Terminal or another command line tool, change to the root directory and run: diff --git a/prebid-mobile/pbm-api/ios/pbm-adunit-ios.md b/prebid-mobile/pbm-api/ios/pbm-adunit-ios.md index 629dd9d982..db5aea1f42 100755 --- a/prebid-mobile/pbm-api/ios/pbm-adunit-ios.md +++ b/prebid-mobile/pbm-api/ios/pbm-adunit-ios.md @@ -37,6 +37,13 @@ Create a new Banner Ad Unit or Interstitial Ad Unit with a Prebid Server configu `adSizes`: An Array of CGSizes to be used for AdUnit sizes. + +#### pbAdSlot + +PB Ad Slot is an identifier tied to the placement the ad will be delivered in. The use case for PB Ad Slot is to pass to exchange an ID they can use to tie to reporting systems or use for data science driven model building to match with impressions sourced from alternate integrations. A common ID to pass is the ad server slot name. + +`adUnit.pbAdSlot = "/1111111/homepage/med-rect-2"` + --- ## Methods @@ -115,9 +122,9 @@ func clearContextKeywords() -### First Party Data +### Data Object -First Party Data (FPD) is free form data supplied by the publisher to provide additional targeting of the user or inventory context, used primarily for striking PMP (Private MarketPlace) deals with Advertisers. Data supplied in the data parameters are typically not sent to DSPs whereas information sent in non-data objects (i.e. `setYearOfBirth`, `setGender`, etc.) will be. Access to FPD can be limited to a supplied set of Prebid bidders via an access control list. +The Data object is free form data (also known as First Party Data)supplied by the publisher to provide additional targeting of the user or inventory context, used primarily for striking PMP (Private MarketPlace) deals with Advertisers. Data supplied in the data parameters are typically not sent to DSPs whereas information sent in non-data objects (i.e. `setYearOfBirth`, `setGender`, etc.) will be. Access to FPD can be limited to a supplied set of Prebid bidders via an access control list. Data is broken up into two different data types: * User @@ -163,6 +170,8 @@ func removeContextData(forKey: String) func clearContextData() ``` + + ## Examples **fetchDemand** @@ -176,6 +185,7 @@ func clearContextData() func loadDFPBanner(bannerUnit : AdUnit){ let bannerUnit = BannerAdUnit(configId: "6ace8c7d-88c0-4623-8117-75bc3f0a2e45", size: CGSize(width: 300, height: 250)) + bannerUnit.pbAdSlot = "/1111111/homepage/med-rect-2"` let dfpBanner = DFPBannerView(adSize: kGADAdSizeMediumRectangle) dfpBanner.adUnitID = "/19968336/PriceCheck_300x250" diff --git a/prebid-mobile/pbm-api/ios/pbm-banneradunit-ios.md b/prebid-mobile/pbm-api/ios/pbm-banneradunit-ios.md index a0198be06a..5f64545276 100755 --- a/prebid-mobile/pbm-api/ios/pbm-banneradunit-ios.md +++ b/prebid-mobile/pbm-api/ios/pbm-banneradunit-ios.md @@ -29,6 +29,24 @@ See [AdUnit]({{site.baseurl}}/prebid-mobile/pbm-api/ios/pbm-adunit-ios.html) for `size (CGSize)`: Width and height of the banner. + +#### Parameters + + +Parameters is a sub class of BannerAdUnit. Create a new Parameters class to define the parameters of the video ad unit. Parameters contain the OpenRTB video attributes. + +`api: [int]`: OpenRTB placement + +**Parameters** + +Array of integers or a predefined constant representing the supported [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) Frameworks. While OpenRTB allows additional API Frameworks, they were intentionally left out as constants since they do not make sense in a banner context. If there is a desire to pass API Frameworks that are not represented as a constants within Parameters, they can be passed an integer, where Prebid SDK will pass Prebid Server whatever is present: + +* `3` or `Signals.Api.MRAID_1` : MRAID-1 support signal +* `5` or `Signals.Api.MRAID_2` : MRAID-2 support signal +* `6` or `Signals.Api.MRAID_3` : MRAID-3 support signal +* `7` or `Signals.Api.OMID_1` : signals OMSDK support + + ## Methods ### addAdditionalSize @@ -56,6 +74,23 @@ bannerUnit.addAdditionalSizes(sizes: CGSize(width: 320, height: 50)) ``` Once a BannerAdUnit is created use Google Mobile Ads or MoPub to retrieve and display creatives. +** Define any appropriate API Frameworks ** + +Swift +```swift +let parameters = BannerAdUnit.Parameters() +parameters.api = [Signals.Api.MRAID_2] //parameters.api = [Signals.Api(5)] +adUnit.setParameters(parameters); +``` + +Objective C +``` +PBBannerAdUnitParameters* parameters = [[PBBannerAdUnitParameters alloc] init]; +parameters.api = @[PBApi.MRAID_2]; +//parameters.api = @[[[PBApi alloc] initWithIntegerLiteral:5]]; +bannerAdUnit.parameters = parameters; +``` + **Google Mobile Ads** Import the GoogleMobileAds from the [google-mobile-sdk](https://developers.google.com/admob/ios/download) into the UIViewController displaying the BannerAdUnit diff --git a/prebid-mobile/pbm-api/ios/pbm-bannerinterstitialadunit-ios.md b/prebid-mobile/pbm-api/ios/pbm-bannerinterstitialadunit-ios.md index f893c87c11..ba006ef6dc 100755 --- a/prebid-mobile/pbm-api/ios/pbm-bannerinterstitialadunit-ios.md +++ b/prebid-mobile/pbm-api/ios/pbm-bannerinterstitialadunit-ios.md @@ -27,7 +27,7 @@ PBS with interstitial support will come preconfigured with a list of common ad s Prebid Server will send the eligible size list to each bidder to solicit a bid. For a full description of the Prebid Server logic, please refer to the [Prebid Server PR 797](https://github.com/prebid/prebid-server/pull/797/files). ``` -init(configId: String, minWidthPerc: Int, minHeightPerc: Int) +BannerInterstitialAdUnit(configId: String, minWidthPerc: Int, minHeightPerc: Int) ``` **Parameters** @@ -38,11 +38,55 @@ init(configId: String, minWidthPerc: Int, minHeightPerc: Int) `minHeightPrec`: Optional parameter to specify the minimum height percent an ad may occuy of a device's real estate. Support in SDK version 1.2+ +#### Parameters + + +Parameters is a sub class of BannerAdUnit. Create a new Parameters class to define the parameters of the video ad unit. Parameters contain the OpenRTB video attributes. + +`api: [int]`: OpenRTB placement + +**Parameters** + +Array of integers or a predefined constant representing the supported [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) Frameworks. While OpenRTB allows additional API Frameworks, they were intentionally left out as constants since they do not make sense in a banner context. If there is a desire to pass API Frameworks that are not represented as a constants within Parameters, they can be passed an integer, where Prebid SDK will pass Prebid Server whatever is present: + +* `3` or `Signals.Api.MRAID_1` : MRAID-1 support signal +* `5` or `Signals.Api.MRAID_2` : MRAID-2 support signal +* `6` or `Signals.Api.MRAID_3` : MRAID-3 support signal +* `7` or `Signals.Api.OMID_1` : signals OMSDK support + + ## Examples **Create an InterstitialAdUnit** +``` +let bannerUnit = BannerAdUnit(configId: "6ace8c7d-88c0-4623-8117-75bc3f0a2e45", size: CGSize(width: 300, height: 250)) +``` +**Add additional ad sizes** + +``` +bannerUnit.addAdditionalSizes(sizes: CGSize(width: 320, height: 50)) +``` +Once a BannerAdUnit is created use Google Mobile Ads or MoPub to retrieve and display creatives. + +** Define any appropriate API Frameworks ** + +Swift +```swift +let parameters = BannerAdUnit.Parameters() +parameters.api = [Signals.Api.MRAID_2] //parameters.api = [Signals.Api(5)] +adUnit.setParameters(parameters); +``` + +Objective C +``` +PBBannerAdUnitParameters* parameters = [[PBBannerAdUnitParameters alloc] init]; +parameters.api = @[PBApi.MRAID_2]; +//parameters.api = @[[[PBApi alloc] initWithIntegerLiteral:5]]; +bannerAdUnit.parameters = parameters; +``` + **Google Mobile Ads** **Swift** diff --git a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md index 1b4f547984..deb7bbfa52 100644 --- a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md +++ b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md @@ -129,7 +129,7 @@ Targeting.shared.domain = domain ``` ### Store URL -Retrieve and set the domain of your store URL with the following commands: +Retrieve and set the domain of your store URL with the following command: ``` Targeting.shared.storeURL @@ -141,7 +141,7 @@ Targeting.shared.storeURL = "itunes store URL string" ### iTunesID -Retrieve and set the domain of your store URL with the following commands: +Retrieve and set the domain of your iTunes ID with the below command. This field will be transmitted to buyers as the bundle ID as recommended in OpenRTB 2.5. Failure to supply this value can have a negative monetary impact. ``` Targeting.shared.itunesID diff --git a/prebid-mobile/pbm-api/ios/prebidmobile-object-ios.md b/prebid-mobile/pbm-api/ios/prebidmobile-object-ios.md index 532b6eea39..a00812968f 100644 --- a/prebid-mobile/pbm-api/ios/prebidmobile-object-ios.md +++ b/prebid-mobile/pbm-api/ios/prebidmobile-object-ios.md @@ -89,6 +89,10 @@ func addStoredBidResponse(bidder: String, responseId: String) func clearStoredBidResponses() ``` +`pbsDebug`: adds the debug flag ("test":1) on the outbound http call to Prebid Server. The test:1 flag will signal to Prebid Server to emit the full resolved request (resolving any Stored Request IDs) as well as the full Bid Request and Bid Response to and from each bidder. +```swift +pbsDebug = BOOL +``` ## Examples @@ -110,9 +114,16 @@ Prebid.shared.prebidServerAccountId = "1234" //Geolocation Prebid.shared.shareGeoLocation = true + +//Log level data Prebid.shared.logLevel = .verbose + +//set Prebid timeout in milliseconds Prebid.shared.timeoutMillis = 3000 +//Enable Prebid Server debug respones +Prebid.shared.pbsDebug = true + //Stored responses can be one of storedAuction response or storedBidResponse Prebid.shared.storedAuctionResponse = "111122223333" @@ -146,6 +157,9 @@ Prebid.shared.timeoutMillis = 3000; //Stored responses can be one of storedAuction response or storedBidResponse Prebid.shared.storedAuctionResponse = @"111122223333"; +//Enable Prebid Server debug respones +Prebid.shared.pbsDebug = true; + //or [Prebid.shared addStoredBidResponseWithBidder:@"appnexus" responseId:@"221144"]; [Prebid.shared addStoredBidResponseWithBidder:@"rubicon" responseId:@"221155"]; diff --git a/prebid-mobile/prebid-mobile-pbs.md b/prebid-mobile/prebid-mobile-pbs.md index 976200eafc..2d1c97708e 100644 --- a/prebid-mobile/prebid-mobile-pbs.md +++ b/prebid-mobile/prebid-mobile-pbs.md @@ -26,7 +26,7 @@ If this is your first time working with header bidding, we recommend that you re Before you begin using Prebid Mobile in your apps, you need to prepare your end-to-end system. The first step is to set up your Prebid Server host. Prebid Mobile works in conjunction with Prebid Server to request and receive bids. Here are the options: -- Register with a [Prebid.org member that hosts Prebid Server](/prebid-server/hosted-servers.html). While you're waiting for your account, you can continue with the steps below. +- Register with a [Prebid.org member that hosts Prebid Server](https://prebid.org/product-suite/managed-services/). While you're waiting for your account, you can continue with the steps below. - Set up your own Prebid Server host ### Implement Your Own Prebid Server Host @@ -50,7 +50,7 @@ After you've registered with your chosen Prebid Server host, you need to create ] ``` -The preceding is an example structure using AppNexus as the bidder. The parameters you need to set differ for each bidder. See [Bidder Parameters]({{site.github.url}}/dev-docs/prebid-server-bidders.html) for a full list of parameters for available Prebid Server bidders. +The preceding is an example structure using AppNexus as the bidder. The parameters you need to set differ for each bidder. See [Bidder Parameters]({{site.github.url}}/prebid-server/developers/add-new-bidder-go.html) for a full list of parameters for available Prebid Server bidders. ## Developers - Using the SDK diff --git a/prebid-mobile/privacy-regulation.md b/prebid-mobile/privacy-regulation.md index 0d37b06fc7..c98333cf3c 100644 --- a/prebid-mobile/privacy-regulation.md +++ b/prebid-mobile/privacy-regulation.md @@ -13,8 +13,7 @@ sidebarType: 2 {:.no_toc} {% capture legalNotice %} - - This resource should not be construed as legal advice and Prebid.org make no guarantees about compliance with any law or regulation. Please note that because every company and its collection, use, and storage of personal data is different, you should also seek independent legal advice relating to obligations under European and /or US regulations, including the GDPR, the existing ePrivacy Directive and CCPA. Only a lawyer can provide you with legal advice specifically tailored to your situation. Nothing in this guide is intended to provide you with, or should be used as a substitute for, legal advice tailored to your business. + This resource should not be construed as legal advice and Prebid.org makes no guarantees about compliance with any law or regulation. Please note that because every company and its collection, use, and storage of personal data is different, you should seek independent legal advice relating to obligations under European and /or US regulations, including the GDPR, the ePrivacy Directive and CCPA. Only a lawyer can provide you with legal advice specifically tailored to your situation. Nothing in this guide is intended to provide you with, or should be used as a substitute for, legal advice tailored to your business. {% endcapture %} {% include /alerts/alert_important.html content=legalNotice %} @@ -28,7 +27,7 @@ sidebarType: 2 In order for publishers to meet their transparency, notice and choice/consent requirements under the GDPR and the existing ePrivacy Directive, Prebid Mobile supports the [IAB Europe Transparency & Consent Framework](https://www.iab.com/topics/consumer-privacy/gdpr/) (the "Framework"). - This is a reference for mobile app publishers using Prebid Mobile to surface notice, transparency and choice to end users located in the EEA and signal approved vendors and, where necessary, pass consent, to demand sources and their vendors. + This is a reference for mobile app publishers using Prebid Mobile to surface notice, transparency and choice to end users located in the EEA and signal approved vendors and, where necessary, pass consent information to demand sources and their vendors. {% endcapture %} @@ -37,12 +36,12 @@ sidebarType: 2 ### Framework APIs -Prebid Mobile provides two APIs for app publishers to use with the Framework. These APIs allow you to: +Prebid Mobile provides three APIs for app publishers to use with the Framework. These APIs allow you to: -- Define whether European privacy regulations should apply +- Define whether the user is located in the European Economic Area (the "EEA") and if European privacy regulations should apply - Set the [IAB Europe](https://www.iabeurope.eu/) (IAB) consent string -This information will be persisted by Prebid Mobile and will be added to each ad call. Publishers/Consent Management Platforms (CMPs) are free to store these values in an `NSUserDefaults/SharedPreferences` interface (as defined by [Mobile In-App CMP API v1.0: Transparency & Consent Framework](https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/Mobile%20In-App%20Consent%20APIs%20v1.0%20Final.md)) instead of passing them via the new APIs, and Prebid Mobile will read the values as a fallback. +This information will be persisted by Prebid Mobile and will be added to each ad call to the demand partners. Publishers/Consent Management Platforms (CMPs) are free to store these values in an `NSUserDefaults/SharedPreferences` interface (as defined by [Mobile In-App CMP API v1.0: Transparency & Consent Framework](https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/Mobile%20In-App%20Consent%20APIs%20v1.0%20Final.md)) instead of passing them via the new APIs, and Prebid Mobile will read the values as a fallback. The consent API's will check for TCF2.0 params (`IABTCF_gdprApplies` and `IABTCF_TCString`). If the parameters are not available they will fall back to TCF1.1 parameters (`IABConsent_SubjectToGDPR` and `IABConsent_ConsentString`) Publishers are responsible for providing notice, transparency and choice and collecting consent from their users in accordance with [the Framework policies](https://www.iab.com/topics/consumer-privacy/gdpr/), either using their own CMP or working with a vendor. @@ -54,24 +53,112 @@ All vendor SDKs (including mediation SDKs) are responsible for looking up approv - [iOS - Targeting Parameters](/prebid-mobile/pbm-api/ios/pbm-targeting-ios.html) - [Android - Targeting Parameters](/prebid-mobile/pbm-api/android/pbm-targeting-params-android.html) +## Sending Device Information + +To ensure proper monetization and relevant targeting, the SDK should be enabled to send the device information. Setting the consentRequired and purposeConsents flag correctly will help ensure proper device information is sent. The table below provides information on: + +- Determining whether the device details will be passed or not. +- Describing the actions taken for the different purposeConsents values in combination with consentRequired values. + +{: .table .table-bordered .table-striped } +| | deviceAccessConsent= true | deviceAccessConsent= false | deviceAccessConsent= undefined | +|---------------------|------------------------------|--------------------------------|---------------------------------------| +|consentRequired=false
(gdprApplies = false)|The SDK will read and pass IDFA/AAID info to server. |The SDK will **not** read and pass IDFA/AAID info to server. | The SDK will read and pass IDFA/AAID info to server.| +|consentRequired=true
(gdprApplies = true)|The SDK will read and pass IDFA/AAID info to server. |The SDK will **not** read and pass IDFA/AAID info to server. | The SDK will **not** read and pass IDFA/AAID info to server.| +|consentRequired=undefined
(gdprApplies = undefined)|The SDK will read and pass IDFA/AAID info to server. |The SDK will **not** read and pass IDFA/AAID info to server. | The SDK will read and pass IDFA/AAID info to server.| + +{% capture codeNote %} + Publishers set the value of `gdprApplies` in `Targeting.shared.subjectToGDPR` and `purposeConsent` in `Targeting.shared.purposeConsents`. + + {% endcapture %} + +{% include /alerts/alert_important.html content=codeNote %} + +## Code Samples + +### iOS + +
+
+
+  /** * Set the consentRequired value in the SDK
+  *
+  * @param true if subject to GDPR regulations, false otherwise
+  */
+  Targeting.shared.subjectToGDPR = false;
+
+  /**
+  * Set the consent string in the SDK
+  *
+  * @param A valid Base64 encode consent string as per https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework
+  */
+  Targeting.shared.gdprConsentString = "BOMyQRvOMyQRvABABBAAABAAAAAAEA";
+
+  /**
+  * Set the purpose consents in the SDK
+  *
+  * @param A valid Binary String: The '0' or '1' at position n – where n's indexing begins at 0 – indicates the consent status for purpose ID n+1; false and true respectively. eg. '1' at index 0 is consent true for purpose ID 1
+  */
+  Targeting.shared.purposeConsents = "100000000000000000000000";
+
+
+  /**
+  * Get the device consent extracted from the purpose1 consent provided
+  *
+  */
+  let deviceAccessConsent = Targeting.shared.getDeviceAccessConsent();
+
+
+
+ +### Android + +
+
+
+    /** * Set the consentRequired value in the SDK
+    *
+    * @param true if subject to GDPR regulations, false otherwise
+    */
+    TargetingParams.setSubjectToGDPR(context, true);
+
+
+    /**
+    * Set the consent string in the SDK
+    *
+    * @param A valid Base64 encode consent string as per
+    * https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework
+    */
+    TargetingParams.setGDPRConsentString("BOMyQRvOMyQRvABABBAAABAAAAAAEA");
+
+    /**
+    * Set the purpose consents in the SDK
+    *
+    * @param A valid Binary String: The '0' or '1' at position n – where n's indexing begins at 0 – indicates the consent status for purpose ID n+1; false and true respectively. eg. '1' at index 0 is consent true for purpose ID 1
+    */
+    TargetingParams.setPurposeConsents("101010001");
+
+
+
## California Consumer Privacy Act (CCPA) {% capture ccpaNote %} - In order for publishers to meet their user consent requirements under the CCPA, Prebid Mobile supports the IAB US Privacy signal as defined in the in-app section of the [IAB US Privacy signal for CCPA](https://iabtechlab.com/wp-content/uploads/2019/11/US-Privacy-USER-SIGNAL-API-SPEC-v1.0.pdf). +In order for publishers to meet their notice and opt out obligations under the CCPA, +Prebid Mobile supports the IAB US Privacy signal as defined in the in-app section of the [IAB US Privacy signal for CCPA](https://iabtechlab.com/wp-content/uploads/2019/11/US-Privacy-USER-SIGNAL-API-SPEC-v1.0.pdf). - This is a reference for mobile app publishers using Prebid Mobile to surface notice, transparency and choice to end users located in California, United States, passing consent where necessary, to demand sources and their vendors. + This is a reference for mobile app publishers using Prebid Mobile to surface notice, transparency and choice to end users located in California, United States, passing notice and opt out signals where necessary, to demand sources and their vendors. {% endcapture %} {% include alerts/alert_note.html content=ccpaNote %} -### Consent Signal +### Notice and Opt out signal Prebid mobile supports the [IAB US Privacy signal](https://iabtechlab.com/wp-content/uploads/2019/11/US-Privacy-USER-SIGNAL-API-SPEC-v1.0.pdf) implementation for CCPA. Publishers will be required perform the following actions: -- Collect consent from eligible CCPA users -- Translate consent signal into [IAB US Privacy String format](https://iabtechlab.com/wp-content/uploads/2019/11/U.S.-Privacy-String-v1.0-IAB-Tech-Lab.pdf) +- Collect notice and opt out signals from eligible CCPA users +- Translate notice and opt-out signals into [IAB US Privacy String format](https://iabtechlab.com/wp-content/uploads/2019/11/U.S.-Privacy-String-v1.0-IAB-Tech-Lab.pdf) - Store IAB US Privacy signal in NSUserDefaults for iOS or SharedPreferences for Android for persistent storage allowing access for vendors per IAB recommendations The job of the Prebid SDK will: @@ -79,7 +166,10 @@ The job of the Prebid SDK will: - Prebid SDK will look for the key "IABUSPrivacy_String", all other key names or spellings will be ignored - If the "IABUSPrivacy_String" key is present with a non-empty string value, the Prebid SDK will relay the privacy string to Prebid Server in the regs.ext.us_privacy extention - Not perform or make any attempt to validate or ensure correctness of the US Privacy string -- Not strip any user data or signaling of the request regardless of consent - +- Not strip any user data or signaling of the request regardless of Notice and Opt out signal It is worth noting Prebid Server will be a passthrough as well and will not validate format or correctness of US Privacy signal nor strip any user data from the request either, even if the presence of an opt out. + + + + diff --git a/prebid-server/bidders/pbs-build-a-bid-adapter.md b/prebid-server/bidders/pbs-build-a-bid-adapter.md new file mode 100644 index 0000000000..39e278d64c --- /dev/null +++ b/prebid-server/bidders/pbs-build-a-bid-adapter.md @@ -0,0 +1,10 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Bidder | Build An Adapter + +--- + +# Prebid Server | Bidder | Build An Adapter + +Check back for updated content. diff --git a/prebid-server/developers/add-new-analytics-module.md b/prebid-server/developers/add-new-analytics-module.md deleted file mode 100644 index 378b14e561..0000000000 --- a/prebid-server/developers/add-new-analytics-module.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -layout: page_v2 -sidebarType: 5 -title: Prebid Server | Developers | Adding a New Analytics Module - ---- -# Adding a New Analytics Module - -This document describes how to add a new Analytics module to Prebid Server. - -### 1. Define config params - -Analytics modules are enabled through the [Configuration](https://github.com/prebid/prebid-server/blob/master/docs/developers/configuration.md). -You'll need to define any properties in [config/config.go](https://github.com/prebid/prebid-server/blob/master/config/config.go) -which are required for your module. - -### 2. Implement your module - -Your new module belongs in the `analytics/{moduleName}` package. It should implement the `PBSAnalyticsModule` interface from -[analytics/core.go](https://github.com/prebid/prebid-server/blob/master/analytics/core.go) - -### 3. Connect your Config to the Implementation - -The `NewPBSAnalytics` function inside [analytics/config/config.go](https://github.com/prebid/prebid-server/blob/master/analytics/config/config.go) instantiates Analytics modules -using the app config. You'll need to update this to recognize your new module. - -### Example - -The [filesystem](https://github.com/prebid/prebid-server/tree/master/analytics/filesystem) module is provided as an example. This module will log dummy messages to a file. - -It can be configured with: - -```yaml -analytics: - file: - filename: "path/to/file.log -``` - -Prebid Server will then write sample log messages to the file you provided. diff --git a/prebid-server/developers/add-new-bidder-go.md b/prebid-server/developers/add-new-bidder-go.md new file mode 100644 index 0000000000..665a26e079 --- /dev/null +++ b/prebid-server/developers/add-new-bidder-go.md @@ -0,0 +1,252 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Developers | Adding a New Bidder + +--- + +# Prebid Server - Adding a New Bidder in Go +{: .no_toc} + +* TOC +{:toc } + +This document describes how to add a new bid adapter to the Go version of Prebid Server. Our recommendation is to build new adapters in Go because we port them to Java within a couple of months. But if you'd like to build them yourself in both, there are [instructions for building an adapter in PBS-Java](/prebid-server/developers/add-new-bidder-java.html). + +**NOTE**: To make everyone's lives easier, Bidders are expected to make net-price bids (e.g. "If this ad wins, what will the publisher make?"), not gross-price bids. +Publishers can correct for gross-price bids by setting [Bid Adjustments](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#bid-adjustments) to account for fees. + +## Choose a Bidder Name + +This name must be unique. Existing BidderNames can be found [here](https://github.com/prebid/prebid-server/blob/master/openrtb_ext/bidders.go). + +Throughout the rest of this document, substitute `{bidder}` with the name you've chosen. + +## Define Your Bidder Params + +Bidders may define their own APIs for Publishers to pass custom values subject to these guidelines: + +- Don't duplicate values already present in the [OpenRTB 2.5 spec](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf). +- Don't add bidder-specific parameters that already have Prebid conventions: first party data, floors, schain, video params, referrer, COPPA. + +Publishers will send values for these parameters in `request.imp[i].ext.{bidder}` of +[the Auction endpoint](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html). Prebid Server will preprocess these so that +your bidder will access them at `request.imp[i].ext.bidder`--regardless of what your `{bidder}` name is. + +## Implement Your Bidder + +Bidder implementations are scattered throughout several files. + +- `adapters/{bidder}/{bidder}.go`: contains an implementation of [the Bidder interface](https://github.com/prebid/prebid-server/blob/master/adapters/bidder.go). +- `openrtb_ext/imp_{bidder}.go`: contract classes for your Bidder's params. +- `usersync/usersyncers/{bidder}.go`: A [Usersyncer](https://github.com/prebid/prebid-server/blob/master/usersync/usersync.go) which returns cookie sync info for your bidder. +- `usersync/usersyncers/{bidder}_test.go`: Unit tests for your Usersyncer +- `static/bidder-params/{bidder}.json`: A [draft-4 json-schema](https://spacetelescope.github.io/understanding-json-schema/) which [validates your Bidder's params](https://www.jsonschemavalidator.net/). +- `static/bidder-info/{bidder}.yaml`: contains metadata (e.g. contact email, platform & media type support) about the adapter. Note that email cannot be a single individual – we need robust maintainer contact info read by multiple people like "support@example.com". + +Bidder implementations may assume that any params have already been validated against the defined json-schema. + +{: .alert.alert-warning :} +Prebid Server bid adapters must follow all required conventions defined in the [Module Rules](/dev-docs/module-rules.html). Not doing so could lead to delays in approving your adapter for inclusion in Prebid Server. If you'd like to apply for an exception to one of the rules, make your request in a new [Prebid Server issue](https://github.com/prebid/prebid-server/issues). + +### Bid Response Metadata + +In addition to the standard OpenRTB2.5 response fields, Prebid encourages bidders to +provide additional metadata in their bid response: + +{% highlight js %} +{ + "seatbid": [{ + "bid": [{ + ... + "ext": { + "prebid": { + "meta": { + "networkId": NETWORK_ID, + "networkName": NETWORK_NAME + "agencyId": AGENCY_ID, + "agencyName": AGENCY_NAME, + "advertiserId": ADVERTISER_ID, + "advertiserName": ADVERTISER_NAME, + "advertiserDomains": [ARRAY_OF_ADVERTISER_DOMAINS] + "brandId": BRAND_ID, + "brandName": BRAND_NAME, + "primaryCatId": IAB_CATEGORY, + "secondaryCatIds": [ARRAY_OF_IAB_CATEGORIES], + } + } + } + }] + }] +} +{% endhighlight %} + +Notes: + +- `advertiserDomains` is the same as the OpenRTB 2.5 `bid.adomain` field but replicated here for downstream convenience +- See the [Prebid.js Bidder Adapter](/dev-docs/bidder-adaptor.html) page for details about the requested values for each field. + +{: .alert.alert-info :} +Please provide as much information as possible in the meta object. Publishers use this data for tracking down bad creatives and ad blocking. The advertiserDomains field is particularly useful. Some of these fields may become required in a future release. + +### BidResponse Requirements + +**Note**: In order to be part of the auction, all bids must include: + +- An ID +- An ImpID which matches one of the `Imp[i].ID`s from the incoming `BidRequest` +- A positive `Bid.Price` +- A `Bid.CrID` which uniquely identifies the Creative in the bid. + +Bids which don't satisfy these standards will be filtered out before Prebid Server responds. + +## Long-Form Video Support +If long-form video will be supported ensure the bidder has the following: + +{: .table .table-bordered .table-striped } +|Field |Type |Description +|----------------|-------------------------------|-----------------------------| +|bid.bidVideo.PrimaryCategory | string | The category for the bid. This should be able to be translated to Primary ad server format| +|TypedBid.bid.Cat | []string | The category for the bid. Should be an array with length 1 containing the value in IAB format| +|TypedBid.BidVideo.Duration | int | Ad duration in seconds| +|TypedBid.bid.Price | float | Bid price| + +{% capture alertNote %} +`bid.bidVideo.PrimaryCategory` or `TypedBid.bid.Cat` should be specified. +{% endcapture %} + +{% include alerts/alert_note.html content=alertNote %} +To learn more about IAB categories, refer site provided by adtagmacros.com: [IAB categories](https://adtagmacros.com/list-of-iab-categories-for-advertisement/) + +## Test Your Bidder + +### Automated Tests + +Bidder tests live in two files: + +- `adapters/{bidder}/{bidder}_test.go`: contains unit tests for your Bidder implementation. +- `adapters/{bidder}/params_test.go`: contains unit tests for your Bidder's JSON Schema params. + +Since most Bidders communicate through HTTP using JSON bodies, you should +use the [JSON-test utilities](https://github.com/prebid/prebid-server/blob/master/adapters/adapterstest/test_json.go). +This comes with several benefits, which are described in the source code docs. + +If your HTTP requests don't use JSON, you'll need to write your tests in the code. +We expect to see at least 90% code coverage on each Bidder. + +Bidders should also define an `adapters/{bidder}/{bidder}test/params/race/{mediaType}.json` file for any supported +Media Types (banner, video, audio, or native). These files should contain a JSON object with all the bidder params +(required & optional) which are expected in supporting that video type. This will be used in automated tests which +check for race conditions across Bidders. + +### Manual Tests + +Build and start your server: + +```bash +go build . +./prebid-server +``` + +Then `POST` an OpenRTB Request to `https://localhost:8000/openrtb2/auction`. + +If at least one `request.imp[i].ext.{bidder}` is defined in your Request, +then your bidder should be called. + +To test user syncs, [save a UID](/prebid-server/endpoints/pbs-endpoint-setuid.html) using the FamilyName of your Usersyncer. +The next time you use `/openrtb2/auction`, the OpenRTB request sent to your Bidder should have +`BidRequest.User.BuyerUID` with the value you saved. + +## Automated Tests + +This project uses [TravisCI](https://travis-ci.org/) to make sure that every PR passes automated tests. +To reproduce these tests locally, use: + +``` +./validate --nofmt --cov +``` + +### Writing Tests + +Tests for `some-file.go` should be placed in the file `some-file_test.go` in the same package. +For more info on how to write tests in Go, see [the Go docs](https://golang.org/pkg/testing/). + +### Adapter Tests + +If your adapter makes HTTP calls using standard JSON, you should use the +[RunJSONBidderTest](https://github.com/prebid/prebid-server/blob/master/adapters/adapterstest/test_json.go#L50) function. + +This will be much more thorough, convenient, maintainable, and reusable than writing standard Go tests +for your adapter. + +### Concurrency Tests + +Code which creates new goroutines should include tests which thoroughly exercise its concurrent behavior. +The names of functions which test concurrency should start with `TestRace`. For example `TestRaceAuction` or `TestRaceCurrency`. + +The `./validate.sh` script will run these using the [Race Detector](https://golang.org/doc/articles/race_detector.html). + +## Add your Bidder to the Server + +- Add a new [BidderName constant](https://github.com/prebid/prebid-server/blob/master/openrtb_ext/bidders.go) for your `{bidder}`. +- Update the [newAdapterMap function](https://github.com/prebid/prebid-server/blob/master/exchange/adapter_map.go) to make your Bidder available in auctions. +- Update the [newSyncerMap function](https://github.com/prebid/prebid-server/blob/master/usersync/usersync.go) to make your Bidder available for user syncs. + +## Document Your Adapter + +There are two documents required before we'll accept your pull request: + +1. Repo metadata - create a new file https://github.com/prebid/prebid-server/blob/master/static/bidder-info/BIDDERCODE.yaml based on one of the other ones there. Note that you must provide an email that's not a single individual -- we need robust maintainer contact info read by multiple people like "support@example.com". +1. User documentation - required to appear in the [Prebid Server adapters page](/dev-docs/pbs-bidders.html). + 1. If you already have a Prebid.js bid adapter, update your bidders existing file in https://github.com/prebid/prebid.github.io/tree/master/dev-docs/modules to add the `pbs: true` variable in the header section. + 1. If you don't have a Prebid.js bid adapter, create a new file in https://github.com/prebid/prebid.github.io/tree/master/dev-docs/modules based on the example below. + +``` +--- +layout: bidder +title: example +description: Prebid example Bidder Adapter +biddercode: example +gdpr_supported: true/false +tcf2_supported: true/false +gvl_id: 111 +usp_supported: true/false +coppa_supported: true/false +schain_supported: true/false +userId: (list of supported vendors) +media_types: banner, video, native +safeframes_ok: true/false +bidder_supports_deals: true/false +pbjs: true/false +pbs: true/false +prebid_member: true/false +--- + +### Note: + +The Example Bidding adapter requires setup before beginning. Please contact us at setup@example.com + +### Bid Params + +{: .table .table-bordered .table-striped } +| Name | Scope | Description | Example | Type | +|---------------|----------|-----------------------|-----------|-----------| +| `placement` | required | Placement id | `'11111'` | `string` | +``` +Notes on the metadata fields: +- Add `pbs: true`. If you also have a [Prebid.js bid adapter](/dev-docs/bidder-adaptor.html), add `pbjs: true`. Default is false for both. +- If you support the GDPR consentManagement module and TCF1, add `gdpr_supported: true`. Default is false. +- If you support the GDPR consentManagement module and TCF2, add `tcf2_supported: true`. Default is false. +- If you're on the IAB's Global Vendor List, place your ID in `gvl_id`. No default. +- If you support the US Privacy consentManagementUsp module, add `usp_supported: true`. Default is false. +- If you support one or more userId modules, add `userId: (list of supported vendors)`. Default is none. +- If you support video and/or native mediaTypes add `media_types: video, native`. Note that display is added by default. If you don't support display, add "no-display" as the first entry, e.g. `media_types: no-display, native`. No defaults. +- If you support COPPA, add `coppa_supported: true`. Default is false. +- If you support the [supply chain](/dev-docs/modules/schain.html) feature, add `schain_supported: true`. Default is false. +- If your bidder doesn't work well with safeframed creatives, add `safeframes_ok: false`. This will alert publishers to not use safeframed creatives when creating the ad server entries for your bidder. No default. +- If your bidder supports deals, set `bidder_supports_deals: true`. No default value. +- If you're a member of Prebid.org, add `prebid_member: true`. Default is false. + +## Contribute + +Finally, [Contribute](https://github.com/prebid/prebid-server/blob/master/docs/developers/contributing.md) your Bidder to the project. diff --git a/prebid-server/developers/add-new-bidder-java.md b/prebid-server/developers/add-new-bidder-java.md new file mode 100644 index 0000000000..8fdad707b9 --- /dev/null +++ b/prebid-server/developers/add-new-bidder-java.md @@ -0,0 +1,200 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Developers | Adding a New Bidder + +--- + +# Prebid Server - Adding a New Bidder - Java +{: .no_toc} + +* TOC +{:toc } + +This document describes how to add a new bid adapter to the Java version of Prebid Server. However, our recommendation is to [build new adapters in Go](/prebid-server/developers/add-new-bidder-go.html) because we port them to Java within a couple of months. + +**NOTE**: To make everyone's lives easier, Bidders are expected to make net-price bids (e.g. "If this ad wins, what will the publisher make?"), not gross-price bids. +Publishers can correct for gross-price bids by setting [Bid Adjustments](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#bid-adjustments) to account for fees. + +## Choose a Bidder Name + +This name must be unique. Existing BidderNames can be found [here](https://github.com/rubicon-project/prebid-server-java/tree/master/src/main/java/org/prebid/server/bidder). + +Throughout the rest of this document, substitute `{bidder}` with the name you've chosen. + +## Define Your Bidder Params + +Bidders may define their own APIs for Publishers to pass custom values subject to these guidelines: + +- Don't duplicate values already present in the [OpenRTB 2.5 spec](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf). +- Don't add bidder-specific parameters that already have Prebid conventions: first party data, floors, schain, video params, referrer, COPPA. + +Publishers will send values for these parameters in `request.imp[i].ext.{bidder}` of +[the Auction endpoint](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html). Prebid Server will preprocess these so that +your bidder will access them at `request.imp[i].ext.bidder`--regardless of what your `{bidder}` name is. + +## Implement Your Bidder + +Bidder implementations are scattered throughout several files: +- `src/main/java/org/prebid/server/bidder/{bidder}/{bidder}Bidder.java`: contains an implementation of [the Bidder interface](../../src/main/java/org/prebid/server/bidder/Bidder.java). +- `src/main/java/org/prebid/server/bidder/{bidder}/{bidder}Adapter.java`: contains an implementation of [the Adapter interface](../../src/main/java/org/prebid/server/bidder/Adapter.java). +- `src/main/java/org/prebid/server/bidder/{bidder}/{bidder}Usersyncer.java`: contains an implementation of [the Usersyncer interface](../../src/main/java/org/prebid/server/bidder/Usersyncer.java). +- `src/main/java/org/prebid/server/proto/openrtb/ext/{bidder}`: contract classes for your Bidder's params. +- `src/main/resources/static/bidder-params/{bidder}.json`: A [draft-4 json-schema](https://spacetelescope.github.io/understanding-json-schema/) which [validates your Bidder's params](https://www.jsonschemavalidator.net/). + +Bidder implementations may assume that any params have already been validated against the defined json-schema. + +{: .alert.alert-warning :} +Prebid Server bid adapters must follow all required conventions defined in the [Module Rules](/dev-docs/module-rules.html). Not doing so could lead to delays in approving your adapter for inclusion in Prebid Server. If you'd like to apply for an exception to one of the rules, make your request in a new [Prebid Server issue](https://github.com/prebid/prebid-server/issues). + +### Generic OpenRTB Bidder + +There's an option to implement a bidder by using a pre-existing template. +OpenrtbBidder(https://github.com/rubicon-project/prebid-server-java/blob/master/src/main/java/org/prebid/server/bidder/OpenrtbBidder.java) is an abstract class that +implements Bidder interface and provides a default implementation of its methods. + +This class provides a fixed algorithm with number of certain access points(so called hook-methods) that +could be overridden to change the defaults to implement bidder-specific transformations. +You can check what "hooks" are available and their description at the OpenrtbBidder class. + +NOTE: this model is not universal "all-in-one" solution as it encapsulates only the simple bidders' behaviour +in order to ease the creation of lightweight bidders and get rid of boilerplate code. +Bidders with a complicated request transformation logic would have to implement a Bidder interface and +define their structure from scratch. + +#### Can Your Bidder use the OpenrtbBidder model? + +If your bidder is the one that: + +1. Send out a single request i.e. ones that just modify an incoming request and pass it on("one-to-one") OR +send out one request per incoming request impression. Other "one-to-many" scenarios are nto supported; +2. Have a constant endpoint url (no additional or optional path parameters or request parameters); +3. Require a basic set of headers, which is "Content-type" : "application/json;charset=utf-8" and "Accept" : "application/json" +4. Apply static changes to the outgoing request, e.g., setting a specific constant value or removing a certain request field; +5. Modify impression or request values in a way that could be expressed by transformation mapping; +6. Returns all bids present in Bid Response; +7. Bid type and currency could by derived from bid itself and its corresponding impression; + +#### What Does the OpenRTB Bidder Implement? + +Constructing outgoing http request/s from incoming bid request: + +1. Validate incoming bid request, request impressions and impression extensions; +2. Apply necessary changes or transformations to request and its impressions; +3. Encode and return the modified outgoing request/s. + +Bidder response processing: + +1. Extract bids from response; +2. Set each bid type and currency; + +### Bid Response Metadata + +In addition to the standard OpenRTB2.5 response fields, Prebid encourages bidders to +provide additional metadata in their bid response: + +{% highlight js %} +{ + "seatbid": [{ + "bid": [{ + ... + "ext": { + "prebid": { + "meta": { + "networkId": NETWORK_ID, + "networkName": NETWORK_NAME + "agencyId": AGENCY_ID, + "agencyName": AGENCY_NAME, + "advertiserId": ADVERTISER_ID, + "advertiserName": ADVERTISER_NAME, + "advertiserDomains": [ARRAY_OF_ADVERTISER_DOMAINS] + "brandId": BRAND_ID, + "brandName": BRAND_NAME, + "primaryCatId": IAB_CATEGORY, + "secondaryCatIds": [ARRAY_OF_IAB_CATEGORIES], + } + } + } + }] + }] +} +{% endhighlight %} + +Notes: + +- `advertiserDomains` is the same as the OpenRTB 2.5 `bid.adomain` field but replicated here for downstream convenience +- See the [Prebid.js Bidder Adapter](/dev-docs/bidder-adaptor.html) page for details about the requested values for each field. + +{: .alert.alert-info :} +Please provide as much information as possible in the meta object. Publishers use this data for tracking down bad creatives and ad blocking. The advertiserDomains field is particularly useful. Some of these fields may become required in a future release. + +### BidResponse Requirements + +**Note**: In order to be part of the auction, all bids must include: + +- An ID +- An ImpID which matches one of the `Imp[i].ID`s from the incoming `BidRequest` +- A positive `Bid.Price` +- A `Bid.CrID` which uniquely identifies the Creative in the bid. + +Bids which don't satisfy these standards will be filtered out before Prebid Server responds. + +## Integration + +After implementation you should integrate the Bidder with file: +- `src/main/java/org/prebid/server/spring/config/bidder/{bidder}Configuration.java` + +It should be public class with Spring `@Configuration` annotation so that framework could pick it up. + +This file consists of three main parts: +- the constant `BIDDER_NAME` with the name of your Bidder. +- injected configuration properties (like `endpoint`, `usersyncUrl`, etc) needed for the Bidder's implementation. +- declaration of `BidderDeps` bean combining _bidder name_, _Usersyncer_, _Adapter_ and _BidderRequester_ in one place as a single point-of-truth for using it in application. + +Also, you can add `@ConditionalOnProperty` annotation on configuration if bidder has no default properties. +See `src/main/java/org/prebid/server/spring/config/bidder/FacebookConfiguration.java` as an example. + +## Test Your Bidder + +### Automated Tests + +Assume common rules to write unit tests from [here](unit-tests.md). + +Bidder tests live in the next files: +- `src/test/java/org/prebid/server/bidder/{bidder}/{bidder}BidderTest.java`: unit tests for your Bidder implementation. +- `src/test/java/org/prebid/server/bidder/{bidder}/{bidder}AdapterTest.java`: unit tests for your Adapter implementation. +- `src/test/java/org/prebid/server/bidder/{bidder}/{bidder}UsersyncerTest.java`: unit tests for your Usersyncer implementation. + +Commonly you should write tests for covering: +- creation of your Adapter/Bidder/Usersyncer implementations. +- correct Bidder's params filling. +- JSON parser errors handling. +- specific cases for composing requests to exchange. +- specific cases for processing responses from exchange. + +Do not forget to add your Bidder to `ApplicationTest.java` tests. + +We expect to see at least 90% code coverage on each bidder. + +### Manual Tests + +[Configure](https://github.com/rubicon-project/prebid-server-java/blob/master/docs/config.md), [build](https://github.com/rubicon-project/prebid-server-java/blob/master/docs/build.md) and [start](https://github.com/rubicon-project/prebid-server-java/blob/master/docs/run.md) your server. + +Then `POST` an OpenRTB Request to `http://localhost:8000/openrtb2/auction`. + +If at least one `request.imp[i].ext.{bidder}` is defined in your Request, then your bidder should be called. + +To test user syncs, [call /setuid](/prebid-server/endpoints/pbs-endpoint-setuid.html) using the FamilyName of your Bidder. +The next time you use `/openrtb2/auction`, the OpenRTB request sent to your Bidder should have +`BidRequest.User.BuyerUID` with the value you saved. + +## Document your bidder + +There are two documents required before we’ll accept your pull request: + +1. Repo metadata - create a new file https://github.com/prebid/prebid-server/blob/master/static/bidder-info/BIDDERCODE.yaml based on one of the other ones there. Note that you must provide an email that’s not a single individual – we need robust maintainer contact info read by multiple people like “support@example.com”. +1. User documentation - required to appear in the [Prebid Server adapters page](/dev-docs/pbs-bidders.html). If you already have one of these files from having a PBS-Go adapter, you're done. Otherwise, see [that page](/prebid-server/developers/add-new-bidder-go.html#document-your-adapter) for details. + +## Contribute + +Finally, [Contribute](https://github.com/rubicon-project/prebid-server-java/blob/master/docs/contributing.md) your Bidder to the project. diff --git a/prebid-server/developers/add-new-bidder.md b/prebid-server/developers/add-new-bidder.md deleted file mode 100644 index 6784fce9e1..0000000000 --- a/prebid-server/developers/add-new-bidder.md +++ /dev/null @@ -1,166 +0,0 @@ ---- -layout: page_v2 -sidebarType: 5 -title: Prebid Server | Developers | Adding a New Bidder - ---- - -# Adding a New Bidder - -{: .no_toc} - -* TOC -{:toc } - -This document describes how to add a new Bidder to Prebid Server. Bidders are responsible for reaching out to your Server to fetch Bids. - -**NOTE**: To make everyone's lives easier, Bidders are expected to make Net bids (e.g. "If this ad wins, what will the publisher make?), not Gross ones. -Publishers can correct for Gross bids anyway by setting [Bid Adjustments](../endpoints/openrtb2/auction.html#bid-adjustments) to account for fees. - -## Choose a Bidder Name - -This name must be unique. Existing BidderNames can be found [here](https://github.com/prebid/prebid-server/blob/master/openrtb_ext/bidders.go). - -Throughout the rest of this document, substitute `{bidder}` with the name you've chosen. - -## Define Your Bidder Params - -Bidders may define their own APIs for Publishers pass custom values. It is _strongly encouraged_ that these not -duplicate values already present in the [OpenRTB 2.5 spec](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf). - -Publishers will send values for these parameters in `request.imp[i].ext.{bidder}` of -[the Auction endpoint](../endpoints/openrtb2/auction.html). Prebid Server will preprocess these so that -your bidder will access them at `request.imp[i].ext.bidder`--regardless of what your `{bidder}` name is. - -## Implement Your Bidder - -Bidder implementations are scattered throughout several files. - -- `adapters/{bidder}/{bidder}.go`: contains an implementation of [the Bidder interface](https://github.com/prebid/prebid-server/blob/master/adapters/bidder.go). -- `openrtb_ext/imp_{bidder}.go`: contract classes for your Bidder's params. -- `usersync/usersyncers/{bidder}.go`: A [Usersyncer](https://github.com/prebid/prebid-server/blob/master/usersync/usersync.go) which returns cookie sync info for your bidder. -- `usersync/usersyncers/{bidder}_test.go`: Unit tests for your Usersyncer -- `static/bidder-params/{bidder}.json`: A [draft-4 json-schema](https://spacetelescope.github.io/understanding-json-schema/) which [validates your Bidder's params](https://www.jsonschemavalidator.net/). -- `static/bidder-info/{bidder}.yaml`: contains metadata (e.g. contact email, platform & media type support) about the adapter - -Bidder implementations may assume that any params have already been validated against the defined json-schema. - -### Bid Response Metadata - -In addition to the standard OpenRTB2.5 response fields, Prebid encourages bidders to -provide additional metadata in their bid response: - -{% highlight js %} -{ - "seatbid": [{ - "bid": [{ - ... - "ext": { - "prebid": { - "meta": { - "networkId": NETWORK_ID, - "networkName": NETWORK_NAME - "agencyId": AGENCY_ID, - "agencyName": AGENCY_NAME, - "advertiserId": ADVERTISER_ID, - "advertiserName": ADVERTISER_NAME, - "advertiserDomains": [ARRAY_OF_ADVERTISER_DOMAINS] - "brandId": BRAND_ID, - "brandName": BRAND_NAME, - "primaryCatId": IAB_CATEGORY, - "secondaryCatIds": [ARRAY_OF_IAB_CATEGORIES], - } - } - } - }] - }] -} -{% endhighlight %} - -Notes: - -- `advertiserDomains` is the same as the OpenRTB 2.5 `bid.adomain` field but replicated here for downstream convenience -- See the [Prebid.js Bidder Adapter](/dev-docs/bidder-adaptor.html) page for details about the requested values for each field. - -{: .alert.alert-info :} -Please provide as much information as possible in the meta object. Publishers use this data for tracking down bad creatives and ad blocking. The advertiserDomains field is particularly useful. Some of these fields may become required in a future release. - - - -## Long-Form Video Support -If long-form video will be supported ensure the bidder has the following: - -{: .table .table-bordered .table-striped } -|Field |Type |Description -|----------------|-------------------------------|-----------------------------| -|bid.bidVideo.PrimaryCategory | string | The category for the bid. This should be able to be translated to Primary ad server format| -|TypedBid.bid.Cat | []string | The category for the bid. Should be an array with length 1 containing the value in IAB format| -|TypedBid.BidVideo.Duration | int | Ad duration in seconds| -|TypedBid.bid.Price | float | Bid price| - -{% capture alertNote %} -`bid.bidVideo.PrimaryCategory` or `TypedBid.bid.Cat` should be specified. -{% endcapture %} - -{% include alerts/alert_note.html content=alertNote %} -To learn more about IAB categories, refer site provided by adtagmacros.com: [IAB categories](https://adtagmacros.com/list-of-iab-categories-for-advertisement/) - -## Test Your Bidder - -### Automated Tests - -Bidder tests live in two files: - -- `adapters/{bidder}/{bidder}_test.go`: contains unit tests for your Bidder implementation. -- `adapters/{bidder}/params_test.go`: contains unit tests for your Bidder's JSON Schema params. - -Since most Bidders communicate through HTTP using JSON bodies, you should -use the [JSON-test utilities](https://github.com/prebid/prebid-server/blob/master/adapters/adapterstest/test_json.go). -This comes with several benefits, which are described in the source code docs. - -If your HTTP requests don't use JSON, you'll need to write your tests in the code. -We expect to see at least 90% code coverage on each Bidder. - -Bidders should also define an `adapters/{bidder}/{bidder}test/params/race/{mediaType}.json` file for any supported -Media Types (banner, video, audio, or native). These files should contain a JSON object with all the bidder params -(required & optional) which are expected in supporting that video type. This will be used in automated tests which -check for race conditions across Bidders. - -### Manual Tests - -Build and start your server: - -```bash -go build . -./prebid-server -``` - -Then `POST` an OpenRTB Request to `https://localhost:8000/openrtb2/auction`. - -If at least one `request.imp[i].ext.{bidder}` is defined in your Request, -then your bidder should be called. - -To test user syncs, [save a UID](../endpoints/setuid.html) using the FamilyName of your Usersyncer. -The next time you use `/openrtb2/auction`, the OpenRTB request sent to your Bidder should have -`BidRequest.User.BuyerUID` with the value you saved. - -## Add your Bidder to the Exchange - -Add a new [BidderName constant](https://github.com/prebid/prebid-server/blob/master/openrtb_ext/bidders.go) for your {bidder}. -Update the [newAdapterMap function](https://github.com/prebid/prebid-server/blob/master/exchange/adapter_map.go) to make your Bidder available in [auctions](../endpoints/openrtb2/auction.html). -Update the [NewSyncerMap function](https://github.com/prebid/prebid-server/blob/master/usersync/usersync.go) to make your Bidder available for [usersyncs](../endpoints/setuid.html). - -## Contribute - -Finally, [Contribute](https://github.com/prebid/prebid-server/blob/master/docs/developers/contributing.md) your Bidder to the project. - -## Server requirements - -**Note**: In order to be part of the auction, all bids must include: - -- An ID -- An ImpID which matches one of the `Imp[i].ID`s from the incoming `BidRequest` -- A positive `Bid.Price` -- A `Bid.CrID` which uniquely identifies the Creative in the bid. - -Bids which don't satisfy these standards will be filtered out before Prebid Server responds. diff --git a/prebid-server/developers/code-reviews.md b/prebid-server/developers/code-reviews.md new file mode 100644 index 0000000000..10202d468a --- /dev/null +++ b/prebid-server/developers/code-reviews.md @@ -0,0 +1,52 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Developers | Code Reviews + +--- + +# Prebid Server Code Reviews + +## Standards +Anyone is free to review and comment on any [open pull requests](https://github.com/prebid/prebid-server/pulls). +for either [PBS-Go](https://github.com/prebid/prebid-server/pulls) or [PBS-Java](https://github.com/rubicon-project/prebid-server-java/pulls) + +All pull requests must be reviewed and approved by at least one core member before merge. + +Very small pull requests may be merged with just one review if they: + +1. Do not change the public API. +2. Have low risk of bugs, in the opinion of the reviewer. +3. Introduce no new features, or impact the code architecture. + +Larger pull requests must meet at least one of the following two additional requirements. + +1. Have a second approval from a core member +2. Be open for 5 business days with no new changes requested. + +## Process + +New pull requests should be [assigned](https://help.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) to a core member for review within 3 business days of being opened. +That person should either approve the changes or request changes within 4 business days of being assigned. +If they're too busy, they should assign it to someone else who can review it within that timeframe. + +If the changes are small, that member can merge the PR once the changes are complete. Otherwise, they should +assign the pull request to another member for a second review. + +The pull request can then be merged whenever the second reviewer approves, or if 5 business days pass with no farther +changes requested by anybody, whichever comes first. + + +## Priorities + +Code reviews should focus on things which cannot be validated by machines. + +Some examples include: + +- Can we improve the user's experience in any way? +- Have the relevant [docs](..) been added or updated? If not, add the `needs docs` label. +- Do you believe that the code works by looking at the unit tests? If not, suggest more tests until you do! +- Is the motivation behind these changes clear? If not, there must be [an issue](https://github.com/prebid/prebid-server/issues) explaining it. Are there better ways to achieve those goals? +- Does the code use any global, mutable state? [Inject dependencies](https://en.wikipedia.org/wiki/Dependency_injection) instead! +- Can the code be organized into smaller, more modular pieces? +- Is there dead code which can be deleted? Or TODO comments which should be resolved? diff --git a/prebid-server/developers/cookie-syncs.md b/prebid-server/developers/cookie-syncs.md deleted file mode 100644 index 6067c1165e..0000000000 --- a/prebid-server/developers/cookie-syncs.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -layout: page_v2 -sidebarType: 5 -title: Prebid Server | Developers | Cookie Sync Technical Details - ---- -# Cookie Sync Technical Details - -This document describes the mechancis of a Prebid Server cookie sync. - -## Motivation - -Many Bidders track users through Cookies. Since Bidders will generally serve ads from a different domain -than where Prebid Server is hosted, those cookies must be consolidated under the Prebid Server domain so -that they can be sent to each demand source in [/openrtb2/auction](../endpoints/openrtb2/auction.md) calls. - -## How to do it? - -Start by calling [`/cookie_sync`](../endpoints/cookieSync.md). For each element of `response.bidder_status`, -call `GET element.usersync.url`. That endpoint should respond with a redirect which will complete the cookie sync. - -## Mechanics - -Bidders who support cookie syncs must implement an endpoint under their domain which accepts -an encoded URI for redirects. For example: - -> GET some-bidder-domain.com/usersync-url?redirectUri=www.prebid-domain.com/setuid?bidder=somebidder&uid=$UID - -This example endpoint would URL-decode the `redirectUri` param to get `www.prebid-domain.com/setuid?bidder=somebidder&uid=$UID`. -It would then replace the `$UID` macro with the user's ID from their cookie. Supposing this user's ID was "132", -it would then return a redirect to `www.prebid-domain.com/setuid?bidder=somebidder&uid=132`. - -Prebid Server would then save this ID mapping of `somebidder: 132` under the cookie at `prebid-domain.com`. - -When the client then calls `www.prebid-domain.com/openrtb2/auction`, the ID for `somebidder` will be available in the Cookie. -Prebid Server will then stick this into `request.user.buyeruid` in the OpenRTB request it sends to `somebidder`'s Bidder. diff --git a/prebid-server/developers/coppa.md b/prebid-server/developers/coppa.md deleted file mode 100644 index 6f3014da24..0000000000 --- a/prebid-server/developers/coppa.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -layout: page_v2 -sidebarType: 5 -title: Prebid Server | Developers | COPPA Support - ---- - -# COPPA Support - -The [Children's Online Privacy Protection Act (COPPA)](https://www.ftc.gov/enforcement/rules/rulemaking-regulatory-reform-proceedings/childrens-online-privacy-protection-rule) is a law created to protect the privacy of children under 13. The Act was passed by the U.S. Congress in 1998 and took effect in April 2000. COPPA is managed by the Federal Trade Commission (FTC). - -Prebid-Server supports COPPA compliance by enabling developers to set a flag in the bid request. Developers can do so by setting: -```javascript - `request.regs.coppa` -``` -Once the flag is set the bid request object is modified and the following changes occur: - -- All Device ID fields are removed: `device.ifa`, `device.macsha1`, `device.macmd5`, `device.dpidsha1`, `device.dpidmd5`, `device.didsha1`, `device.didmd5` -- Truncate `device.ip` field - remove lowest 8 bits. -- Truncate `device.ipv6` field - remove lowest 32 bits. -- Remove `geo.lat`, `geo.lon`, `geo.metro`, `geo.city`, and `geo.zip` -- Remove `user.id`, `user.buyeruid`, `user.yob`, and `user.gender` - -## Further Reading - -- [Prebid Server Overview](/prebid-server/prebid-server-overview.html) -- [Prebid Server Default Request](/prebid-server/developers/default-request.html) diff --git a/prebid-server/developers/currency-converter.md b/prebid-server/developers/currency-converter.md deleted file mode 100644 index ca8c180e1b..0000000000 --- a/prebid-server/developers/currency-converter.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -layout: page_v2 -sidebarType: 5 -title: Prebid Server | Developers | Currency Converter - ---- - -**For the time being, currency conversion is not enabled, feature is still under dev (check #280).** - -# Currency Converter Mechanics - -Prebid server supports currency conversions when receiving bids. - -## Default currency - -The default currency is `USD`. It means that any bids coming without an explicit currency will be interpreted as being `USD`. - -## Setup - -By default, the currency converter uses https://cdn.jsdelivr.net/gh/prebid/currency-file@1/latest.json for currency conversion. This data is updated every 24 hours on prebid.org side. -By default, currency conversions are updated from the endpoint every 30 minutes in prebid server. - -Default configuration: -``` -v.SetDefault("currency_converter.fetch_url", "https://cdn.jsdelivr.net/gh/prebid/currency-file@1/latest.json") -v.SetDefault("currency_converter.fetch_interval_seconds", 1800) // 30 minutes -``` - -This configuration can be changed: -- currency_converter.fetch_url can be any URL exposing currency using the following JSON schema: - ``` - { - "dataAsOf":"2018-09-12", - "conversions":{ - "USD":{ - "GBP":0.77208 - }, - "GBP":{ - "USD":1.2952 - } - } - } - ``` -- currency_converter.fetch_interval_seconds can be anything from 0 to max int. - **The currency conversion mechanism can be disable by setting it to 0, in this case, there will be no currency conversions at all and all bidders will need to provide bids as `USD`** - - ## Examples - - Here are couple examples showing the logic behind the currency converter: - -| Bidder bid price | Currency | Rate to USD | Rate converter is active | Converted bid price (USD) | Valid bid | -| :--------------- | :------------ |:--------------| :------------------------| :-------------------------|:----------| -| 1 | USD | 1 | YES | 1 | YES | -| 1 | N/A | 1 | YES | 1 | YES | -| 1 | USD | 1 | NO | 1 | YES | -| 1 | EUR | 1.13 | YES | 1.13 | YES | -| 1 | EUR | N/A | YES | N/A | NO | -| 1 | EUR | 1.13 | NO | N/A | NO | \ No newline at end of file diff --git a/prebid-server/developers/gdpr.md b/prebid-server/developers/gdpr.md deleted file mode 100644 index d2f2de8943..0000000000 --- a/prebid-server/developers/gdpr.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -layout: page_v2 -sidebarType: 5 -title: Prebid Server | Developers | GDPR Mechanics - ---- -# GDPR Mechanics - -Within the framework of [GDPR](https://gdpr.eu/), Prebid Server behaves like a [data processor](https://gdpr.eu/recital-81-the-use-of-processors/). -[Cookie syncs](/prebid-server/developers/cookie-syncs.html) save the user ID for each Bidder in the cookie, and each Bidder's ID is sent back to that Bidder during the [auction](/prebid-server/endpoints/openrtb2/auction.html). -Prebid Server does not use this ID for any other reason. - -## IDs during Auction - -The [`/openrtb2/auction`](../endpoints/openrtb2/auction.md#gdpr) endpoint accepts `user.regs.gdpr` and `user.ext.consent` fields, -[as recommended by the IAB](https://iabtechlab.com/wp-content/uploads/2018/02/OpenRTB_Advisory_GDPR_2018-02.pdf). - -## IDs during Cookie Syncs - -The [`POST /cookie_sync`](../endpoints/cookieSync.md) endpoint accepts `gdpr` and `gdpr_consent` properties in the request body. - -If the Prebid Server host company does not have consent to read/write cookies, `/cookie_sync` will return an empty response with no syncs. -Otherwise, it will return a response limited to syncs for Bidders that have consent to read/write cookies. -This limitation is in place for performance reasons; it results in fewer syncs called on the page, and their -sync endpoints will almost certainly read from the cookie anyway. - -The [`/setuid`](../endpoints/setuid.md) endpoint accepts `gdpr` and `gdpr_consent` query params. This endpoint -will no-op if the Prebid Server host company does not have consent to read/write cookies. - -## Handling the params - -For all endpoints, `gdpr` should be `1` if GDPR is in effect, `0` if not, and omitted if the caller isn't sure. -`gdpr_consent` should be an [unpadded base64-URL](https://tools.ietf.org/html/rfc4648#page-7) encoded [Vendor Consent String](https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/Consent%20string%20and%20vendor%20list%20formats%20v1.1%20Final.md#vendor-consent-string-format-). - -`gdpr_consent` is required if `gdpr` is `1` and ignored if `gdpr` is `0`. If `gdpr` is omitted, the Prebid Server -host company can decide whether it behaves like a `1` or `0` through the [app configuration](https://github.com/prebid/prebid-server/blob/master/docs/developers/configuration.md). -Callers are encouraged to send the `gdpr_consent` param if `gdpr` is omitted. diff --git a/prebid-server/developers/installing-go.md b/prebid-server/developers/installing-go.md new file mode 100644 index 0000000000..9531c00b72 --- /dev/null +++ b/prebid-server/developers/installing-go.md @@ -0,0 +1,66 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Versions | Go | Installing + +--- + +# Installing PBS-Go + +## Installation + +First install [Go](https://golang.org/doc/install) version 1.13 or newer. + +Note that prebid-server is using [Go modules](https://blog.golang.org/using-go-modules). +We officially support the most recent two major versions of the Go runtime. However, if you'd like to use a version <1.13 and are inside GOPATH `GO111MODULE` needs to be set to `GO111MODULE=on`. + +Download and prepare Prebid Server: + +```bash +cd YOUR_DIRECTORY +git clone https://github.com/prebid/prebid-server src/github.com/prebid/prebid-server +cd src/github.com/prebid/prebid-server +``` + +Run the automated tests: + +```bash +./validate.sh +``` + +Or just run the server locally: + +```bash +go build . +./prebid-server +``` + +Load the landing page in your browser at `http://localhost:8000/`. +For the [full API reference](/prebid-server/endpoints/pbs-endpoint-overview.html) + +## Packaging + +Prebid Server is [packaged with Docker](https://www.docker.com/what-docker) and +optimized to create [lightweight containers](https://blog.codeship.com/building-minimal-docker-containers-for-go-applications/). + +[Install Docker](https://www.docker.com/community-edition#/download) and build a container: + +```bash +docker build -t prebid-server . +``` + +Test locally with: + +```bash +docker run -p 8000:8000 -t prebid-server +``` + +The server can be reached at `http://localhost:8000`. + +## Contributing + +Want to [add a bidding adapter](https://github.com/prebid/prebid-server/blob/master/docs/developers/add-new-bidder.md)? + +Report bugs, request features, and suggest improvements [on Github](https://github.com/prebid/prebid-server/issues). + +Or better yet, [open a pull request](https://github.com/prebid/prebid-server/compare) with the changes you'd like to see. diff --git a/prebid-server/developers/installing-java.md b/prebid-server/developers/installing-java.md new file mode 100644 index 0000000000..c061e34204 --- /dev/null +++ b/prebid-server/developers/installing-java.md @@ -0,0 +1,31 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Versions | Java | Installing + +--- + +# Installing PBS-Java + +## Development + +This project is built upon [Vert.x](http://vertx.io) to achieve high request throughput. +We use [Maven](https://maven.apache.org) and attempt to introduce minimal dependencies. + +## Getting Started + +To start the Prebid Server you need to do the following steps: +- Build all-in-one JAR file from sources as described in the [build documentation](https://github.com/rubicon-project/prebid-server-java/blob/master/docs/build.md). +- Check minimal needed configuration file `sample/prebid-config.yaml`. +- Also, check the Data Cache settings file `sample/sample-app-settings.yaml`. +For more information how to configure the server follow the [config documentation](https://github.com/rubicon-project/prebid-server-java/blob/master/docs/config.md). + +- Run your server with: +``` +java -jar target/prebid-server.jar --spring.config.additional-location=sample/prebid-config.yaml +``` +For more information how to start the server follow the [run documentation](https://github.com/rubicon-project/prebid-server-java/blob/master/docs/run.md). + +- To verify everything is OK go to `http://localhost:8080/status` and check response status is `200 OK`. + +More detailed project documentation can be found [here](https://github.com/rubicon-project/prebid-server-java/blob/master/docs/TOC.md). diff --git a/prebid-server/developers/pbs-bidder-info.md b/prebid-server/developers/pbs-bidder-info.md deleted file mode 100644 index cb2db50152..0000000000 --- a/prebid-server/developers/pbs-bidder-info.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -layout: page_v2 -title: Prebid Server Bidders - Additional Info -description: Additonal Information about Prebid Server Bidders -pid: 1 -top_nav_section: prebid-server -nav_section: prebid-server -sidebarType: 5 ---- - -# Additional Bidder Information -{:.no_toc} - -Some Prebid Server bidders require additional information for integration. For basic information and an up-to-date list of all Prebid Server bidders, see [Prebid Server Bidders]({{site.baseurl}}/dev-docs/prebid-server-bidders.html). - -* TOC -{:toc} - -## AppNexus - -### Using Keywords - -The `keywords` [bidder param](https://github.com/prebid/prebid-server/blob/master/static/bidder-params/appnexus.json) will only work if -it's enabled for your Account with AppNexus. - -**This permission is _distinct_ from the keywords feature used by Prebid.js.** - -If you want to enable AppNexus keywords, contact your account manager. - -## Audience Network - -### Mobile Bids - -Audience Network will not bid on requests made from device simulators. When testing for Mobile bids, you must make bid requests using a real device. - -## Beachfront - -To use the beachfront bidder you will need an appId from an exchange account on [https://platform.beachfront.io](https://platform.beachfront.io). For further information, please contact [adops@beachfront.com](mailto:adops@beachfront.com). - -## Rubicon - -Contact your Rubicon Project account manager to get set up with a login and cookie-sync URL to run your own Prebid Server. - -You will be given instructions, including the available endpoints. - -## Sovrn - -Sovrn supports two parameters to be present in the `ext` object of impressions sent to it: - -- `tagid`: A string containing the sovrn-specific id(s) for the publisher's ad tag(s) they would like to bid with. This is a required field. - -- `bidfloor`: The minimum acceptable bid, in CPM, using US Dollars. This is an optional field. diff --git a/prebid-server/developers/pbs-build-an-analytics-adapter.md b/prebid-server/developers/pbs-build-an-analytics-adapter.md new file mode 100644 index 0000000000..364b486b58 --- /dev/null +++ b/prebid-server/developers/pbs-build-an-analytics-adapter.md @@ -0,0 +1,75 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Developer | Build An Analytics Adapter + +--- + +# Prebid Server - Building an Analytics Adapter +{: .no_toc} + +There aren't any open sourced analytics adapters for Prebid Server, +but there is an internal interface that host companies can use to +integrate their own modules. + +Below is an outline of how it's done for both versions of the server. + +{: .alert.alert-warning :} +Analytics adapters are subject to a number of specific technical rules. Please become familiar +with the [module rules](/dev-docs/module-rules.html) that apply globally and to analytics adapters in particular. + +* TOC +{:toc } + +## Adding an Analytics Adapter in PBS-Go + +1. Define config params + +Analytics modules are enabled through Viper [configuration](https://github.com/prebid/prebid-server/blob/master/docs/developers/configuration.md). +You'll need to define any properties in config/config.go which are required for your module. + +2. Implement your module +Your new module belongs in the analytics/{moduleName} package. It should implement the `PBSAnalyticsModule` interface from analytics/core.go + +3. Connect your Config to the Implementation +The `NewPBSAnalytics()` function inside analytics/config/config.go instantiates Analytics modules using the app config. You'll need to update this to recognize your new module. + +### Example +{:.no_toc} + +A simple [filesystem](https://github.com/prebid/prebid-server/tree/master/analytics/filesystem) analytics module is provided as an example. This module will log dummy messages to a file. + +It can be configured with: + +``` +analytics: + file: + filename: "path/to/file.log +``` +Prebid Server will then write sample log messages to the file you provided. + +## Adding an Analytics Adapter in PBS-Java + +1. Define config params +Analytics modules are enabled through the [Configuration](https://github.com/rubicon-project/prebid-server-java/blob/master/docs/config.md). + +2. Implement your module +Your new module org.prebid.server.analytics.{module}AnalyticsReporter needs to implement the org.prebid.server.analytics.AnalyticsReporter interface. + +3. Add your implementation to Spring Context +In order to make Prebid Server aware of the new analytics module it needs to be added to the Spring Context in org.prebid.server.spring.config.AnalyticsConfiguration as a bean. + +### Example +{:.no_toc} + +The [log module](https://github.com/rubicon-project/prebid-server-java/blob/master/src/main/java/org/prebid/server/analytics/LogAnalyticsReporter.java) is provided as an example. This module will write dummy messages to a log. + +It can be configured with: + +``` +analytics: + log: + enabled: true +``` + +Prebid Server will then write sample log messages to the log. diff --git a/prebid-server/developers/pbs-cookie-sync.md b/prebid-server/developers/pbs-cookie-sync.md new file mode 100644 index 0000000000..921f5b8a9f --- /dev/null +++ b/prebid-server/developers/pbs-cookie-sync.md @@ -0,0 +1,102 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Developer | User ID Sync + +--- + +# Prebid Server User ID Sync + +## Motivation + +Many bidders track their bidder-specific user IDs through cookies. Since bidders will generally serve ads from a different domain +than where Prebid Server is hosted, those cookies must be consolidated under the Prebid Server domain so +that they can be sent to each demand source as part of auction calls. + +## How it Works + +Prebid Server stores bidder IDs in the `uids` cookie in the host domain. For example: + +``` +{"uids":{},"tempUIDs":{"adnxs":{"uid":"4722255122219375043","expires":"2020-07-30T22:10:28.961Z"},"triplelift":{"uid":"9328941297032053459","expires":"2020-07-30T22:10:33.496Z"},"yieldone":{"uid":"8c41c3b1-ce22-44fd-9bd7-454cd79e3c91","expires":"2020-07-30T22:10:33.229Z"},"ix":{"uid":"XlV6w9HM6LYAAHx2YJ4AAACZ&476","expires":"2020-07-30T22:10:31.916Z"},"yieldmo":{"uid":"ge515bd6c7da71cdc98a","expires":"2020-07-30T22:10:32.569Z"},"adform":{"uid":"1707054018971720697","expires":"2020-07-30T22:10:30.453Z"},"brightroll":{"uid":"y-S8Fq5QZ1lwWKPeXdoZ9vSeZx47maINFrJeY53pDtokA2FlaPmwvrJg--","expires":"2020-07-30T22:10:29.867Z"},"consumable":{"uid":"ue1-sb1-aa634f4b-d618-4378-b8c3-9baa56dcb91a","expires":"2020-07-30T22:10:28.07Z"},"pubmatic":{"uid":"2ECE1904-7EB2-4C38-98A4-38E97535AA9C","expires":"2020-07-30T22:10:27.559Z"},"rubicon":{"uid":"KACWYIER-P-59CH","expires":"2020-07-30T22:22:42.432Z"},"pulsepoint":{"uid":"dcxvyKqDV5VV","expires":"2020-07-30T22:10:26.915Z"},"sovrn":{"uid":"bad97f98b08c9204fe6b9826","expires":"2020-07-30T22:10:25.588Z"},"openx":{"uid":"f1f4ac13-99f8-46da-82f8-b52c29b378e0","expires":"2020-07-30T22:10:25.93Z"}},"bday":"2020-05-18T20:01:18.934Z"} +``` + +Here's how these IDs get placed in the cookie: + +![Prebid Server Cookie Sync](/assets/images/prebid-server/pbs-cookie-sync.png){:class="pb-lg-img"} + + +1) Prebid.js starts by calling the Prebid Server [`/cookie_sync`](/prebid-server/endpoints/pbs-endpoint-cookieSync.html), letting it know which server-side bidders will be participating in the header bidding auction. + +``` +POST https://prebid-server.example.com/cookie_sync + +{"bidders":["bidderA","bidderB"], "gdpr":1, "gdpr_consent":"...", "us_privacy": "..."} +``` + +2) If privacy regulations allow, Prebid Server will look at the `uids` cookie in the host domain and determine whether any bidders are missing or need to be refreshed. It responds with an array of pixel syncs. e.g. + +``` +{"status":"ok","bidder_status":[{"bidder":"bidderA","no_cookie":true,"usersync":{"url":"//biddera.com/getuid?https%3A%2F%2Fprebid-server.example.com%2Fsetuid%3Fbidder%3DbidderA%26gdpr%3D%26gdpr_consent%3D%26us_privacy%3D%26uid%3D%24UID","type":"redirect","supportCORS":false}},{"bidder":"bidderB","no_cookie":true,"usersync":{"url":"https://bidderB.com/u/match?gdpr=&euconsent=&us_privacy=&redir=https%3A%2F%2Fprebid-server.example.com%2Fsetuid%3Fbidder%3DbidderB%26gdpr%3D%26gdpr_consent%3D%26us_privacy%3D%26uid%3D","type":"redirect","supportCORS":false}}]} +``` + +3) When it receives the response, Prebid.js loops through each element of `bidder_status[]`, dropping a pixel for each `bidder_status[].usersync.url`. + +4) The bidder-specific endpoints read the users's cookie for the bidder's domain and respond with a redirect back to Prebid Server's [`/setuid` endpoint](/prebid-server/endpoints/pbs-endpoint-setuid.html) + +5) When the browser receives this redirect, it contacts Prebid Server, which will once again check the privacy settings and will update the `uids` cookie if allowed. + +### How It Works for AMP + +Cookie sync for AMP works in a way quite similar to Prebid.js. + +1) The Prebid Server hosting company places a modified version of the `load-cookie` script onto a CDN. This script is part of the [Prebid Universal Creative](https://github.com/prebid/prebid-universal-creative/blob/master/src/cookieSync.js) repo. + +Note that the only two values currently valid for 'endpoint' are 'appnexus' and 'rubicon' -- other host companies should update their copy to include their endpoint. + + +2) The publisher places the 'load-cookie' script into the page: + +``` + + + +``` + +3) At runtime, the `load-cookie` script just calls the Prebid Server /cookie_sync endpoint. The rest works the same as described for Prebid.js above. + + +## Building a Sync Endpoint + +Bidders must implement an endpoint under their domain which accepts an encoded URI for redirects. +This URL should be able to accept privacy parameters: + +- gdpr: if 0, declares this request isn't in GDPR scope. If 1, declares it is in scope. Otherwise indeterminate. +- gdpr_consent: the TCF1 or TCF2 consent string. This is unpadded base64-URL encoded. +- us_privacy: the IAB US Privacy string + +These values will be passed to your usersync endpoint. For example: + +Here's an example that shows the privacy macros used by PBS-Go: +``` +GET some-bidder-domain.com/usersync-url?gdpr={%raw%}{{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}{%endraw%}&redirectUri=prebid-server.example.com%2Fsetuid%3Fbidder%3Dsomebidder%26uid%3D%24UID +``` +PBS-Java uses slightly different macros: +``` +GET some-bidder-domain.com/usersync-url?gdpr={%raw%}{{gdpr}}&gdpr_consent={{gdpr_consent}}&us_privacy={{us_privacy}}{%endraw%}&redirectUri=prebid-server.example.com%2Fsetuid%3Fbidder%3Dsomebidder%26uid%3D%24UID +``` +In either case, you can receive the values on whatever query string parameters you'd like -- these are +the macros you can use to define the values. + +This example endpoint would URL-decode the `redirectUri` param to get `prebid-server.example.com/setuid?bidder=somebidder&uid=$UID`. +It would then replace the `$UID` macro with the user's ID from their cookie. Supposing this user's ID was "132", +it would then return a redirect to `prebid-server.example.com/setuid?bidder=somebidder&uid=132`. + +Prebid Server would then save this ID mapping of `somebidder: 132` under the cookie at `prebid-domain.com`. + +When the client then calls `www.prebid-domain.com/openrtb2/auction`, the ID for `somebidder` will be available in the Cookie. +Prebid Server will then stick this into `request.user.buyeruid` in the OpenRTB request it sends to `somebidder`'s Bidder. diff --git a/prebid-server/endpoints/bidders/params.md b/prebid-server/endpoints/bidders/params.md deleted file mode 100644 index 381dde8aca..0000000000 --- a/prebid-server/endpoints/bidders/params.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -layout: page_v2 -sidebarType: 5 -title: Prebid Server | Endpoints | Params - ---- - -## GET /bidders/params - -This endpoint gets information about all the custom bidders params that Prebid Server supports. - -### Returns - -A JSON object whose keys are bidder codes, and values are Draft 4 JSON schemas which describe that bidders' params. - -For example: - -``` -{ - "appnexus": { /* A json-schema describing AppNexus' bidder params */ }, - "rubicon": { /* A json-schema describing Rubicon's bidder params */ } - ... all other bidders will have similar keys & values here ... -} -``` - -The exact contents of the json-schema values can be found [here](https://github.com/prebid/prebid-server/tree/master/static). - -### See also - -- [JSON schema homepage](https://json-schema.org/specification-links.html#draft-4) -- [Understanding JSON schema](https://spacetelescope.github.io/understanding-json-schema/) diff --git a/prebid-server/endpoints/info/bidders.md b/prebid-server/endpoints/info/bidders.md deleted file mode 100644 index 336d214f35..0000000000 --- a/prebid-server/endpoints/info/bidders.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -layout: page_v2 -sidebarType: 5 -title: Prebid Server | Endpoints | Get/info/bidders - ---- - -# Prebid Server Bidder List - -## `GET /info/bidders` - -This endpoint returns a list of Bidders supported by Prebid Server. -These are the core values allowed to be used as `request.imp[i].ext.{bidder}` -keys in [Auction](../openrtb2/auction.html) requests. - -For detailed info about a specific Bidder, use [`/info/bidders/{bidderName}`](./bidders/bidderName.html) - -### Sample Response - -This endpoint returns JSON like: - -``` -[ - "appnexus", - "audienceNetwork", - "pubmatic", - "rubicon", - "other-bidders-here" -] -``` diff --git a/prebid-server/endpoints/info/bidders/bidderName.md b/prebid-server/endpoints/info/bidders/bidderName.md deleted file mode 100644 index 9472761981..0000000000 --- a/prebid-server/endpoints/info/bidders/bidderName.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -layout: page_v2 -sidebarType: 5 -title: Prebid Server | Endpoints | Bidder Name - ---- - -# Prebid Server Bidders - -## `GET /info/bidders/{bidderName}` - -This endpoint returns some metadata about the Bidder whose name is `{bidderName}`. -Legal values for `{bidderName}` can be retrieved from the [/info/bidders](../bidders.html) endpoint. - -### Sample Response - -This endpoint returns JSON like: - -``` -{ - "maintainer": { - "email": "info@prebid.org" - }, - "capabilities": { - "app": { - "mediaTypes": [ - "banner", - "native" - ] - }, - "site": { - "mediaTypes": [ - "banner", - "video", - "native" - ] - } - } -} -``` - -The fields hold the following information: - -- `maintainer.email`: A contact email for the Bidder's maintainer. In general, Bidder bugs should be logged as [issues](https://github.com/prebid/prebid-server/issues)... but this contact email may be useful in case of emergency. -- `capabilities.app.mediaTypes`: A list of media types this Bidder supports from Mobile Apps. -- `capabilities.site.mediaTypes`: A list of media types this Bidder supports from Web pages. - -If `capabilities.app` or `capabilities.site` do not exist, then this Bidder does not support that platform. -OpenRTB Requests which define a `request.app` or `request.site` property will fail if a -`request.imp[i].ext.{bidderName}` exists for a Bidder which doesn't support them. diff --git a/prebid-server/endpoints/info/pbs-endpoint-info.md b/prebid-server/endpoints/info/pbs-endpoint-info.md new file mode 100644 index 0000000000..0b98700936 --- /dev/null +++ b/prebid-server/endpoints/info/pbs-endpoint-info.md @@ -0,0 +1,99 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Endpoints | Info + +--- + +# Prebid Server | Endpoints | /info +{:.no_toc} + +* TOC +{:toc} + +## GET /info/bidders + +This endpoint returns a list of Bidders supported by Prebid Server. +These are the core values allowed to be used as `request.imp[i].ext.{bidder}` +keys in [Auction](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html) requests. + +For detailed info about a specific Bidder, use [`/info/bidders/{bidderName}`](./bidders/bidderName.html) + +### Sample Response +{:.no_toc} + +This endpoint returns JSON like: + +``` +[ + "appnexus", + "audienceNetwork", + "pubmatic", + "rubicon", + "other-bidders-here" +] +``` + +## GET /info/bidders/{bidderName} + +This endpoint returns some metadata about the Bidder whose name is `{bidderName}`. +Legal values for `{bidderName}` can be retrieved from the [/info/bidders](../bidders.html) endpoint. + +### Sample Response +{:.no_toc} + +This endpoint returns JSON like: + +``` +{ + "maintainer": { + "email": "info@prebid.org" + }, + "capabilities": { + "app": { + "mediaTypes": [ + "banner", + "native" + ] + }, + "site": { + "mediaTypes": [ + "banner", + "video", + "native" + ] + } + } +} +``` + +The fields hold the following information: + +- `maintainer.email`: A contact email for the Bidder's maintainer. In general, Bidder bugs should be logged as [issues](https://github.com/prebid/prebid-server/issues)... but this contact email may be useful in case of emergency. +- `capabilities.app.mediaTypes`: A list of media types this Bidder supports from Mobile Apps. +- `capabilities.site.mediaTypes`: A list of media types this Bidder supports from Web pages. + +If `capabilities.app` or `capabilities.site` do not exist, then this Bidder does not support that platform. +OpenRTB Requests which define a `request.app` or `request.site` property will fail if a +`request. + +## GET /bidders/params + +This endpoint gets information about all the custom bidders params that Prebid Server supports. + +### Returns +{:.no_toc} + +A JSON object whose keys are bidder codes, and values are Draft 4 JSON schemas which describe that bidders' params. + +For example: + +``` +{ + "appnexus": { /* A json-schema describing AppNexus' bidder params */ }, + "rubicon": { /* A json-schema describing Rubicon's bidder params */ } + ... all other bidders will have similar keys & values here ... +} +``` + +The exact contents of the json-schema values can be found at [https://github.com/prebid/prebid-server/tree/master/static/bidder-params](https://github.com/prebid/prebid-server/tree/master/static/bidder-params) diff --git a/prebid-server/endpoints/openrtb2/adpod/video.md b/prebid-server/endpoints/openrtb2/adpod/video.md deleted file mode 100644 index f7c511e022..0000000000 --- a/prebid-server/endpoints/openrtb2/adpod/video.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -layout: page_v2 -sidebarType: 5 -title: Prebid Server | Endpoints | Video - ---- - -# Prebid Server Video Endpoint - -This document describes the behavior of the Prebid Server video endpoint in detail. - -## Video Endpoint - - `GET /openrtb2/video` - - **Parameters** \ No newline at end of file diff --git a/prebid-server/endpoints/openrtb2/auction.md b/prebid-server/endpoints/openrtb2/auction.md deleted file mode 100644 index 80fb190d46..0000000000 --- a/prebid-server/endpoints/openrtb2/auction.md +++ /dev/null @@ -1,380 +0,0 @@ ---- -layout: page_v2 -sidebarType: 5 -title: Prebid Server | Endpoints | Auction - ---- - -# Prebid Server Auction Endpoint - -This document describes the behavior of the Prebid Server auction endpoint, including: - -- Request/response formats -- OpenRTB extensions -- Debugging and performance tips -- How user syncing works -- Departures from OpenRTB - -## `POST /openrtb2/auction` - -This endpoint runs an auction with the given OpenRTB 2.5 bid request. - -### Sample request - -The [Prebid sample ad](/dev-docs/examples/basic-example.html) can be loaded from the JSON found in the [prebid-test-ad.json](https://github.com/prebid/prebid-server/blob/master/endpoints/openrtb2/sample-requests/valid-whole/exemplary/prebid-test-ad.json) file on the Prebid Server Github page. Other examples can be found in the [exemplary directory](https://github.com/prebid/prebid-server/blob/master/endpoints/openrtb2/sample-requests/valid-whole/exemplary) in the same Github repo. - -### Sample Response - -This endpoint will respond with either: - -- An OpenRTB 2.5 BidResponse, or -- An HTTP 400 status code if the request is malformed - -A "hello world" response from the prebid sample ad request is shown below. - -``` -{ - "id": "some-request-id", - "seatbid": [ - { - "seat": "appnexus" - "bid": [ - { - "id": "4625436751433509010", - "impid": "some-impression-id", - "price": 0.5, - "adm": "", - "adid": "29681110", - "adomain": [ - "appnexus.com" - ], - "iurl": "http://nym1-ib.adnxs.com/cr?id=29681110", - "cid": "958", - "crid": "29681110", - "w": 300, - "h": 250, - "ext": { - "bidder": { - "appnexus": { - "brand_id": 1, - "auction_id": 6127490747252133000, - "bidder_id": 2 - } - } - } - } - ] - } - ] -} -``` - -### OpenRTB Extensions - -#### Conventions - -OpenRTB 2.5 permits exchanges to define their own extensions to any object from the spec. -These fall under the `ext` property of JSON objects. - -If `ext` is defined on an object, Prebid Server uses the following conventions: - -1. `ext` in "Request objects" uses `ext.prebid` and/or `ext.{anyBidderCode}`. -2. `ext` on "Response objects" uses `ext.prebid` and/or `ext.bidder`. -The only exception here is the top-level `BidResponse`, because it's bidder-independent. - -`ext.{anyBidderCode}` and `ext.bidder` extensions are defined by bidders. -`ext.prebid` extensions are defined by Prebid Server. - -Exceptions are made for DigiTrust and GDPR, so that we define `ext` according to the official recommendations. - -#### Bid Adjustments - -Bidders are encouraged to make [Net bids](../../developers/add-new-bidder.html). However, there's no way for Prebid to enforce this. -If you find that some bidders use Gross bids, publishers can adjust for it with `request.ext.prebid.bidadjustmentfactors`: - -``` -{ - "appnexus: 0.8, - "rubicon": 0.7 -} -``` - -This may also be useful for publishers who want to account for different discrepancies with different bidders. - -#### Targeting - -[Targeting]({{site.baseurl}}/overview/intro.html#how-does-prebid-work) refers to strings which are sent to the adserver to -make header bidding possible. - -`request.ext.prebid.targeting` is an optional property which causes Prebid Server -to set these params on the response at `response.seatbid[i].bid[j].ext.prebid.targeting`. - -**Request format** (optional param `request.ext.prebid.targeting`) - -``` -{ - "pricegranularity": { - "precision": 2, - "ranges": [ - { - "max":20.00, - "increment":0.10 // This is equivalent to the deprecated "pricegranularity": "medium" - } - ] - }, - "includewinners": false // Optional param defaulting to true - "includebidderkeys": false // Optional param defaulting to true -} -``` -The list of price granularity ranges must be given in order of increasing `max` values. If `precision` is omitted, it will default to `2`. The minimum of a range will be 0 or the previous `max`. Any cmp above the largest `max` will go in the `max` pricebucket. - -For backwards compatibility the following strings will also be allowed as price granularity definitions. There is no guarantee that these will be honored in the future. "One of ['low', 'med', 'high', 'auto', 'dense']" See [price granularity definitions]({{site.baseurl}}/prebid-mobile/adops-price-granularity.html) - -One of "includewinners" or "includebidderkeys" must be true (both default to true if unset). If both were false, then no targeting keys would be set, which is better configured by omitting targeting altogether. - -**Response format** (returned in `bid.ext.prebid.targeting`) - -``` -{ - "hb_bidder_{bidderName}": "The seatbid.seat which contains this bid", - "hb_size_{bidderName}": "A string like '300x250' using bid.w and bid.h for this bid", - "hb_pb_{bidderName}": "The bid.cpm, rounded down based on the price granularity." -} -``` - -The winning bid for each `request.imp[i]` will also contain `hb_bidder`, `hb_size`, and `hb_pb` -(with _no_ {bidderName} suffix). To prevent these keys, set `request.ext.prebid.targeting.includeWinners` to false. - -**NOTE**: Targeting keys are limited to 20 characters. If {bidderName} is too long, the returned key -will be truncated to only include the first 20 characters. - -#### Cookie syncs - -Each Bidder should receive their own ID in the `request.user.buyeruid` property. -Prebid Server has three ways to popualte this field. In order of priority: - -1. If the request payload contains `request.user.buyeruid`, then that value will be sent to all Bidders. -In most cases, this is probably a bad idea. - -2. The request payload can store a `buyeruid` for each Bidder by defining `request.user.ext.prebid.buyeruids` like so: - -``` -{ - "appnexus": "some-appnexus-id", - "rubicon": "some-rubicon-id" -} -``` - -Prebid Server's core logic will preprocess the request so that each Bidder sees their own value in the `request.user.buyeruid` field. - -3. Prebid Server will use its Cookie to map IDs for each Bidder. - -If you're using [Prebid.js](https://github.com/prebid/Prebid.js), this is happening automatically. - -If you're using another client, you can populate the Cookie of the Prebid Server host with User IDs -for each Bidder by using the `/cookie_sync` endpoint, and calling the URLs that it returns in the response. - -#### Native Request - -For each native request, the `assets` objects's `id` field must not be defined. Prebid Server will set this automatically, using the index of the asset in the array as the ID. - - -#### Bidder Aliases - -Requests can define Bidder aliases if they want to refer to a Bidder by a separate name. -This can be used to request bids from the same Bidder with different params. For example: - -``` -{ - "imp": [ - { - "id": "some-impression-id", - "video": { - "mimes": ["video/mp4"] - }, - "ext": { - "appnexus: { - "placementId": 123 - }, - "districtm": { - "placementId": 456 - } - } - } - ], - "ext": { - "prebid": { - "aliases": { - "districtm": "appnexus" - } - } - } -} -``` - -For all intents and purposes, the alias will be treated as another Bidder. This new Bidder will behave exactly -like the original, except that the Response will contain seprate SeatBids, and any Targeting keys -will be formed using the alias' name. - -If an alias overlaps with a core Bidder's name, then the alias will take precedence. -This prevents breaking API changes as new Bidders are added to the project. - -For example, if the Request defines an alias like this: - -``` -{ - "aliases": { - "appnexus": "rubicon" - } -} -``` - -then any `imp.ext.appnexus` params will actually go to the **rubicon** adapter. -It will become impossible to fetch bids from Appnexus within that Request. - -#### Bidder Response Times - -`response.ext.responsetimemillis.{bidderName}` tells how long each bidder took to respond. -These can help quantify the performance impact of "the slowest bidder." - -#### Bidder Errors - -`response.ext.errors.{bidderName}` contains messages which describe why a request may be "suboptimal". -For example, suppose a `banner` and a `video` impression are offered to a bidder -which only supports `banner`. - -In cases like these, the bidder can ignore the `video` impression and bid on the `banner` one. -However, the publisher can improve performance by only offering impressions which the bidder supports. - -For example, a request may return this in `response.ext` - -``` -{ - "errors": { - "appnexus": [ - { - "code": 2, - "message": "A hybrid Banner/Audio Imp was offered, but Appnexus doesn't support Audio." - } - ], - "rubicon": [ - { - "code": 1, - "message": "The request exceeded the timeout allocated" - } - ] - } -} -``` - -The codes currently defined are: - -``` -0 NoErrorCode -1 TimeoutCode -2 BadInputCode -3 BadServerResponseCode -999 UnknownErrorCode -``` - -#### Debugging - -`response.ext.debug.httpcalls.{bidder}` will be populated **only if** `request.test` **was set to 1**. - -This contains info about every request and response sent by the bidder to its server. -It is only returned on `test` bids for performance reasons, but may be useful during debugging. - -`response.ext.debug.resolvedrequest` will be populated **only if** `request.test` **was set to 1**. - -This contains the request after the resolution of stored requests and implicit information (e.g. site domain, device user agent). - -#### Stored Requests - -`request.imp[i].ext.prebid.storedrequest` incorporates a [Stored Request](../../developers/stored-requests.html) from the server. - -A typical `storedrequest` value looks like this: - -``` -{ - "id": "some-id" -} -``` - -For more information, see the docs for [Stored Requests](../../developers/stored-requests.html). - -#### Cache bids - -Bids can be temporarily cached on the server by sending the following data as `request.ext.prebid.cache`: - -``` -{ - "bids": {}, - "vastxml": {} -} -``` - -Both `bids` and `vastxml` are optional, but one of the two is required for cache to function. -This property will have no effect unless `request.ext.prebid.targeting` is also set in the request. - -If `bids` is present, Prebid Server will make a _best effort_ to include these extra -`bid.ext.prebid.targeting` keys: - -- `hb_cache_id`: On the highest overall Bid in each Imp. -- `hb_cache_id_{bidderName}`: On the highest Bid from {bidderName} in each Imp. - -Clients _should not assume_ that these keys will exist, just because they were requested, though. -If they exist, the value will be a UUID which can be used to fetch Bid JSON from [Prebid Cache](https://github.com/prebid/prebid-cache). -They may not exist if the host company's cache is full, having connection problems, or other issues like that. - -If `vastxml` is present, PBS will try to add analogous keys `hb_uuid` and `hb_uuid_{bidderName}`. -In addition to the caveats above, these will exist _only if the relevant Bids are for Video_. -If they exist, the values can be used to fetch the bid's VAST XML from Prebid Cache directly. - -These options are mainly intended for certain limited Prebid Mobile setups, where bids cannot be cached client-side. - -#### GDPR - -Prebid Server supports the IAB's GDPR recommendations, which can be found [here](https://iabtechlab.com/wp-content/uploads/2018/02/OpenRTB_Advisory_GDPR_2018-02.pdf). - -This adds two optional properties: - -- `request.user.ext.consent`: Is the consent string required by the IAB standards. -- `request.regs.ext.gdpr`: Is 0 if the caller believes that the user is *not* under GDPR, 1 if the user *is* under GDPR, and undefined if we're not certain. - -These fields will be forwarded to each Bidder, so they can decide how to process them. - -### OpenRTB Differences - -This section describes the ways in which Prebid Server **breaks** the OpenRTB spec. - -#### Allowed Bidders - -Prebid Server returns a 400 on requests which define `wseat` or `bseat`. -We may add support for these in the future, if there's compelling need. - -Instead, an impression is only offered to a bidder if `bidrequest.imp[i].ext.{bidderName}` exists. - -This supports publishers who want to sell different impressions to different bidders. - -#### Deprecated Properties - -This endpoint returns a 400 if the request contains deprecated properties (e.g. `imp.wmin`, `imp.hmax`). - -The error message in the response should describe how to "fix" the request to make it legal. -If the message is unclear, please [log an issue](https://github.com/prebid/prebid-server/issues) -or [submit a pull request](https://github.com/prebid/prebid-server/pulls) to improve it. - -#### Determining Bid Security (http/https) - -In the OpenRTB spec, `request.imp[i].secure` says: - -> Flag to indicate if the impression requires secure HTTPS URL creative assets and markup, -> where 0 = non-secure, 1 = secure. If omitted, the secure state is unknown, but non-secure -> HTTP support can be assumed. - -In Prebid Server, an `https` request which does not define `secure` will be forwarded to Bidders with a `1`. -Publishers who run `https` sites and want insecure ads can still set this to `0` explicitly. - -### See also - -- [The OpenRTB 2.5 spec](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) diff --git a/prebid-server/endpoints/openrtb2/amp.md b/prebid-server/endpoints/openrtb2/pbs-endpoint-amp.md similarity index 76% rename from prebid-server/endpoints/openrtb2/amp.md rename to prebid-server/endpoints/openrtb2/pbs-endpoint-amp.md index c20521725e..493c7b37aa 100644 --- a/prebid-server/endpoints/openrtb2/amp.md +++ b/prebid-server/endpoints/openrtb2/pbs-endpoint-amp.md @@ -1,28 +1,38 @@ --- layout: page_v2 sidebarType: 5 -title: Prebid Server | Endpoints | AMP +title: Prebid Server | Endpoints | OpenRTB2 | AMP --- -# Prebid Server AMP Endpoint +# Prebid Server | Endpoints | /openrtb2/amp This document describes the behavior of the Prebid Server AMP endpoint in detail. For a more general reference, see the [Prebid AMP Implementation Guide ]({{site.baseurl}}/dev-docs/show-prebid-ads-on-amp-pages.html). -## AMP Endpoint - - `GET /openrtb2/amp?tag_id={ID}` +## GET /openrtb2/amp **Parameters** {: .table .table-bordered .table-striped } | Param | Scope | Type | Description | | --- | --- | --- | --- | -| tag_id | Required | `String` | The `tag_id` ID must reference a [Stored BidRequest]({{site.baseurl}}/prebid-server/developers/stored-requests.html). For a thorough description of bid request JSON, see the [/openrtb2/auction](./auction.html) docs. | - -To be compatible with AMP, this endpoint behaves slightly different from normal `/openrtb2/auction` requests. +| tag_id | Required | `String` | The `tag_id` ID must reference a [Stored BidRequest]({{site.baseurl}}/prebid-server/features/pbs-storedreqs.html). For a thorough description of bid request JSON, see the [/openrtb2/auction](./auction.html) docs. | +| w | recommended | `String` | Comes from the amp-ad.width attribute. The stored request may contain width already, but this parameter reflects what's actually in the page. It replaces imp.banner.format[0].w | +| h | recommended | `String` | Comes from the amp-ad.height attribute. The stored request may contain height already, but this parameter reflects what's actually in the page. It replaces imp.banner.format[0].h | +| ms | optional | `String` | Comes from the amp-ad.data-multi-size attribute. e.g. "970x90, 728x90". Sizes are parsed and added to imp.banner.format | +| oh | optional | `String` | Comes from the amp-ad.data-override-height attribute. See below for details on size calculation. | +| ow | optional | `String` | Comes from the amp-ad.data-override-width attribute. See below for details on size calculation. | +| curl | optional | `String` | Added to OpenRTB request as site.page | +| slot | optional | `String` | Added to OpenRTB request as imp[0].tagid | +| timeout | optional | `String` | Added to OpenRTB request as tmax | +| targeting | optional | `String` | First Party Data | +| gdpr_consent | optional | `String` | Consent string passed from CMP. Note this is used for both GDPR and CCPA. | +| account | optional | `String` | Can be used to pass the Prebid-Server specific account ID. This is useful if `tag_id` parameters aren't unique across accounts. | +| debug | optional | `integer` | If 1, returns additional debug info. | + +To be compatible with AMP, this endpoint behaves different from normal `/openrtb2/auction` requests. 1. The Stored `request.imp` data must have exactly one element. 2. `request.imp[0].secure` will be always be set to `1`, because AMP requires all content to be `https`. @@ -113,7 +123,7 @@ If any errors were generated they will appear within `response.ext.errors.{bidd 999 UnknownErrorCode ``` -See the [/openrtb2/auction endpoint](/prebid-server/endpoints/openrtb2/auction.html) for a description of some common OpenRTB errors. The following is a list of AMP specific errors that could be returned: +See the [/openrtb2/auction endpoint](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html) for a description of some common OpenRTB errors. The following is a list of AMP specific errors that could be returned: {: .table .table-bordered .table-striped } | Task | Code | Message | Action | @@ -138,19 +148,9 @@ The following errors can occur when loading a stored OpenRTB request for an inco -### Query Parameters - -This endpoint supports the following query parameters: +### Query Parameter Details -1. `h` - `amp-ad` `height` -2. `w` - `amp-ad` `width` -3. `oh` - `amp-ad` `data-override-height` -4. `ow` - `amp-ad` `data-override-width` -5. `ms` - `amp-ad` `data-multi-size` -6. `curl` - the canonical URL of the page -7. `timeout` - the publisher-specified timeout for the RTC callout - A configuration option `amp_timeout_adjustment_ms` may be set to account for estimated latency so that Prebid Server can handle timeouts from adapters and respond to the AMP RTC request before it times out. -8. `debug` - When set to `1`, the respones will contain extra info for debugging. Ensure that the amp-ad component was imported in the header. @@ -158,24 +158,22 @@ Ensure that the amp-ad component was imported in the header. ``` -This script provides code libraries that will convert the `` properties to the endpoint query parameters. In the most basic usage pass `width` and `height` as well as `type` and a `rtc-config`. The `type` value is the ad network you will be using. The `rtc-config` is used to pass JSON configuration to the Prebid Server, which handles the communication with [AMP RTC](https://medium.com/ampfuel/better-than-header-bidding-amp-rtc-fc54e80f3999). Vendors is an object that defines any vendors that will be receiving the RTC callout. In this example, the required parameter `tag_id` will receive the `PLACEMENT_ID` value. +This script provides code libraries that will convert the `` properties to the endpoint query parameters. In the most basic usage pass `width` and `height` as well as `type` and a `rtc-config`. The `type` value is the ad network you will be using. The `rtc-config` is used to pass JSON configuration to the Prebid Server, which handles the communication with [AMP RTC](https://medium.com/ampfuel/better-than-header-bidding-amp-rtc-fc54e80f3999). Vendors is an object that defines any vendors that will be receiving the RTC callout. In this example, the required parameter `tag_id` will receive the `PLACEMENT_ID` (or `REQUEST_ID`) value. ```html rtc-config='{"vendors": {"prebidappnexus": {"PLACEMENT_ID": "ef8299d0-cc32-46cf-abcd-41cebe8b4b85"}}, "timeoutMillis": 500}' ``` -The endpoint is rewritten as: +Here's a simplified URL: ``` /openrtb2/amp?tag_id='ef8299d0-cc32-46cf-abcd-41cebe8b4b85'&w=300&h=250&timeout=500 ``` - -If any of the enpoint parameters are present, they will override parts of your Stored Request. +Some endpoint parameters will override parts of the Stored Request. 1. `ow`, `oh`, `w`, `h`, and/or `ms` will be used to set `request.imp[0].banner.format` if `request.imp[0].banner` is present. 2. `curl` will be used to set `request.site.page` @@ -196,3 +194,7 @@ Specifically: 5. If `w` and `h` exist, `request.imp[0].banner.format` will be a single element with `w: w` and `h: h` 6. If `w` _or_ `h` exist, it will be used to override _one_ of the dimensions inside each element of `request.imp[0].banner.format` 7. If none of these exist then the Stored Request values for `request.imp[0].banner.format` will be used without modification. + +## Further Reading +- [Prebid and AMP](/formats/amp.html) +- [Prebid Server AMP Use Case Overview](/prebid-server/use-cases/pbs-amp.html) diff --git a/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.md b/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.md new file mode 100644 index 0000000000..7100f4f584 --- /dev/null +++ b/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.md @@ -0,0 +1,867 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Endpoints | OpenRTB2 | Auction +--- + +# Prebid Server | Endpoints | /openrtb2/auction +{:.no_toc} + +## POST /openrtb2/auction +{:.no_toc} + +* TOC +{:toc } + +This endpoint runs an auction with the given OpenRTB 2.5 bid request. + +### Sample Request + +This is a sample OpenRTB 2.5 bid request: + +``` +{ + "id": "some-request-id", + "test": 1, + "site": { + "page": "prebid.org" + }, + "imp": [{ + "id": "some-impression-id", + "banner": { + "format": [{ + "w": 600, + "h": 500 + }, { + "w": 300, + "h": 600 + }] + }, + "ext": { + "appnexus": { + "placementId": 12883451 + } + } + }], + "tmax": 500 +} +``` + +Additional examples can be found in [endpoints/openrtb2/sample-requests/valid-whole](https://github.com/prebid/prebid-server/tree/master/endpoints/openrtb2/sample-requests/valid-whole). + +### Sample Response + +This endpoint will respond with either: + +- An OpenRTB 2.5 bid response, or +- HTTP 400 if the request is malformed, or +- HTTP 503 if the account or app specified in the request is blacklisted + +This is the corresponding response to the above sample OpenRTB 2.5 bid request, with the `ext.debug` field removed and the `seatbid.bid.adm` field simplified. + +``` +{ + "id": "some-request-id", + "seatbid": [{ + "seat": "appnexus", + "bid": [{ + "id": "145556724130495288", + "impid": "some-impression-id", + "price": 0.01, + "adm": "", + "adid": "107987536", + "adomain": [ + "appnexus.com" + ], + "iurl": "https://nym1-ib.adnxs.com/cr?id=107987536", + "cid": "3532", + "crid": "107987536", + "w": 600, + "h": 500, + "ext": { + "prebid": { + "type": "banner", + "video": { + "duration": 0, + "primary_category": "" + } + }, + "bidder": { + "appnexus": { + "brand_id": 1, + "auction_id": 7311907164510136364, + "bidder_id": 2, + "bid_ad_type": 0 + } + } + } + }] + }], + "cur": "USD", + "ext": { + "responsetimemillis": { + "appnexus": 10 + }, + "tmaxrequest": 500 + } +} +``` +### OpenRTB Fields + +Prebid Server recognizes several standard OpenRTB2.5 fields. + +#### Currency + +The `cur` field is read and the first element of the array is taken to be the +"Ad Server Currency" for purposes of [currency conversion](/prebid-server/features/pbs-currency.html). + +#### Expiration + +The OpenRTB2.5 `imp[].exp` field is an "Advisory as to the number of seconds that may elapse +between the auction and the actual impression." + +This field is used in slightly different ways by PBS-Go and PBS-Java: + +##### PBS-Go +{:.no_toc} + +How long an item is stored in Prebid Cache is determined by: + +1. bidResponse.seatbid[].bid[].exp + 60: as set by the bidder's adapter +2. request.imp[].exp + 60: as set by the incoming request + +A 60-second buffer is added to make sure cache retrievals work towards the end of the +cache period. + +##### PBS-Java +{:.no_toc} + +How long an item is stored in Prebid Cache is determined by this hunt path: + +1. bidResponse.seatbid[].bid[].exp: set by the bidder's adapter +2. request.imp[].exp: set by the incoming request +3. request.ext.prebid.cache.{bids,vastxml}.ttlseconds +4. account config: {banner,video}-cache-ttl +5. global config: cache.{banner,video}-ttl-seconds + +#### Test + +This flag triggers Prebid Server to dump additional debug info into the OpenRTB response. e.g. + +``` + "ext": { + "debug": { + "httpcalls": { + "bidderA": [ + ... + ] + }, + "resolvedrequest": { + ... + }, + "responsetimemillis": { + ... + } + ... +``` + +#### Privacy fields + +Prebid Server reads the OpenRTB privacy fields: + +- regs.coppa +- regs.ext.gdpr +- regs.ext.us_privacy +- user.ext.consent +- device.lmt + +#### Other OpenRTB Fields + +Prebid Server doesn't do any special processing on any other fields, but passes them +all to the bid and analytics adapters. + +### OpenRTB Extensions + +#### Conventions + +OpenRTB 2.5 permits exchanges to define their own extensions to any object from the spec. +These fall under the `ext` field of JSON objects. + +If `ext` is defined on an object, Prebid Server uses the following conventions: + +1. `ext` in "request objects" uses `ext.prebid` and/or `ext.{anyBidderCode}`. +2. `ext` on "response objects" uses `ext.prebid` and/or `ext.bidder`. +The only exception here is the top-level `BidResponse`, because it's bidder-independent. + +`ext.{anyBidderCode}` and `ext.bidder` extensions are defined by bidders. +`ext.prebid` extensions are defined by Prebid Server. + +Exceptions are made for extensions with "standard" recommendations: + +- `request.regs.ext.gdpr` and `request.user.ext.consent` -- To support GDPR +- `request.regs.ext.us_privacy` -- To support CCPA +- `request.site.ext.amp` -- To identify AMP as the request source +- `request.app.ext.source` and `request.app.ext.version` -- To support identifying the displaymanager/SDK in mobile apps. If given, we expect these to be strings. + +#### Bid Adjustments + +Bidders [are encouraged](/prebid-server/bidders/pbs-build-a-bid-adapter.html) to make Net bids. However, there's no way for Prebid to enforce this. +If you find that some bidders use Gross bids, publishers can adjust for it with `request.ext.prebid.bidadjustmentfactors`: + +``` +{ + "ext": { + "prebid": { + "bidadjustmentfactors": { + "appnexus": 0.8, + "rubicon": 0.7 + } + } + } +} +``` + +This may also be useful for publishers who want to account for different discrepancies with different bidders. + +#### Targeting + +Targeting refers to strings which are sent to the adserver to +[make header bidding possible](/overview/intro.html#how-does-prebid-work). + +`request.ext.prebid.targeting` is an optional property which causes Prebid Server +to set these params on the response at `response.seatbid[i].bid[j].ext.prebid.targeting`. + +**Request format** (optional param `request.ext.prebid.targeting`) + +``` +{ + "ext": { + "prebid": { + "targeting": { + "pricegranularity": { + "precision": 2, + "ranges": [{ + "max": 20.00, + "increment": 0.10 // This is equivalent to the deprecated "pricegranularity": "medium" + }] + }, + "includewinners": false, // Optional param defaulting to true + "includebidderkeys": false // Optional param defaulting to true + "includeformat": false // Optional param defaulting to false + } + } + } +} +``` +The list of price granularity ranges must be given in order of increasing `max` values. If `precision` is omitted, it will default to `2`. The minimum of a range will be 0 or the previous `max`. Any cmp above the largest `max` will go in the `max` pricebucket. + +For backwards compatibility the following strings will also be allowed as price granularity definitions. There is no guarantee that these will be honored in the future. "One of ['low', 'med', 'high', 'auto', 'dense']" See [price granularity definitions](/prebid-mobile/adops-price-granularity.html) + +One of "includewinners" or "includebidderkeys" must be true (both default to true if unset). If both were false, then no targeting keys would be set, which is better configured by omitting targeting altogether. + +The parameter "includeformat" indicates the type of the bid (banner, video, etc) for multiformat requests. It will add the key `hb_format` and/or `hb_format_{bidderName}` as per "includewinners" and "includebidderkeys" above. + +MediaType PriceGranularity (PBS-Java only) - when a single OpenRTB request contains multiple impressions with different mediatypes, or a single impression supports multiple formats, the different mediatypes may need different price granularities. If `mediatypepricegranularity` is present, `pricegranularity` would only be used for any mediatypes not specified. + +``` +{ + "ext": { + "prebid": { + "targeting": { + "mediatypepricegranularity": { + "banner": { + "ranges": [ + {"max": 20, "increment": 0.5} + ] + }, + "video": { + "ranges": [ + {"max": 10, "increment": 1}, + {"max": 20, "increment": 2}, + {"max": 50, "increment": 5} + ] + } + } + }, + "includewinners": true + } + } +} +``` + +**Response format** (returned in `bid.ext.prebid.targeting`) + +``` +{ + "seatbid": [{ + "bid": [{ + ... + "ext": { + "prebid": { + "targeting": { + "hb_bidder_{bidderName}": "The seatbid.seat which contains this bid", + "hb_size_{bidderName}": "A string like '300x250' using bid.w and bid.h for this bid", + "hb_pb_{bidderName}": "The bid.cpm, rounded down based on the price granularity." + } + } + } + }] + }] +} +``` + +The winning bid for each `request.imp[i]` will also contain `hb_bidder`, `hb_size`, and `hb_pb` +(with _no_ {bidderName} suffix). To prevent these keys, set `request.ext.prebid.targeting.includeWinners` to false. + +**NOTE**: Targeting keys are limited to 20 characters. If {bidderName} is too long, the returned key +will be truncated to only include the first 20 characters. + +#### Cookie syncs + +Each Bidder should receive their own ID in the `request.user.buyeruid` property. +Prebid Server has three ways to populate this field. In order of priority: + +1. If the request payload contains `request.user.buyeruid`, then that value will be sent to all Bidders. +In most cases, this is probably a bad idea. + +2. The request payload can store a `buyeruid` for each Bidder by defining `request.user.ext.prebid.buyeruids` like so: + +``` +{ + "user": { + "ext": { + "prebid": { + "buyeruids": { + "appnexus": "some-appnexus-id", + "rubicon": "some-rubicon-id" + } + } + } + } +} +``` + +Prebid Server's core logic will preprocess the request so that each Bidder sees their own value in the `request.user.buyeruid` field. + +3. Prebid Server will use its Cookie to map IDs for each Bidder. + +If you're using [Prebid.js](https://github.com/prebid/Prebid.js), this is happening automatically. + +If you're using another client, you can populate the Cookie of the Prebid Server host with User IDs +for each Bidder by using the `/cookie_sync` endpoint, and calling the URLs that it returns in the response. + +#### Native Request + +For each native request, the `assets` object's `id` field must not be defined. Prebid Server will set this automatically, using the index of the asset in the array as the ID. + + +#### Bidder Aliases + +Requests can define Bidder aliases if they want to refer to a Bidder by a separate name. +This can be used to request bids from the same Bidder with different params. For example: + +``` +{ + "imp": [{ + "id": "some-impression-id", + "video": { + "mimes": ["video/mp4"] + }, + "ext": { + "appnexus": { + "placementId": 123 + }, + "districtm": { + "placementId": 456 + } + } + }], + "ext": { + "prebid": { + "aliases": { + "districtm": "appnexus" + } + } + } +} +``` + +For all intents and purposes, the alias will be treated as another Bidder. This new Bidder will behave exactly +like the original, except that the Response will contain separate SeatBids, and any Targeting keys +will be formed using the alias' name. + +If an alias overlaps with a core Bidder's name, then the alias will take precedence. +This prevents breaking API changes as new Bidders are added to the project. + +For example, if the Request defines an alias like this: + +``` + "aliases": { + "appnexus": "rubicon" + } +``` + +then any `imp.ext.appnexus` params will actually go to the **rubicon** adapter. +It will become impossible to fetch bids from AppNexus within that Request. + +#### Bidder Response Times + +`response.ext.responsetimemillis.{bidderName}` tells how long each bidder took to respond. +These can help quantify the performance impact of "the slowest bidder." + +#### Bidder Errors + +`response.ext.errors.{bidderName}` contains messages which describe why a request may be "suboptimal". +For example, suppose a `banner` and a `video` impression are offered to a bidder +which only supports `banner`. + +In cases like these, the bidder can ignore the `video` impression and bid on the `banner` one. +However, the publisher can improve performance by only offering impressions which the bidder supports. + +For example, a request may return this in `response.ext` + +``` +{ + "ext": { + "errors": { + "appnexus": [{ + "code": 2, + "message": "A hybrid Banner/Audio Imp was offered, but Appnexus doesn't support Audio." + }], + "rubicon": [{ + "code": 1, + "message": "The request exceeded the timeout allocated" + }] + } + } +} +``` + +The codes currently defined are: + +``` +0 NoErrorCode +1 TimeoutCode +2 BadInputCode +3 BadServerResponseCode +999 UnknownErrorCode +``` + +#### Debugging + +`response.ext.debug.httpcalls.{bidder}` will be populated **only if** `request.test` **was set to 1**. + +This contains info about every request and response sent by the bidder to its server. +It is only returned on `test` bids for performance reasons, but may be useful during debugging. + +`response.ext.debug.resolvedrequest` will be populated **only if** `request.test` **was set to 1**. + +This contains the request after the resolution of stored requests and implicit information (e.g. site domain, device user agent). + +#### Stored Requests + +`request.imp[i].ext.prebid.storedrequest` incorporates a [Stored Request](/prebid-server/features/pbs-storedreqs.html) from the server. + +A typical `storedrequest` value looks like this: + +``` +{ + "imp": [{ + "ext": { + "prebid": { + "storedrequest": { + "id": "some-id" + } + } + } + }] +} +``` + +For more information, see the docs for [Stored Requests](/prebid-server/features/pbs-storedreqs.html). + +#### Cache bids + +Bids can be temporarily cached on the server by sending instructions in `request.ext.prebid.cache`: + +``` +{ + "ext": { + "prebid": { + "cache": { + "bids": {}, + "vastxml": {} + } + } + } +} +``` + +Both `bids` and `vastxml` are optional, but one of the two is required if you want to cache bids. This property will have no effect +unless `request.ext.prebid.targeting` is also set in the request. + +If `bids` is present, Prebid Server will make a _best effort_ to include these extra +`bid.ext.prebid.targeting` keys: + +- `hb_cache_id`: On the highest overall Bid in each Imp. +- `hb_cache_id_{bidderName}`: On the highest Bid from {bidderName} in each Imp. + +Clients _should not assume_ that these keys will exist, just because they were requested, though. +If they exist, the value will be a UUID which can be used to fetch Bid JSON from [Prebid Cache](https://github.com/prebid/prebid-cache). +They may not exist if the host company's cache is full, having connection problems, or other issues like that. + +If `vastxml` is present, PBS will try to add analogous keys `hb_uuid` and `hb_uuid_{bidderName}`. +In addition to the caveats above, these will exist _only if the relevant Bids are for Video_. +If they exist, the values can be used to fetch the bid's VAST XML from Prebid Cache directly. + +These options are mainly intended for certain limited Prebid Mobile setups, where bids cannot be cached client-side. + +#### GDPR + +Prebid Server supports the IAB's GDPR recommendations, which can be found [here](https://iabtechlab.com/wp-content/uploads/2018/02/OpenRTB_Advisory_GDPR_2018-02.pdf). + +This adds two optional properties: + +- `request.user.ext.consent`: Is the consent string required by the IAB standards. +- `request.regs.ext.gdpr`: Is 0 if the caller believes that the user is *not* under GDPR, 1 if the user *is* under GDPR, and undefined if we're not certain. + +These fields will be forwarded to each Bidder, so they can decide how to process them. + +#### Interstitial support +Additional support for interstitials is enabled through the addition of two fields to the request: +device.ext.prebid.interstitial.minwidthperc and device.ext.interstial.minheightperc +The values will be numbers that indicate the minimum allowed size for the ad, as a percentage of the base side. For example, a width of 600 and "minwidthperc": 60 would allow ads with widths from 360 to 600 pixels inclusive. + +Example: +``` +{ + "imp": [{ + ... + "banner": { + ... + } + "instl": 1, + ... + }] + "device": { + ... + "h": 640, + "w": 320, + "ext": { + "prebid": { + "interstitial": { + "minwidthperc": 60, + "minheightperc": 60 + } + } + } + } +} +``` + +PBS receiving a request for an interstitial imp and these parameters set, it will rewrite the format object within the interstitial imp. If the format array's first object is a size, PBS will take it as the max size for the interstitial. If that size is 1x1, it will look up the device's size and use that as the max size. If the format is not present, it will also use the device size as the max size. (1x1 support so that you don't have to omit the format object to use the device size) +PBS with interstitial support will come preconfigured with a list of common ad sizes. Preferentially organized by weighing the larger and more common sizes first. But no guarantees to the ordering will be made. PBS will generate a new format list for the interstitial imp by traversing this list and picking the first 10 sizes that fall within the imp's max size and minimum percentage size. There will be no attempt to favor aspect ratios closer to the original size's aspect ratio. The limit of 10 is enforced to ensure we don't overload bidders with an overlong list. All the interstitial parameters will still be passed to the bidders, so they may recognize them and use their own size matching algorithms if they prefer. + +#### Currency Support + +To set the desired 'ad server currency', use the standard OpenRTB `cur` attribute. Note that Prebid Server only looks at the first currency in the array. + +``` + "cur": ["USD"] +``` + +If you want or need to define currency conversion rates (e.g. for currencies that your Prebid Server doesn't support), +define ext.prebid.currency.rates. (Currently supported in PBS-Java only) + +``` +"ext": { + "prebid": { + "currency": { + "rates": { + "USD": { "UAH": 24.47, "ETB": 32.04 } + } + } + } +} +``` + +If it exists, a rate defined in ext.prebid.currency.rates has the highest priority. +If a currency rate doesn't exist in the request, the external file will be used. + +#### Supply Chain Support + + +Basic supply chains are passed to Prebid Server on `source.ext.schain` and passed through to bid adapters. Prebid Server does not currently offer the ability to add a node to the supply chain. + +Bidder-specific schains (PBS-Java only): + +``` +ext.prebid.schains: [ + { bidders: ["bidderA"], schain: { SCHAIN OBJECT 1}}, + { bidders: ["*"], schain: { SCHAIN OBJECT 2}} +] +``` +In this scenario, Prebid Server sends the first schain object to `bidderA` and the second schain object to everyone else. + +If there's already an source.ext.schain and a bidder is named in ext.prebid.schains (or covered by the wildcard condition), ext.prebid.schains takes precedent. + +#### Rewarded Video (PBS-Java only) + +Rewarded video is a way to incentivize users to watch ads by giving them 'points' for viewing an ad. A Prebid Server +client can declare a given adunit as eligible for rewards by declaring `imp.ext.prebid.is_rewarded_inventory:1`. + +#### Debug Flag (PBS-Java only) + +The OpenRTB `test` flag has a special meaning that bidders may react to: they may not perform a normal auction, or may not pay for test requests. + +You can turn on the extra Prebid Server debug log without the formal `test` behavior by instead setting `ext.prebid.debug:1`. + +#### Stored Responses (PBS-Java only) + +While testing SDK and video integrations, it's important, but often difficult, to get consistent responses back from bidders that cover a range of scenarios like different CPM values, deals, etc. Prebid Server supports a debugging workflow in two ways: + +- a stored-auction-response that covers multiple bidder responses +- multiple stored-bid-responses at the bidder adapter level + +**Single Stored Auction Response ID** + +When a storedauctionresponse ID is specified: + +- the rest of the ext.prebid block is irrelevant and ignored +- nothing is sent to any bidder adapter for that imp +- the response retrieved from the stored-response-id is assumed to be the entire contents of the seatbid object corresponding to that impression. + +This request: +``` +{ + "test":1, + "tmax":500, + "id": "test-auction-id", + "app": { ... }, + "ext": { + "prebid": { + "targeting": {}, + "cache": { "bids": {} } + } + }, + "imp": [ + { + "id": "a", + "ext": { "prebid": { "storedauctionresponse": { "id": "1111111111" } } } + }, + { + "id": "b", + "ext": { "prebid": { "storedauctionresponse": { "id": "22222222222" } } } + } + ] +} +``` + +Will result in this response, assuming that the ids exist in the appropriate DB table read by Prebid Server: +``` +{ + "id": "test-auction-id", + "seatbid": [ + { + // BidderA bids from storedauctionresponse=1111111111 + // BidderA bids from storedauctionresponse=22222222 + }, + { + // BidderB bids from storedauctionresponse=1111111111 + // BidderB bids from storedauctionresponse=22222222 + } + ] +} +``` + +**Multiple Stored Bid Response IDs** + +In contrast to what's outlined above, this approach lets some real auctions take place while some bidders have test responses that still exercise bidder code. For example, this request: + +``` +{ + "test":1, + "tmax":500, + "id": "test-auction-id", + "app": { ... }, + "ext": { + "prebid": { + "targeting": {}, + "cache": { "bids": {} } + } + }, + "imp": [ + { + "id": "a", + "ext": { + "prebid": { + "storedbidresponse": [ + { "bidder": "BidderA", "id": "333333" }, + { "bidder": "BidderB", "id": "444444" }, + ] + } + } + }, + { + "id": "b", + "ext": { + "prebid": { + "storedbidresponse": [ + { "bidder": "BidderA", "id": "5555555" }, + { "bidder": "BidderB", "id": "6666666" }, + ] + } + } + } + ] +} +``` +Could result in this response: + +``` +{ + "id": "test-auction-id", + "seatbid": [ + { + "bid": [ + // contents of storedbidresponse=3333333 as parsed by bidderA adapter + // contents of storedbidresponse=5555555 as parsed by bidderA adapter + ] + }, + { + // contents of storedbidresponse=4444444 as parsed by bidderB adapter + // contents of storedbidresponse=6666666 as parsed by bidderB adapter + } + ] +} +``` + +Setting up the storedresponse DB entries is the responsibility of each Prebid Server host company. + +See Prebid.org troubleshooting pages for how to utilize this feature within the context of the browser. + + +#### User IDs + +Prebid Server adapters can support the [Prebid.js User ID modules](http://prebid.org/dev-docs/modules/userId.html) by reading the following extensions and passing them through to their server endpoints: + +``` +{ + "user": { + "ext": { + "eids": [{ + "source": "adserver.org", + "uids": [{ + "id": "111111111111", + "ext": { + "rtiPartner": "TDID" + } + }] + }, + { + "source": "pubcommon", + "id":"11111111" + } + ], + "digitrust": { + "id": "11111111111", + "keyv": 4 + } + } + } +} +``` + +#### First Party Data Support (PBS-Java only) + +This is the Prebid Server version of the Prebid.js First Party Data feature. It's a standard way for the page (or app) to supply first party data and control which bidders have access to it. + +It specifies where in the OpenRTB request non-standard attributes should be passed. For example: + +``` +{ + "ext": { + "prebid": { + "data": { "bidders": [ "rubicon", "appnexus" ] } // these are the bidders allowed to see protected data + } + }, + "site": { + "keywords": "", + "search": "", + "ext": { + data: { GLOBAL CONTEXT DATA } // only seen by bidders named in ext.prebid.data.bidders[] + } + }, + "user": { + "keywords": "", + "gender": "", + "yob": 1999, + "geo": {}, + "ext": { + data: { GLOBAL USER DATA } // only seen by bidders named in ext.prebid.data.bidders[] + } + }, + "imp": [ + "ext": { + "context": { + "keywords": "", + "search": "", + "data": { ADUNIT SPECFIC CONTEXT DATA } // can be seen by all bidders + } + } + ] +``` + +Prebid Server enforces the data permissioning. So before passing the values to the bidder adapters, the PBS core will: + +1. check for ext.prebid.data.bidders +1. if it exists, store it locally, but remove it from the OpenRTB before being sent to the adapters +1. As the OpenRTB request is being sent to each adapter: + 1. if ext.prebid.data.bidders exists in the original request, and this bidder is on the list then copy site.ext.data, app.ext.data, and user.ext.data to their bidder request -- otherwise don't copy those blocks + 1. copy other objects as normal + +Each adapter must be coded to read the values from these locations and pass it to their endpoints appropriately. + +### OpenRTB Ambiguities + +This section describes the ways in which Prebid Server **implements** OpenRTB spec ambiguous parts. + +- `request.cur`: If `request.cur` is not specified in the bid request, Prebid Server will consider it as being `USD` whereas OpenRTB spec doesn't mention any default currency for bid request. +```request.cur: ['USD'] // Default value if not set``` + + +### OpenRTB Differences + +This section describes the ways in which Prebid Server **breaks** the OpenRTB spec. + +#### Allowed Bidders + +Prebid Server returns a 400 on requests which define `wseat` or `bseat`. +We may add support for these in the future, if there's compelling need. + +Instead, an impression is only offered to a bidder if `bidrequest.imp[i].ext.{bidderName}` exists. + +This supports publishers who want to sell different impressions to different bidders. + +#### Deprecated Properties + +This endpoint returns a 400 if the request contains deprecated properties (e.g. `imp.wmin`, `imp.hmax`). + +The error message in the response should describe how to "fix" the request to make it legal. +If the message is unclear, please [log an issue](https://github.com/prebid/prebid-server/issues) +or [submit a pull request](https://github.com/prebid/prebid-server/pulls) to improve it. + +#### Determining Bid Security (http/https) + +In the OpenRTB spec, `request.imp[i].secure` says: + +> Flag to indicate if the impression requires secure HTTPS URL creative assets and markup, +> where 0 = non-secure, 1 = secure. If omitted, the secure state is unknown, but non-secure +> HTTP support can be assumed. + +In Prebid Server, an `https` request which does not define `secure` will be forwarded to Bidders with a `1`. +Publishers who run `https` sites and want insecure ads can still set this to `0` explicitly. + +### Further Reading + +- [The OpenRTB 2.5 spec](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) diff --git a/prebid-server/endpoints/openrtb2/video.md b/prebid-server/endpoints/openrtb2/pbs-endpoint-video.md similarity index 97% rename from prebid-server/endpoints/openrtb2/video.md rename to prebid-server/endpoints/openrtb2/pbs-endpoint-video.md index 8ee8afd5f4..259056b01e 100644 --- a/prebid-server/endpoints/openrtb2/video.md +++ b/prebid-server/endpoints/openrtb2/pbs-endpoint-video.md @@ -1,21 +1,18 @@ --- layout: page_v2 sidebarType: 5 -title: Prebid Server | Endpoints | Video +title: Prebid Server | Endpoints | OpenRTB2 | Video --- -# Prebid Server Video Endpoint +# Prebid Server | Endpoints | /openrtb2/video {: .no_toc } This document describes the behavior of the Prebid Server `video` endpoint in detail. * TOC {:toc} -## Video Endpoint - `POST /openrtb2/video` - - +## POST /openrtb2/video ## Overview @@ -355,8 +352,8 @@ The SSAI should take the key-values from the response `adPods.[].targeting.[]${k ## Further Reading: -[Prebid Server overview](/prebid-server/prebid-server-overview.html) -[OpenRTB auction endpoint ](/prebid-server/endpoints/openrtb2/auction.html) -[Category Translation module](/dev-docs/modules/categoryTranslation.html) -[Freewheel module](/dev-docs/modules/freewheel.html) -[Ad Pod module](/dev-docs/modules/adpod.html) +- [Prebid Server overview](/prebid-server/overview/prebid-server-overview.html) +- [OpenRTB auction endpoint ](/prebid-server/endpoints/openrtb2/auction.html) +- [Category Translation module](/dev-docs/modules/categoryTranslation.html) +- [Freewheel module](/dev-docs/modules/freewheel.html) +- [Ad Pod module](/dev-docs/modules/adpod.html) diff --git a/prebid-server/endpoints/pbs-endpoint-admin.md b/prebid-server/endpoints/pbs-endpoint-admin.md new file mode 100644 index 0000000000..c17fb4afe4 --- /dev/null +++ b/prebid-server/endpoints/pbs-endpoint-admin.md @@ -0,0 +1,127 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Admin Endpoints + +--- + +# Prebid Server | Admin Endpoints +{: .no_toc} + +There are several endpoints on the special `admin` port that a host company may utilize that aren't available to external users. This port defaults to 8060, but can be set in the `admin.port` config. + +* TOC +{:toc} + +## GET /currency/rates + +This endpoint exposes active currency rate converter information in the server. +Information are: +- `info.active`: true if currency converter is active +- `info.source`: URL from which rates are fetched +- `info.fetchingIntervalNs`: Fetching interval from source in nanoseconds +- `info.lastUpdated`: Datetime when the rates where updated +- `info.rates`: Internal rates values + +### Sample responses +#### Rate converter active +```json +{ + "active": true, + "info": { + "source": "https://cdn.jsdelivr.net/gh/prebid/currency-file@1/latest.json", + "fetchingIntervalNs": 60000000000, + "lastUpdated": "2019-03-02T14:18:41.221063+01:00", + "rates": { + "GBP": { + "AUD": 1.8611576401, + "BGN": 2.2750325703, + "BRL": 5.0061650847, + "CAD": 1.7414619393, + "CHF": 1.3217708915, + "CNY": 8.8791178113, + "CZK": 29.8203982877, + "DKK": 8.6791596873, + "EUR": 1.163223525, + "GBP": 1, + "HKD": 10.3927042621, + "HRK": 8.645077238, + "HUF": 367.6484273218, + "IDR": 18689.5123766983, + "ILS": 4.8077191513, + "INR": 93.8663223525, + "ISK": 158.0820770519, + "JPY": 148.1365159129, + "KRW": 1491.3921459148, + "MXN": 25.5839382096, + "MYR": 5.394332775, + "NOK": 11.3144425833, + "NZD": 1.9374651033, + "PHP": 68.6139028476, + "PLN": 5.0130281035, + "RON": 5.5172855016, + "RUB": 87.2333891681, + "SEK": 12.2141959799, + "SGD": 1.7908989391, + "THB": 42.0074911595, + "TRY": 7.1224176438, + "USD": 1.3240973385, + "ZAR": 18.7774520752 + }, + "USD": { + "AUD": 1.4056048493, + "BGN": 1.7181762277, + "BRL": 3.7808134938, + "CAD": 1.3152068875, + "CHF": 0.9982429939, + "CNY": 6.705789335, + "CZK": 22.5213036985, + "DKK": 6.554774664, + "EUR": 0.8785030308, + "GBP": 0.7552314855, + "HKD": 7.8488974787, + "HRK": 6.5290345252, + "HUF": 277.6596679259, + "IDR": 14114.9081964333, + "ILS": 3.6309408767, + "INR": 70.8908020733, + "ISK": 119.3885618905, + "JPY": 111.8773609769, + "KRW": 1126.3463058948, + "MXN": 19.3217956602, + "MYR": 4.0739699552, + "NOK": 8.5450232803, + "NZD": 1.4632346482, + "PHP": 51.8193797769, + "PLN": 3.7859966617, + "RON": 4.1668277256, + "RUB": 65.8814020908, + "SEK": 9.2245453747, + "SGD": 1.3525432663, + "THB": 31.7253799526, + "TRY": 5.3790740578, + "USD": 1, + "ZAR": 14.1813230256 + } + } + } +} +``` + +#### Rate converter set with constant rates +```json +{ + "active": true, + "source": "", + "fetchingIntervalNs": 0, + "lastUpdated": "0001-01-01T00:00:00Z" +} +``` + +#### Rate converter not set +```json +{ + "active": false +} +``` + diff --git a/prebid-server/endpoints/cookieSync.md b/prebid-server/endpoints/pbs-endpoint-cookieSync.md similarity index 87% rename from prebid-server/endpoints/cookieSync.md rename to prebid-server/endpoints/pbs-endpoint-cookieSync.md index 282017862e..91f9642b3d 100644 --- a/prebid-server/endpoints/cookieSync.md +++ b/prebid-server/endpoints/pbs-endpoint-cookieSync.md @@ -1,14 +1,14 @@ --- layout: page_v2 sidebarType: 5 -title: Prebid Server | Endpoints | Starting Cookie Syncs +title: Prebid Server | Endpoints | /cookie_sync --- -# Starting Cookie Syncs +# Prebid Server | Endpoints | /cookie_sync -This endpoint is used during cookie syncs. For technical details, see the -[Cookie Sync developer docs](../developers/cookie-syncs.html). +This endpoint is used to initiate cookie syncs. For technical details, see the +[Cookie Sync developer docs](/prebid-server/developers/pbs-cookie-sync.html). ## POST /cookie_sync diff --git a/prebid-server/endpoints/pbs-endpoint-event.md b/prebid-server/endpoints/pbs-endpoint-event.md new file mode 100644 index 0000000000..320a4008fd --- /dev/null +++ b/prebid-server/endpoints/pbs-endpoint-event.md @@ -0,0 +1,87 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Endpoints | Events + +--- + +# Prebid Server | Endpoints | Events (Java-only) + +PBS-Java supports events as described in these GitHub issues: + +- [Prebid Server Event Notification proposal](https://github.com/prebid/prebid-server/issues/800) +- [Prebid Server Event Updates](https://github.com/prebid/prebid-server/issues/1202) +- [PBS video impression tracking](https://github.com/prebid/prebid-server/issues/1015) + +## GET /event + +This endpoint alerts Prebid Server to process the event. Most of the time this just means informing the analytics adapter. But it's also used in the Programmatic Guaranteed context to affect line item pacing. + +### Query Params + +{: .table .table-bordered .table-striped } +| Query Parameter | Required? | Description | +|-----------------+-----------+-------------| +| a| y | Account ID | +| t| y | Type of the event. Allowed values: `win` or `imp` | +| b| y | Bid ID, expected to be unique so this event can be joined to the auction analytics. | +| bidder| y | Bidder code | +| f| n | Format of the PBS response. Values: `b` is blank, just return HTTP 200 with an empty body. `i` is image, return HTTP 200 with a blank PNG body | +| ts| n | Auction timestamp | +| x| n | Disables or enables analytics. Allowed values: `1` to enable analytics or `0` to disable. `1` is default. | + +### Sample request + +``` +GET http://prebid.site.com/event?t=win&b=1234567890&bidder=rubicon&f=i +``` + +## `POST /vtrack` + +This endpoint covers there scenario where VAST XML is returned in the response from a client-side adapter. Prebid.js forwards the XML to PBS on a new endpoint that instructs PBS to update the XML and cache it + +If the bidder allows PBS to modify their VAST, the server then injects an tag into the VAST, referring to a prebid server event string, then caches the modified results. It forwards the response from Prebid Cache. + +The contents of the tag are pulled from a new event.url-template property that has macros that need to be resolved. e.g. + +``` +event: + url-template: "/event?t=imp&b=%s&f=b&a=%s" +``` +where b=BIDID, a=ACCOUNT + +The algorithm for inserting the tag is simple -- search for an existing tag and add another underneath it. If there isn't an existing tag, no modifications are made. + + +### Query Params + +{: .table .table-bordered .table-striped } +| Query Parameter | Required? | Description | +|-----------------+-----------+-------------| +| a | yes | Account id | + +### POST Body Params + +{: .table .table-bordered .table-striped } +| Query Parameter | Required? | Description | +|-----------------+-----------+-------------| +| bidid | y | Will enable offline analytics join this impression event to the original auction event | +| bidder | y | Prebid bidder code | +| timestamp | n | Auction timestamp as generated by Prebid.js. Useful in offline joins | +| type | y | Always "xml" | +| value | y | VAST XML | +| ttlseconds | n | How long this VAST should be cached | + +### Sample request + +`POST https://prebid-server.rubiconproject.com/vtrack?a=ACCOUNT` + +```json +{"puts":[{ + "bidid": "BIDID", + "bidder": "BIDDER", + "type":"xml", + "value":"", + "ttlseconds":3600 +}]} +``` diff --git a/prebid-server/endpoints/getuids.md b/prebid-server/endpoints/pbs-endpoint-getuids.md similarity index 83% rename from prebid-server/endpoints/getuids.md rename to prebid-server/endpoints/pbs-endpoint-getuids.md index 077e21fb84..0043f6ceff 100644 --- a/prebid-server/endpoints/getuids.md +++ b/prebid-server/endpoints/pbs-endpoint-getuids.md @@ -1,14 +1,15 @@ --- layout: page_v2 sidebarType: 5 -title: Prebid Server | Endpoints | Get/getuids +title: Prebid Server | Endpoints | /getuids --- -# Getting the existing user syncs -This endpoint is used to get the existing user syncs of an user. +# Prebid Server | Endpoints | /getuids -## `GET /getuids` +This endpoint is used to get the existing user IDs stored in the browser. + +## GET /getuids This endpoint parses the PBS cookie and returns the existing UserIDs for each bidder. This information can be used by publishers in server to server requests where the originating server doesn't have access to the PBS cookie. diff --git a/prebid-server/endpoints/pbs-endpoint-overview.md b/prebid-server/endpoints/pbs-endpoint-overview.md new file mode 100644 index 0000000000..502dcfe7b1 --- /dev/null +++ b/prebid-server/endpoints/pbs-endpoint-overview.md @@ -0,0 +1,37 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Endpoints | Overview + +--- + +# Prebid Server Endpoints Overview + +## Prebid Server + +The API endpoints recognized by Prebid Server: + +{: .table .table-bordered .table-striped } +| Endpoint | Purpose | +|----------+---------| +| [POST /openrtb2/auction](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html) | The main header bidding auction endpoint | +| [GET /openrtb2/amp](/prebid-server/endpoints/openrtb2/pbs-endpoint-amp.html) | The [AMP](/prebid-server/use-cases/pbs-amp.html) endpoint | +| [POST /openrtb2/video](/prebid-server/endpoints/openrtb2/pbs-endpoint-video.html) | Supports long-form video requests | +| [POST /cookie_sync](/prebid-server/endpoints/pbs-endpoint-cookieSync.html) | Responds with an array of pixels the client can use to initiate cookie-matching requests. | +| [GET /setuid](/prebid-server/endpoints/pbs-endpoint-setuid.html) | The other side of /cookie_sync, this is what actually updates the `uids` cookie. | +| [GET /getuids](/prebid-server/endpoints/pbs-endpoint-getuids.html) | Parses the `uids` cookie and returns JSON. | +| [GET /status](/prebid-server/endpoints/pbs-endpoint-status.html) | A health check. | +| [GET /info](/prebid-server/endpoints/info/pbs-endpoint-info.html) | Returns various information about how the server is configured. | +| [GET /event](/prebid-server/endpoints/pbs-endpoint-event.html) | (PBS-Java only) Alerts Prebid Server to process an event. | +| [POST /vtrack](/prebid-server/endpoints/pbs-endpoint-event.html) | (PBS-Java only) Cache VAST XML after inserting tracking string. | +| [/currency/rates](/prebid-server/endpoints/pbs-endpoint-admin.html) | (Admin port only) Retrieves the server's current currency conversion rates. | + +## Prebid Cache + +The API endpoints recognized by the [Prebid Cache](/prebid-server/features/pbs-caching.html) Server: + +{: .table .table-bordered .table-striped } +| Endpoint | Purpose | +|----------+---------| +| [POST /cache](/prebid-server/endpoints/pbs-endpoints-pbc.html) | Store a creative or bid in Prebid Cache | +| [GET /cache](/prebid-server/endpoints/pbs-endpoints-pbc.html#get-cache) | Retrieve a creative or bid from Prebid Cache | diff --git a/prebid-server/endpoints/setuid.md b/prebid-server/endpoints/pbs-endpoint-setuid.md similarity index 82% rename from prebid-server/endpoints/setuid.md rename to prebid-server/endpoints/pbs-endpoint-setuid.md index 95c24af065..eaf27a1bb8 100644 --- a/prebid-server/endpoints/setuid.md +++ b/prebid-server/endpoints/pbs-endpoint-setuid.md @@ -1,16 +1,16 @@ --- layout: page_v2 sidebarType: 5 -title: Prebid Server | Endpoints | Saving User Syncs +title: Prebid Server | Endpoints | /setuid --- -# Saving User Syncs +# Prebid Server | Endpoints | /setuid -This endpoint is used during cookie syncs. For technical details, see the -[Cookie Sync developer docs](../developers/cookie-syncs.html). +This endpoint is used during cookie syncs to save the results in the Prebid Server `uids` cookie. For technical details, see the +[Cookie Sync developer docs](/prebid-server/developers/pbs-cookie-sync.html). -## `GET /setuid` +## GET /setuid This endpoint saves a UserID for a Bidder in the Cookie. Saved IDs will be recognized for 7 days before being considered "stale" and being re-synced. diff --git a/prebid-server/endpoints/pbs-endpoint-status.md b/prebid-server/endpoints/pbs-endpoint-status.md new file mode 100644 index 0000000000..0d8fd5ce67 --- /dev/null +++ b/prebid-server/endpoints/pbs-endpoint-status.md @@ -0,0 +1,18 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Endpoints | /status + +--- + +# Prebid Server | Endpoints | /status + +## GET /status + +This endpoint will return a 2xx response whenever Prebid Server is ready to serve requests. +Its exact response can be configured with the `status_response` +config option. For eample, in `pbs.yaml`: + +```yaml +status_response: "ok" +``` diff --git a/prebid-server/endpoints/pbs-endpoints-pbc.md b/prebid-server/endpoints/pbs-endpoints-pbc.md new file mode 100644 index 0000000000..b472d66348 --- /dev/null +++ b/prebid-server/endpoints/pbs-endpoints-pbc.md @@ -0,0 +1,124 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Cache Endpoints + +--- + +# Prebid Cache Endpoints +{: .no_toc} + +The Prebid Cache server has a fairly simple API structure: one endpoint to write +to cache, and one endpoint to read from cache. + +* TOC +{:toc} + +## POST /cache + +Adds one or more values to the cache. Values can be given as either JSON or XML. A sample request is below. + +```json +{ + "puts": [ + { + "type": "xml", + "ttlseconds": 60, + "value": "Your XML content goes here." + }, + { + "type": "json", + "ttlseconds": 300, + "value": [1, true, "JSON value of any type can go here."] + } + ] +} +``` + +If any of the `puts` are invalid, then it responds with a **400** none of the values will be retrievable. +Assuming that all of the values are well-formed, then the server will respond with IDs which can be used to +fetch the values later. + +**Note**: `ttlseconds` is optional, and will only be honored on a _best effort_ basis. +Callers should never _assume_ that the data will stay in the cache for that long. + +```json +{ + "responses": [ + {"uuid": "279971e4-70f0-4b18-bd65-5c6e7aa75d40"}, + {"uuid": "147c9934-894b-4c1f-9a32-e7bb9cd15376"} + ] +} +``` + +In order to support cross-datacenter caching, an optional parameter `key` has been added that a particular install of prebid cache may or may not support (as a config option). +If the server does not support specifying `key`s, then any supplied keys will be ignored and requests will be processed as +above. If the server supports key, then the put can optionally use it as: + +```json +{ + "puts": [ + { + "type": "xml", + "ttlseconds": 60, + "value": "Your XML content goes here.", + "key": "ArbitraryKeyValueHere" + }, + { + "type": "json", + "ttlseconds": 300, + "value": [1, true, "JSON value of any type can go here."] + } + ] +} + +This will result in the response + +```json +{ + "responses": [ + {"uuid": "ArbitraryKeyValueHere"}, + {"uuid": "147c9934-894b-4c1f-9a32-e7bb9cd15376"} + ] +} +``` + +If an entry already exists for "ArbitraryKeyValueHere", it will not be overwitten, +and "" will be returned for the `uuid` value of that entry. This is to prevent bad actors from trying to overwrite legitimate caches with +malicious content, or a poorly coded app overwriting its own cache with new values, generating uncertainty what is actually stored under a +particular key. Note that this is the only case where only a subset of caches will be stored, as this is the only case where a put will fail +due to no fault of the requester yet the other puts are not called into question. (A failure can happen if the backend datastore errors on the +storage of one entry, but this then calls into question how successfully the other caches were saved.) + +## GET /cache + +Retrieves a single value from the cache. If the `id` isn't recognized, then it will return a 404. + +Assuming the above POST calls have been made, here are some sample GET responses. + +--- + +**GET** */cache?uuid=279971e4-70f0-4b18-bd65-5c6e7aa75d40* + +``` +HTTP/1.1 200 OK +Content-Type: application/xml + +Your XML content goes here. +``` + +--- + +**GET** */cache?uuid=147c9934-894b-4c1f-9a32-e7bb9cd15376* + +``` +HTTP/1.1 200 OK +Content-Type: application/json + +[1, true, "JSON value of any type can go here."] +``` + +### Limitations + +- This application does *not* validate XML. If users `POST` malformed XML, they'll `GET` a bad response too. +- The host company can set a max length on payload size limits in the application config. This limit will vary from host company to host company. diff --git a/prebid-server/endpoints/status.md b/prebid-server/endpoints/status.md deleted file mode 100644 index 2e31921290..0000000000 --- a/prebid-server/endpoints/status.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -layout: page_v2 -sidebarType: 5 -title: Prebid Server | Endpoints | Status - ---- - -# Get Status Endpoint - - `GET /status` - -This endpoint will return a 2xx response whenever Prebid Server is ready to serve requests. -Its exact response can be [configured](https://github.com/prebid/prebid-server/blob/master/docs/developers/configuration.md) with the `status_response` -config option. For eample, in `pbs.yaml`: - -```yaml -status_response: "ok" -``` diff --git a/prebid-server/endpoints/version.md b/prebid-server/endpoints/version.md deleted file mode 100644 index 2d7e127590..0000000000 --- a/prebid-server/endpoints/version.md +++ /dev/null @@ -1,29 +0,0 @@ -## `GET /version` - -This endpoint exposes the application version as defined at compilation time. -Version can be set either: -- manually using go build -ldflags "-X main.Rev=`git rev-parse --short HEAD`" -- automatically via .travis.yml configuration -See https://github.com/prebid/prebid-server/blob/master/pbs_light.go: - -```go -// Holds binary revision string -// Set manually at build time using: -// go build -ldflags "-X main.Rev=`git rev-parse --short HEAD`" -// Populated automatically at build / release time via .travis.yml -// `gox -os="linux" -arch="386" -output="{{.Dir}}_{{.OS}}_{{.Arch}}" -ldflags "-X main.Rev=`git rev-parse --short HEAD`" -verbose ./...;` -// See issue #559 -var Rev string -``` - -### Sample responses - -#### Version set -```json -{"revision": "d6cd1e2bd19e03a81132a23b2025920577f84e37"}, -``` - -#### Version not set -```json -{"revision": "not-set"}` -``` diff --git a/prebid-server/features/pbs-caching.md b/prebid-server/features/pbs-caching.md new file mode 100644 index 0000000000..f52c897eb3 --- /dev/null +++ b/prebid-server/features/pbs-caching.md @@ -0,0 +1,90 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Features | Caching | Overview + +--- + +# Prebid Server | Features | Caching + +There are several important scenarios where Prebid stores some or all of the bid in the 'cloud' for a time, either because it has to or because it's advantageous: + +1. Most video players require that they be given a URL that points to VAST XML for advertisements stored on the network. +1. [AMP](/prebid-server/use-cases/pbs-amp.html) requires that only ad server targeting be returned, not the whole creative body. When chosen, the creative is obtained from network. +1. [Mobile applications](/prebid-server/use-cases/pbs-sdk.html) could accept the full creative body, but it's better performance for users if ad creatives stay in the network unless they're going to be displayed. + +There are two flows in this diagram: the numbered circles follow the auction request and the lettered circles follow the retrieval of the creative: + +![Prebid Caching Architecture](/assets/images/prebid-server/pbs-cache-feature.png) + +Populating Items in the Cache + +1. The device makes the auction request. +2. Prebid Server processes the request. +3. The bidders respond. +4. Prebid Server stores the bid or the VAST XML in Prebid Cache. Note that in some cases, the answer may go back to the browser and be populated in the cache by a separate browser request. +5. The Prebid Cache server stores the object in the No-SQL backend. + +Retrieving Items from the Cache + +A. The device makes the retrieval request. +B. The request goes directly to Prebid Cache. +C. Which retrieves the bid or VAST from the backend. + +## Technical Setup + +Each Prebid Server host company may set up Prebid Cache in a somewhat +different way, but in general, the `/cache` endpoint gets routed directly +to the Prebid Cache server. + +Also, each host company can choose to integrate different backend storage +systems like Redis, Aerospike, etc. + +## Examples + +You can watch the caching take place with your browser developer tools. + +### Video + +From one of the [video instream examples](/examples/video/instream/jwplayer/pb-ve-jwplayer-platform.html): + +The VAST XML is stored into Prebid Cache from Prebid.js with this call: +``` +POST https://prebid.adnxs.com/pbc/v1/cache + +``` +And the response from the /cache call is: +``` +{"responses":[{"uuid":"9b05c38c-709c-4fb5-8592-8fcacb1289f7"}]} +``` + +And when the video player is ready to display the video ad, this +call is seen go out: +``` +GET https://prebid.adnxs.com/pbc/v1/cache?uuid=9b05c38c-709c-4fb5-8592-8fcacb1289f7 +``` +And the response is the VAST XML. + +### AMP + +Here's an example AMP response from Prebid Server: +``` +{ + "targeting": { + "hb_cache_id": "14b468d0-3c58-4a5d-ae5d-ab9a47b6152c", + "hb_pb": "0.40", + "hb_pb_rubicon": "0.40", + "hb_cache_path": "/cache", + "hb_size": "300x50", + "hb_bidder": "rubicon", + "hb_cache_host": "prebid-server.example.com", + "hb_bidid": "add62e49-9d5c-4e22-a450-fd4e922941aa" + } +} +``` + +Then when the ad is chosen by the ad server, this fetch goes out from the browser: +``` +https://prebid-server.example.com/cache?uuid=14b468d0-3c58-4a5d-ae5d-ab9a47b6152c +``` + diff --git a/prebid-server/features/pbs-currency.md b/prebid-server/features/pbs-currency.md new file mode 100644 index 0000000000..8b6201fb5f --- /dev/null +++ b/prebid-server/features/pbs-currency.md @@ -0,0 +1,106 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Feature | Currency Conversion + +--- + +# Prebid Server | Feature | Currency Conversion + +Prebid server supports currency conversions when receiving bids. + +- The "desired request currency" is what the request would like all bids to be in +- The "bid response currency" is what the bidder responded with + +Some bidders are able to bid in multiple currencies, but cannot, so Prebid Server can normalize the bids for the +client. + +## Desired Request Currency + +There are several ways to define the request currency: + +- The OpenRTB request can define the `cur` parameter. This is an array in OpenRTB, but Prebid Server only looks at the first element of the array. +- An AMP Stored Request can define the `cur` parameter. +- An App 'top-level' Stored Request can define the `cur` parameter. +- PBS-Java can configure the default installation currency (auction.ad-server-currency) +- Otherwise, both PBS-Go and PBS-Java default to USD + +## Loading Currency Conversion Rates + +By default, the currency converter uses https://cdn.jsdelivr.net/gh/prebid/currency-file@1/latest.json for currency conversion. This data is updated every 24 hours on prebid.org side. +By default, currency conversions are updated from the endpoint every 30 minutes in prebid server. + +Default configuration in PBS-Go: +``` +v.SetDefault("currency_converter.fetch_url", "https://cdn.jsdelivr.net/gh/prebid/currency-file@1/latest.json") +v.SetDefault("currency_converter.fetch_interval_seconds", 1800) // 30 minutes +``` + +Default configuration in PBS-Java: +``` +currency-converter: + external-rates: + enabled: true + url: https://cdn.jsdelivr.net/gh/prebid/currency-file@1/latest.json + default-timeout-ms: 4000 + refresh-period-ms: 900000 // 15 minutes +``` + +Notes: + +- The currency conversion mechanism can be disabled in PBS-Go by setting fetch_interval_seconds to 0. +- Prebid updates the `latest.json` file daily from the European Central Bank. If there's a currency needed for your +installation, you can host your own currency conversion file at a URL using the following JSON schema: + ``` + { + "dataAsOf":"2018-09-12", + "conversions":{ + "USD":{ + "GBP":0.77208 + }, + "GBP":{ + "USD":1.2952 + } + } + } + ``` + +## Examples + +Here are a couple examples showing the logic behind the currency converter: + +| Bidder bid price | Request Currency | Rate to USD | Rate converter is active | Converted bid price (USD) | Valid bid | +| :--------------- | :------------ |:--------------| :------------------------| :-------------------------|:----------| +| 1 | USD | 1 | YES | 1 | YES | +| 1 | N/A | 1 | YES | 1 | YES | +| 1 | USD | 1 | NO | 1 | YES | +| 1 | EUR | 1.13 | YES | 1.13 | YES | +| 1 | EUR | N/A | YES | N/A | NO | +| 1 | EUR | 1.13 | NO | N/A | NO | + +## Request-Defined Conversion Rates + +Using PBS-Java, rates can be passed in on the request: + +``` +"ext": { + "prebid": { + "currency": { + "rates": { + "USD": { "UAH": 24.47, "ETB": 32.04, "EUR": 0.92, ... } + }, + "usepbsrates": false // defaults to true + } + } +} +``` + +Note that the `usepbsrates` flag allows you to define which rates to use when PBS has two rates to consider: the one it loaded from the external source and the one on the request: +- If usepbsrates==true, then prefer the external source's rates +- If usepbsrates==false, then prefer the rate from the request + + +## Debug + +A dedicated endpoint on the Admin port will allow you to see what's happening within the currency converter. +See [currency rates endpoint](/prebid-server/endpoints/pbs-endpoint-admin.html) for more details. diff --git a/prebid-server/features/pbs-deals.md b/prebid-server/features/pbs-deals.md new file mode 100644 index 0000000000..2c9fe1005f --- /dev/null +++ b/prebid-server/features/pbs-deals.md @@ -0,0 +1,19 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Features | Deals +--- + +# Prebid Server | Features | Deals + +Prebid Server supports Private MarketPlace deals in this way: + +1. Prebid Server Bid Adapters can respond with a deal in `seatbid.bid.dealid`. All bids are returned to the client and the deal can pulled from `seatbid.bid.dealid`. +2. Prebid-style ad server targeting is also applied: + 1. If the deal is the highest bid overall and the [`ext.prebid.targeting.includewinners`](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#targeting) option is on, then the `hb_deal` targeting value will contain the winning deal ID. + 2. If the deal is the highest bid for a particular bidder and the [`ext.prebid.targeting.includebidderkeys`](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#targeting) is on, then the `hb_deal_BIDDER` targeting value will contain that deal ID + +Ad server line items should be targeted to `hb_deal_BIDDER` (for sendAllBids) +or `hb_deal` (for sendTopBid). + +Currently Prebid Server doesn't support the option of preferring deals over open market bids, though a [PreferDeals](https://github.com/prebid/prebid-server/issues/1355) flag is being considered. diff --git a/prebid-server/developers/default-request.md b/prebid-server/features/pbs-default-request.md similarity index 97% rename from prebid-server/developers/default-request.md rename to prebid-server/features/pbs-default-request.md index 72be6ea88c..0c5c57c183 100644 --- a/prebid-server/developers/default-request.md +++ b/prebid-server/features/pbs-default-request.md @@ -5,7 +5,7 @@ title: Prebid Server | Developers | Default Request --- -# Server Based Global Default Request +# Server Based Global Default Request (PBS-Go only) This allows a defaut stored request to be defined that allows the server to set up some defaults for all incoming requests. A request specified stored request will override these defaults, and of course any options specified directly in the stored request override both. The default stored request is only read on server startup, it is meant as an installation static default rather than a dynamic tuning option. diff --git a/prebid-server/features/pbs-feature-idx.md b/prebid-server/features/pbs-feature-idx.md new file mode 100644 index 0000000000..dd1e7b93d7 --- /dev/null +++ b/prebid-server/features/pbs-feature-idx.md @@ -0,0 +1,63 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Features + +--- + +# Prebid Server | Features + +{: .table .table-bordered .table-striped } +| Feature Set | Feature | Description | PBS-Go | PBS-Java | +|-------------+---------+-------------+--------+----------| +| [Currency](/prebid-server/features/pbs-currency.html) | Core | Loads currency conversions from an outside source, allows non-supported currencies to come in on the OpenRTB2 request, converts bid currencies to the request's prefered currency. | | | +| [Currency](/prebid-server/features/pbs-currency.html) | Request-Defined Rates | Allows the request to define its own currency rates. | | | +| [Deals](/prebid-server/features/pbs-deals.html) | Core | Basic deal support, creating hb_deal targeting when appropriate. | | | +| [AMP](/prebid-server/use-cases/pbs-amp.html) | Core | Reads and responds to the /openrtb2/amp endpoint | | | +| Targeting | Core | Request can specify `includewinners` and `includebidderkeys`. These cause PBS to emit seatbid[].bid[].ext.prebid.targeting values. | | | +| Targeting | Format | Request can specify `includeformat`, which causes PBS to emit hb_format along with other targeting values like hb_pb, etc. | | | +| [Price Granularity](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#targeting) | Core | Request can define quantization rules. Bids are quantized before being added to ad server targeting. | | | +| Price Granularity | Mediatype pricegranularity | Request can define different quantization rules for different mediatypes. Bids are quantized before being added to ad server targeting. | | | +| [GDPR](/prebid-server/features/privacy/pbs-privacy.html) | TCF 1.1 core | Able to: read the TCF1.1 global vendor list, parse incoming TCF1.1 consent strings, and [take appropriate enforcement action](https://docs.google.com/document/d/1g0zAYc_EfqyilKD8N2qQ47uz0hdahY-t8vfb-vxZL5w/edit). | | | +| GDPR | TCF 1.1 Account Config | Able to turn on and off TCF1 enforcement per account. | | | +| GDPR | TCF 1.1 Geo-lookup | Can use a geographic lookup service to help determine whether the incoming request is in-scope for GDPR. | | | +| GDPR | TCF 1.1 GVL Fallback | Allow the host company to optionally add a default TCF1 GVL file. | | | +| GDPR | TCF 2 core | Able to: read the TCF2 global vendor list, parse incoming TCF2 consent strings, and [take appropriate enforcement action](https://docs.google.com/document/d/1fBRaodKifv1pYsWY3ia-9K96VHUjd8kKvxZlOsozm8E/edit). | | | +| GDPR | TCF 2 Account Config | Able to turn on and off TCF2 enforcement per account. | | | +| GDPR | TCF 2 Geo-lookup | Can use a geographic lookup service to help determine whether the incoming request is in-scope for GDPR. | | | +| GDPR | TCF 2 Integration type exception | Can be configured to turn off GDPR checks for a specific account and a specific integration type. e.g. Account 123 has a different legal basis for AMP. | | | +| [US Privacy](/prebid-server/features/privacy/pbs-privacy.html) | USP core | Able to: read the US Privacy consent string (CCPA) and [take appropriate enforcement action](https://github.com/prebid/prebid-server/issues/1129). | | | +| US Privacy | USP AMP support | Able to: read the US Privacy consent string from AMP requests and [take appropriate enforcement action](https://github.com/prebid/prebid-server/issues/1176). | | | +| COPPA | Core | Able to read the COPPA flag and [take appropriate enforcement action](https://github.com/prebid/prebid-server/issues/929). | | | +| [Cache](/prebid-server/features/pbs-caching.html) | Bids core | Accepts the ext.prebid.cache.bids parameter, storing bid objects in PBC. | | | +| Cache | VAST core | Accepts the ext.prebid.cache.vastxml parameter, storing VAST responses in PBC. | | | +| Cache | Winning-only flag | Accepts a 'ext.prebid.cache.winningonly' parameter on the request. If true, instead of caching all bids and VAST, only the winning bid or VAST is stored. | | | +| [Stored Requests](/prebid-server/features/pbs-storedreqs.html) | Core | Accepts a stored request ID in the OpenRTB, looks it up against a local data store, and merges with the OpenRTB request record. | | | +| Stored Responses | Stored Responses | Accepts a stored response ID in the OpenRTB, looks it up against a local data store, and merges with the OpenRTB response record. | | | +| First Party Data | Core | Accepts core first party data attributes and supports ext.prebid.data.bidders. | | | +| First Party Data | Bidder-specific data | Accepts bidder-specific first party data attributes. | | | +| First Party Data | AMP first party data | Accepts first party data attributes on an AMP request. | | | +| [Supply Chain](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#supply-chain-support) | Bidder-specific schains | Accepts bidder-specific schain | | | +| Publisher Accounts | Core | Ability to enforce that requests coming in have a valid account ID. | | | +| Publisher Accounts | AMP account parameter | Accept the account parameter on the AMP request. | | | +| Publisher Accounts | Account-specific TTLs | Allow each account ID to have a custom PBC time-to-live for banner and video. | | | +| [Video](/formats/video.html) | Core | Support for basic instream and outstream video: passes video parameters to adapters, stores VAST responses when instructed. | | | +| Video | Outstream renderers | Support for bidders specifying their own renderers for outstream video. | | | +| Video | Long-form video | Support for the [long-form video endpoint](/prebid-server/endpoints/openrtb2/pbs-endpoint-video.html). | | | +| Video | IAB advertiser category mapping | Able to map IAB advertiser categories to a supplied mapping table. | | | +| Video | Echo video attributes | To support mobile video, copies stored request video attributes to the response. | | | +| [Interstitials](/prebid-server/features/pbs-interstitials.html) | Core | Support device.ext.prebid.interstitial.minwidthperc and device.ext.prebid.interstitial.minheightperc parameters, [dynamically updating the impression format object](https://github.com/prebid/prebid-server/issues/755) from a configurable list of sizes filtered by these parameters. | | | +| [Aliases](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#bidder-aliases) | Core | Can map bidders on an incoming request to a specific server-side bid adapter named in the request or defined in config. | | | +| [User ID Sync](/prebid-server/developers/pbs-cookie-sync.html) | Core | Implements the /cookie_sync and /setuid endpoints. | | | +| User ID Sync | Cooperative sync | Does a pixel sync with more than just the bidders on the page. | | | +| [Events](https://docs.google.com/document/d/1ry0X4C2EV-R0pMrm1IQk9BstxaT395UCl3KKqTGa5c8/edit#heading=h.7w5yevygp2gz) | Events | Ability to process the /event endpoint, place /event URLs in the OpenRTB response, and place /event URLs in VAST XML. | | | +| Events | Events vasttrack endpoint | Ability to process the /vasttrack endpoint initated by Prebid.js, placing /event URLs in VAST XML. | | | +| Events | Events BidID Generation | Some bidders don't generate unique enough BidIDs to join with auction events. This feature allows the host company to inject a PBS-generated BidID alongside the bidder-generated ID. | | | +| Analytics | Analytics module support | Allows developers to plug in a [custom analytics adapter](https://github.com/prebid/prebid-server/blob/master/docs/developers/add-new-analytics-module.md). | | | +| [Bidder Info Endpoints](/prebid-server/endpoints/info/pbs-endpoint-info.html) | Core | Provides details on which bidders and parameters exist in this Prebid Server. | | | +| [Troubleshooting](/troubleshooting/pbs-troubleshooting.html) | Test flag | Accepts the OpenRTB 'test' flag, emitting additional debug info on responses. | | | +| Troubleshooting | Debug flag | Accepts the ext.prebid.debug flag, emitting additional debug info on responses. | | | +| Operations | Core metrics | Emits detailed operational metrics to back-end systems: Graphite, Influx, and Prometheus | | | +| Operations | Circuit breaker | Protects system performance during fault scenarios by detecting problems with external and internal endpoints, turning them off temporarily when a problem occurs. | | | +| Operations | [Server default request](/prebid-server/features/pbs-default-request.html) | Support global defaults for incoming requests. | | | +| Operations | IPv6 | Support taking IPv6 addresses and forwarding them to bidders. | | | diff --git a/prebid-server/features/pbs-interstitials.md b/prebid-server/features/pbs-interstitials.md new file mode 100644 index 0000000000..1bd83d12fd --- /dev/null +++ b/prebid-server/features/pbs-interstitials.md @@ -0,0 +1,57 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Features | Interstitials + +--- + +# Prebid Server | Features | Interstitials + +Support for interstitial ads is enabled with the addition of two fields to the OpenRTB request: `device.ext.prebid.interstitial.minwidthperc` +and `device.ext.interstial.minheightperc` The values will be numbers that indicate the minimum allowed +size for the ad, as a percentage of the base side. For example, a width of 600 and "minwidthperc": 60 +would allow ads with widths from 360 to 600 pixels inclusive. + +Example: + +``` +{ + "imp": [{ + ... + "banner": { + "format": [ + {"w":1, "h":1} + ], + ... + } + "instl": 1, + ... + }] + "device": { + ... + "h": 640, + "w": 320, + "ext": { + "prebid": { + "interstitial": { + "minwidthperc": 60, + "minheightperc": 60 + } + } + } + } +} +``` + +Upon receiving a request for an interstitial impression (`instl:1`) and these parameters set, PBS will rewrite the +`format` object within the interstitial imp object. + +1. If the `format` array's first object is a size, PBS will take it as the max size for the interstitial. +2. If the first entry in `format` is 1x1, it will use the device's size as the max size. +3. Likewise, if `format` is not present, PBS will also use the device size as the max size. +4. Each PBS host company configures a list of common interstitial ad sizes, generally organized by weighing the larger and more common sizes first. +5. PBS generates a new format list for the interstitial imp by traversing this configured list and picking the first 10 sizes that fall within the imp's max size and minimum percentage size. +6. There's no attempt to favor aspect ratios closer to the original size's aspect ratio. +7. The limit of 10 is enforced to ensure we don't overload bidders with an overlong list. +8. The `minwidthperc` and `minheightperc` parameters are passed to bidder adapters, so if desired, they may use their own size matching algorithms. + diff --git a/prebid-server/developers/stored-requests.md b/prebid-server/features/pbs-storedreqs-go.md similarity index 74% rename from prebid-server/developers/stored-requests.md rename to prebid-server/features/pbs-storedreqs-go.md index 9c3d4aac4f..7a8492a6f8 100644 --- a/prebid-server/developers/stored-requests.md +++ b/prebid-server/features/pbs-storedreqs-go.md @@ -1,17 +1,13 @@ --- layout: page_v2 sidebarType: 5 -title: Prebid Server | Developers | Stored Requests +title: Prebid Server | Features | Setting Up Stored Requests for Go --- -# Stored Requests +# Prebid Server | Features | Setting Up Stored Requests for Go -This document gives a technical overview of the Stored Requests feature. - -Docs outlining the motivation and uses will be added sometime in the future. - -## Quickstart +## PBS-Go Stored Request Quickstart Configure your server to read stored requests from the filesystem: @@ -41,7 +37,7 @@ Add the file `stored_requests/data/by_id/stored_imps/{id}.json` and populate it }, "ext": { "appnexus": { - "placementId": 10433394 + "placementId": 12883451 } } } @@ -54,7 +50,7 @@ go build . ./prebid-server ``` -And then `POST` to [`/openrtb2/auction`](/prebid-server/endpoints/openrtb2/auction.html) with your chosen ID. +And then `POST` to [`/openrtb2/auction`](../endpoints/openrtb2/auction.md) with your chosen ID. ```json { @@ -95,7 +91,7 @@ You can also store _part_ of the Imp on the server. For example: }, "ext": { "appnexus": { - "placementId": 10433394 + "placementId": 12883451 } } } @@ -127,55 +123,6 @@ If the Stored Request and the HTTP request have conflicting properties, they will be resolved with a [JSON Merge Patch](https://tools.ietf.org/html/rfc7386). HTTP request properties will overwrite the Stored Request ones. -## Interstitial Ads - -Prebid Server supports interstitial ad type requests. These requests are enabled through the addition of the interstitial key to `device.ext.prebid`. This key has two fields, `minwidthperc` and `minheightperc`. The values are integers that represent the minimum allowed size for the ad, as a percentage of the base size. For example, a `width` of 600 and `minwidthperc` of 60 would allow ad widths of 360 (600 * .60) to 600. - -```json - -{ - "mockBidRequest": { - "id":"test-request-id", - "imp": [ - { - "id":"test-imp-id", - "banner": { - "format": [ - - { - "w":300, - "h":250 - } -, - - { - "w":300, - "h":600 - } - ] - }, - "instl":1, - "device": -{ ... } -, - "h":640, - "w":320, - "ext": { - "prebid": { - "interstitial": - { - "minwidthperc":60, - "minheightperc":60 - } - } - } - } - ] - } -``` - - - ## Stored BidRequests So far, our examples have only used Stored Imp data. However, Stored Requests @@ -259,8 +206,8 @@ stored_requests: ```yaml stored_requests: http: - endpoint: https://stored-requests.prebid.com - amp_endpoint: https://stored-requests.prebid.com?amp=true + endpoint: http://stored-requests.prebid.com + amp_endpoint: http://stored-requests.prebid.com?amp=true ``` @@ -300,17 +247,15 @@ stored_requests: dbname: database-name query: SELECT id, requestData, 'request' as type FROM stored_requests WHERE id in %REQUEST_ID_LIST% UNION ALL SELECT id, impData, 'imp' as type FROM stored_imps WHERE id in %IMP_ID_LIST%; http: - endpoint: https://stored-requests.prebid.com - amp_endpoint: https://stored-requests.prebid.com?amp=true + endpoint: http://stored-requests.prebid.com + amp_endpoint: http://stored-requests.prebid.com?amp=true in_memory_cache: ttl_seconds: 300 # 5 minutes request_cache_size_bytes: 107374182 # 0.1GB imp_cache_size_bytes: 107374182 # 0.1GB http_events: - endpoint: https://stored-requests.prebid.com - amp_endpoint: https://stored-requests.prebid.com?amp=true + endpoint: http://stored-requests.prebid.com + amp_endpoint: http://stored-requests.prebid.com?amp=true refresh_rate_seconds: 60 timeout_ms: 100 ``` - -Pull Requests for new Fetchers, Caches, or EventProducers are always welcome. diff --git a/prebid-server/features/pbs-storedreqs.md b/prebid-server/features/pbs-storedreqs.md new file mode 100644 index 0000000000..c6e6b59dfb --- /dev/null +++ b/prebid-server/features/pbs-storedreqs.md @@ -0,0 +1,36 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Features | Stored Requests + +--- + +# Prebid Server | Features | Stored Requests + +'Stored Requests' are blocks of OpenRTB stored on the server-side that are merged into +OpenRTB requests in a couple of scenarios. + +The data source can be local files on Prebid Server, but more commonly it would be a relational +database distributed across all the Prebid Servers in the host company's installation. + +## Mobile App + +Hardcoding bidders and parameters in a mobile app isn't ideal. Prebid Server allows Stored Request IDs to be +used in two ways: + +1. Define cross-adunit parameters like currency and price granularity +1. Define adunit-specific details: bidders and their parameters + +See the [Mobile SDK Use Case reference](/prebid-server/use-cases/pbs-sdk.html) for specific examples. + +## AMP + +The AMP protocol is converted to OpenRTB primarily using Stored Requests: the `tag_id` is used to look up +the base OpenRTB from the data source. After getting the bulk of the OpenRTB, AMP query string parameters +are used to inject and adjust parameters like size, url, etc. See the [AMP endpoint documentation](/prebid-server/endpoints/openrtb2/pbs-endpoint-amp.html) for more details. + +See the [AMP Use Case reference](/prebid-server/use-cases/pbs-amp.html) for specific examples. + +## Creating Stored Requests + +Details for setting up [PBS-Go Stored Requests](/prebid-server/features/pbs-storedreqs-go.html) are available. diff --git a/prebid-server/features/privacy/pbs-privacy.md b/prebid-server/features/privacy/pbs-privacy.md new file mode 100644 index 0000000000..8feaf8dc5b --- /dev/null +++ b/prebid-server/features/privacy/pbs-privacy.md @@ -0,0 +1,104 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Features | Privacy +--- + +# Prebid Server | Features | Privacy +{:.no_toc} + +* TOC +{:toc} + +## Mobile 'Limit Ad Tracking' flag + +If PBS receives 'device.lmt' flag in the OpenRTB request, it does the following anonymization: + +- Mask take off the last byte of the IPv4 address and the last 2 bytes of IPv6 addresses +- Removes user.id and user.buyeruid +- Removes the request.device.ifa attribute +- Rounds the request.device.geo. {lat,lon} to two decimal places + +## GDPR + +Prebid Server host companies and publishers have the ability to control the enforcement +activities that take place. + +The enforcement strategy changed significantly between TCF 1.1 and TCF 2.0. [TCF2](https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20Consent%20string%20and%20vendor%20list%20formats%20v2.md) is a +more nuanced and stricter policy. + +{: .alert.alert-info :} +If a Prebid Server host company wants to support GDPR, they must currently [register for the IAB Global Vendor List](https://register.consensu.org/). +The user must provide legal basis for the host company to read/write cookies or `/cookie_sync` will return an empty response with no syncs and `/setuid` will fail. + +### TCF 1.1 + +If Prebid Server determines that the user is in GDPR scope and doesn't consent +to *all* of the vendor's 'purposes' as declared in the Global Vendor List, it 'anonymizes' +the request to the adapters: + +- Mask take off the last byte of the IPv4 address and the last 2 bytes of IPv6 addresses +- Removes user.id and user.buyeruid +- Removes the request.device.ifa attribute +- Rounds the request.device.geo. {lat,lon} to two decimal places + +Full details are available [here](https://github.com/rubicon-project/prebid-server-java/blob/master/docs/developers/PrebidServerJava_GDPR_Requirements.pdf). + +### TCF 2.0 + +If Prebid server determines the user is in GDPR scope, then consent is independently tested +for each 'Purpose' with different consequences for each: + +{: .table .table-bordered .table-striped } +| Activity | Legal Basis Required | +| ----------- | ------------------------------------ | +| Responding to /cookie-sync requests | Purpose 1 (Device Access) | +| Setting a cookie on /setuid requests | Purpose 1 (Device Access) | +| Conducting auctions | Purpose 2 (Basic Ads) | +| Passing User IDs into an auction | Any Purpose 2-10. User IDs are important for more than personalizing ads - they can be used in frequency capping, building profiles, counting unique users, etc. So Prebid Server should pass User IDs through the auction if any of Purposes 2-10 pass the legal basis test. | +| Invoke an analytics adapter | Purpose 7 | +| Pass the user’s precise geographic information into auctions | Special Feature 1 | + +More details are available in the [Prebid Support for TCF2](https://docs.google.com/document/d/1fBRaodKifv1pYsWY3ia-9K96VHUjd8kKvxZlOsozm8E/edit#) reference and in the [Prebid Server GDPR Reference](https://docs.google.com/document/d/1g0zAYc_EfqyilKD8N2qQ47uz0hdahY-t8vfb-vxZL5w/edit#). + +### GDPR Configuration + +There are a number of configuration settings that PBS Host Companies need +to consider: + +- Host company GVL ID +- Default expiration time of the uids cookie set in the host company domain +- GDPR enforcement flags for each Purpose and Vendor + +The specific details vary slightly between PBS-Go and PBS-Java, so check the +version-specific documentation for more information. + +## COPPA + +The [Children's Online Privacy Protection Act (COPPA)](https://www.ftc.gov/enforcement/rules/rulemaking-regulatory-reform-proceedings/childrens-online-privacy-protection-rule) is a law in the US which imposes certain requirements on operators of websites or online services directed to children under 13 years of age, and on operators of other websites or online services that have actual knowledge that they are collecting personal information online from a child under 13 years of age. +If `regs.coppa` is set to '1' on the OpenRTB request, the following anonymization actions take place before going to the adapters: + +- Removes all ID fields: device.ifa, device.macsha1, device.macmd5, device.dpidsha1, device.dpidmd5, device.didsha1, device.didmd5 +- Truncate ip field - remove lowest 8 bits. +- Truncate ipv6 field - remove lowest 32 bits. +- Remove geo.lat, geo.lon. geo.metro, geo.city, and geo.zip +- Remove user.id, user.buyeruid, user.yob, and user.gender + +## CCPA / US-Privacy + +The [California Consumer Privacy Act (CCPA)](https://oag.ca.gov/privacy/ccpa) is a law in the US. which covers consumer rights relating to the access to, deletion of, and sharing of personal information that is collected by businesses. +The IAB has generalized +this state-specific rule into a [US Privacy](https://iabtechlab.com/standards/ccpa/) compliance framework. +If `regs.ext.us_privacy` is parsed to find that the user has opted-out of a "sale", +the following anonymization steps are taken: + +- Mask the last byte of the IPv4 address and the last 2 bytes of IPv6 addresses +- Removes user.id and user.buyeruid +- Removes the request.device.ifa attribute +- Rounds the request.device.geo. {lat,lon} to two decimal places + +## DNT + +Prebid Server does **not** recognize the Do-Not-Track header. The committee determined that it's obsolete in general and not supported on Safari specifically. We prefer not to implement, test, and document unsupported privacy flags. Prebid Server is not going to make a dent in the overall problems with DNT. + +We may reconsider this position if community members provide evidence that the flag is meaningful to their customers or lawyers. diff --git a/prebid-server/hosted-servers.md b/prebid-server/hosted-servers.md index eda6c448f6..a5eceaad6a 100644 --- a/prebid-server/hosted-servers.md +++ b/prebid-server/hosted-servers.md @@ -18,6 +18,10 @@ Several Prebid.org members host Prebid Server clusters for use by publishers. Learn more about Rubicon Project's Hosted Prebid Server offering. + + +Contact OpenX or your account manager for information regarding OpenX's Hosted Prebid Server service + If you're a company hosting Prebid Server for others, [join Prebid.org](/overview/what-is-prebid-org.html) to get on this list. diff --git a/prebid-server/hosting-options.md b/prebid-server/hosting-options.md deleted file mode 100644 index eda6c448f6..0000000000 --- a/prebid-server/hosting-options.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -layout: page_v2 -title: Hosted Prebid Servers -description: Hosted Prebid Servers -pid: 0 -sidebarType: 5 ---- - -# Hosted Prebid Servers -{:.no_toc} - -Several Prebid.org members host Prebid Server clusters for use by publishers. - - - - - - - - -
Fill out the AppNexus Prebid Server sign-up page. If approved, you will receive an email with your assigned accountId.
Learn more about Rubicon Project's Hosted Prebid Server offering.
- -If you're a company hosting Prebid Server for others, [join Prebid.org](/overview/what-is-prebid-org.html) to get on this list. diff --git a/prebid-server/hosting/hosted-servers.md b/prebid-server/hosting/hosted-servers.md new file mode 100644 index 0000000000..f10b4e491b --- /dev/null +++ b/prebid-server/hosting/hosted-servers.md @@ -0,0 +1,40 @@ +--- +layout: page_v2 +title: Prebid Server Managed Solutions +description: Prebid Server Managed Solutions +pid: 0 +sidebarType: 5 +--- + +# Prebid Server Managed Solutions +{:.no_toc} + +Several Prebid.org members host Prebid Server clusters for use by publishers. + +
+
+ +
+
+
Magnite’s Prebid-as-a-service solution makes it easy for large publishers to deploy and control custom header bidding implementations without writing code. The combination of an intuitive UI and on-demand support from our Prebid and yield management experts enables publishers to make faster decisions and potentially capture more revenue. This solution supports display and video ads across desktop and mobile app environments via Prebid.js, Prebid Mobile and Prebid Server. Contact sales@magnite.com for more information.
+
+
+
+
OpenWrap provides a transparent enterprise wrapper solution for Prebid.js and Prebid Server. Manage demand partners and push updates via a cloud-based UI without development resources or code changes. Access powerful reporting and analytics tools for data driven business decisions and dedicated account optimization and technical support teams.

https://pubmatic.com/products/header-bidding/

+
+
+
+
Contact OpenX or your account manager for information regarding OpenX's Hosted Prebid Server service.
+
+
+
+
Xandr offers a full managed Prebid solution including implementation and maintenance, as well as consulting support for publishers with their own tech resources. Xandr works with users to enable client and/or server-side header bidding across web, AMP, and mobile app channels, and support display, video, and native ad formats. Contact Xandr for more information, and to get a quote!
+
+
+ +
+
 
+
If you're a company hosting Prebid Server for others, join Prebid.org to get on this list.
+
 
+
+
diff --git a/prebid-server/hosting/pbs-database.md b/prebid-server/hosting/pbs-database.md new file mode 100644 index 0000000000..4dfde3d158 --- /dev/null +++ b/prebid-server/hosting/pbs-database.md @@ -0,0 +1,140 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Developer | Database + +--- + +# Prebid Server Database + +Companies looking to spin up Prebid Server will need to connect a database. Our design +strategy was to avoid a fixed schema, instead allowing each host company the flexibility +to define their schema any way they'd like. + +So instead of Prebid defining your schema, we just define the fields that need to come +from the query. You can then design the SQL query and put it in PBS configuration. + +## Database Queries + +Prebid Server queries the database in the following scenarios: + +{: .table .table-bordered .table-striped } +| Data | SQL Config | Description | +|------+---------------+-------------| +| Stored Requests | settings.database.stored-requests-query | Retrieve stored request JSON for incoming OpenRTB | +| AMP Stored Requests | settings.database.amp-stored-requests-query | Retrieve stored request JSON for incoming AMP | +| Stored Responses (PBS-Java only) | settings.database.stored-responses-query | (PBS-Java only) Retrieve stored response data | +| Account Data | (none) | Retrieve host company-specific account information | + +## Expected Response Fields + +### Stored Requests + +The Stored Request query needs to return fields in this order: + +{: .table .table-bordered .table-striped } +| Field Num | Name | Type | Meaning | Default | +|-----------+------+------+---------+---------| +| 1 | request ID | string | The Stored Request ID | n/a | +| 2 | request body | JSON | The body of the Stored Request | n/a | +| 3 | label | string | This is always just the static value 'request' | n/a | + +There are two parameters that can be passed into the query: + +- %REQUEST_ID_LIST% : a comma-separated list of "top-level" stored request IDs +- %IMP_ID_LIST% : a comma-separated list of "impression-level" stored request IDs + +This query is defined in settings.database.stored-requests-query. Example: +``` +settings: + database: + type: mysql + stored-requests-query: SELECT uuid, config, 'request' as dataType FROM stored_requests WHERE uuid IN (%REQUEST_ID_LIST%) UNION ALL SELECT uuid, config, 'imp' as dataType FROM stored_requests WHERE uuid IN (%IMP_ID_LIST%) +``` + +Again, you can name the fields however you'd like in your database, and the query can be arbitrarily complicated as long as it returns the fields in the order and types shown here. + +### AMP Stored Requests + +AMP Stored Requests are the same as the section above it won't ever have the %IMP_ID_LIST% parameter, so +the query can be simplified. + +This query is defined in settings.database.amp-stored-requests-query. Example: +``` +settings: + database: + type: mysql + stored-requests-query: SELECT uuid, config, 'request' as dataType FROM stored_requests WHERE uuid IN (%REQUEST_ID_LIST%) +``` + +### Stored Responses + +(PBS-Java only) The Stored Response query needs to return fields in this order: + +{: .table .table-bordered .table-striped } +| Field Num | Name | Type | Meaning | Default | +|-----------+------+------+---------+---------| +| 1 | response ID | string | The Stored Response ID | n/a | +| 2 | response body | JSON | The body of the Stored Response | n/a | + +One parameter can be passed into the query: + +- %RESPONSE_ID_LIST% : a comma-separated list of stored response IDs + +This query is defined in settings.database.stored-requests-query. Example: +``` +settings: + database: + type: mysql + stored-responses-query: SELECT resid, responseData FROM stored_responses WHERE resid IN (%RESPONSE_ID_LIST%) +``` + +### Account Data + +{: .alert.alert-info :} +Despite what we said about Prebid not defining your schema, it's not true for account data. +Currently the account query is hard-coded in both versions of Prebid-Server. You could +create a view as desired. We'll fix this someday. + +Account data is queried on every request to pull in important data. There is an LRU cache in the server +so the database isn't actually hit on every request. + +In PBS-Java, many account-configuration options come from the database, while in PBS-Go, those options are available in YAML configuration. + +In both versions the server can optionally validate the account against this database and reject accounts from +unknown sources. + +The algorithm the server uses for determining the account ID of the incoming request is: + +1. look in site.publisher.id +2. look in app.publisher.id +3. if AMP, look for the 'account' parameter on the query string (PBS-Java only) + +Here are the fields the server can recognize in the database response: + +{: .table .table-bordered .table-striped } +| Field Num | Name | Type | Meaning | Default | +|-----------+------+-----+---------+---------| +| 1 | uuid | string | Host-company specific account ID | n/a | +| 2 | price_granularity | enum | Deprecated. Granularity should be part of stored requests or the incoming OpenRTB. | n/a | +| 3 | banner_cache_ttl | integer | (PBS-Java only) How long (seconds) banner bids should be cached for this account. | Config | +| 4 | video_cache_ttl | integer | (PBS-Java only) How long (seconds) VAST should be cached for this account. | Config | +| 5 | events_enabled | 0 or 1 | (PBS-Java only) Whether to emit event URLs for this account. | 0 | +| 6 | enforce_ccpa | 0 or 1 | (PBS-Java only) Whether to enforce US-Privacy rules for this account. | Config | +| 7 | enforce_gdpr | 0 or 1 | (PBS-Java only) Whether to enforce TCF1 GDPR rules for this account. Deprecated. Use tcf_config for TCF2. | Config | +| 8 | tcf_config | JSON | (PBS-Java only) TCF2 override settings for this account. | Config | +| 9 | analytics_sampling_factor | tiny int | (PBS-Java only) Turns on analytics sampling for this account. Sampling mechanism is 1-in-N. e.g. if this value is a 2, it's a 1-in-2 (50%) sample. If 5, then 1-in-5 (20%). Max value is 100 (1%) | 1 | +| 10 | truncate_target_attr | tiny int | (PBS-Java only) Number of bytes allowed for targeting attributes for this account. 0=unlimited. | Config | + +Currently this query is hard-coded in both versions of Prebid-Server: + +PBS-Go: +``` +SELECT uuid, price_granularity FROM accounts_account where uuid = ? LIMIT 1 +``` + +PBS-Java +``` +SELECT uuid, price_granularity, banner_cache_ttl, video_cache_ttl, events_enabled, enforce_ccpa, tcf_config, analytics_sampling_factor, truncate_target_attr FROM accounts_account where uuid = ? LIMIT 1 +``` + diff --git a/prebid-server/hosting/pbs-hosting.md b/prebid-server/hosting/pbs-hosting.md new file mode 100644 index 0000000000..89beba33db --- /dev/null +++ b/prebid-server/hosting/pbs-hosting.md @@ -0,0 +1,80 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Hosting + +--- + +# Hosting a Prebid Server Cluster + +Spinning up a self-hosted cluster of Prebid Servers requires some up-front-planning. +The components that will be needed are highlighted in this hardware +layout diagram: + +![Prebid Server Hardware Layout](/assets/images/prebid-server/pbs-hardware-layout.png){:class="pb-xlg-img"} + +## Global Load Balancer + +Assuming you need to serve more than one geographic region, you'll need to utilize a Global Load Balaning service so your users will hit the +servers in the region closest to them. + +## Regional Load Balancers + +Once the users have come into their nearest server cluster, a load balancer will direct them in one of two ways: + +1. If the URI of the request contains `/cache`, they should be directed to one of the Prebid Cache servers. +2. Otherwise, all other endpoints should be forwarded to one of the Prebid Servers. + +## Prebid Servers + +These servers will have a mix of network and CPU work. They benefit +from a fair amount of memory so they can cache stored requests +and many versions of the GDPR vendors list. + +Other services you may want to run alongside Prebid Server are: + +- Geographic lookup (for GDPR scope determination) +- Device lookup service (future: for Programmatic Guaranteed targeting) + +## Prebid Cache Servers + +The PBC servers consume very little CPU or memory - they just translate +between Prebid protocols and the chosen No-SQL system that implements the storage cluster. + +## Storage Clusters + +You can setup Redis, Aerospike, or Cassandra. How many you need will +depend on the expected traffic, your traffic mix, and the average length of time that objects are cached. + +## Replicated Database + +Account information and StoredRequests are stored in a [database](/prebid-server/hosting/pbs-database.html) +queried by Prebid Server at runtime. +PBS has an internal LRU cache for this database, so it only queries when there's an account or stored request it hasn't seen recently. + +Getting data to each of the regions likely involves setting up a +source database that replicates to each region. + +Note that there aren't any open source tools for populating this +database. Each PBS host company establishes their own methods of +populating data from their internal systems. + +## Metrics System + +You'll want to hook both Prebid Server and Prebid Cache up to an +operational monitoring system. + +- PBS-Go currently supports Influx and Promotheus +- PBS-Java currently supports Influx and Graphite + +## Installing the Software + +The process for actually installing and configuring the software will differ for +the Go and Java versions of the software. See the relevant section +as a next step. + +## Further Reading + +- [Prebid Server Database](/prebid-server/hosting/pbs-database.html) +- [PBS-Go](/prebid-server/versions/pbs-versions-go.html) +- [PBS-Java](/prebid-server/versions/pbs-versions-java.html) diff --git a/prebid-server/overview/pbs-pbjs-migration-guide.md b/prebid-server/overview/pbs-pbjs-migration-guide.md new file mode 100644 index 0000000000..877def404f --- /dev/null +++ b/prebid-server/overview/pbs-pbjs-migration-guide.md @@ -0,0 +1,10 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Overview | Prebid.js Migration Guide + +--- + +# Prebid Server | Overview | Prebid.js Migration Guide + +Check back for updated content. diff --git a/prebid-server/overview/prebid-server-overview.md b/prebid-server/overview/prebid-server-overview.md new file mode 100644 index 0000000000..388cf8b059 --- /dev/null +++ b/prebid-server/overview/prebid-server-overview.md @@ -0,0 +1,63 @@ +--- +layout: page_v2 +title: Prebid Server Overview +description: Prebid Server Overview +sidebarType: 5 +--- + +# Prebid Server Overview +{:.no_toc} + +Prebid Server is an open-source solution for server-to-server header bidding. It supports a number of key use cases: [mobile app](/prebid-server/use-cases/pbs-sdk.html), [AMP](/prebid-server/use-cases/pbs-amp.html), [server-side web with Prebid.js](/prebid-server/use-cases/pbs-pbjs.html), and [long-form video](/prebid-server/use-cases/pbs-lfv.html). + +![Prebid Server Architecture](/assets/images/flowcharts/prebid-server/pbs-basic-flow.png){:class="pb-xlg-img"} + +Prebid Server is an intelligent proxy server with a growing list of features. At a high level, it works like this: + +1. Prebid Server completes and validates incoming requests + - Resolves dynamic stored requests + - Enforces privacy regulations +2. Next, it calls server-side bid adapters + - There are currently 75+ server-side bid adapters available +3. After everyone's responded (or the timeout period has expired), it formulates an appropriate response + - Handles currency conversion + - Quantizes bids + - Caches VAST XML or creatives as needed + +It also has optional analytics support. + +The Prebid Cache is an adjunct to Prebid Server that stores VAST and bids as needed, supporting video and AMP use cases. + +Explore [Prebid Server features](/prebid-server/features/pbs-feature-idx.html) in more detail. + +## Where to Run Prebid Server + +Unlike Prebid.js, Prebid Server is a server. It needs somewhere to run, and that somewhere ought to be scaleable, distributed, and fast. + +### Hosted + +The simplest route to working with Prebid Server is to sign up for a hosted solution. Several [Prebid.org members](/prebid-server/hosting/hosted-servers.html) host up-to-date server software with a global footprint, and provide tools to manage stored requests. + +### DIY + +But of course this is open source, so you're welcome to do this on your own. If you decide to implement your own Prebid Server solution, first check out the general [Prebid Server host company overview](/prebid-server/hosting/pbs-hosting.html). + +Then you need to decide which of the two implementations to utilize: + +- [Prebid Server (Go)](/prebid-server/versions/pbs-versions-go.html) - the original Prebid Server is written in the Go language. +- [Prebid Server (Java)](/prebid-server/versions/pbs-versions-java.html) - Prebid Server with a Java language port. + +To choose between them, see the [Prebid Server version overview](/prebid-server/versions/pbs-versions-overview.html) and the [FAQ](http://prebid.org/faq/prebid-server-faq.html#why-are-there-two-versions-of-prebid-server-are-they-kept-in-sync). + +## Which Server-Side Bidders to Utilize + +We've provided a [full list of Prebid Server bidders](/dev-docs/pbs-bidders.html), including various details about those bidders, such as media types supported and contact info. + +If you're a demand source, we also have information about [creating your own server-side adapter](/prebid-server/bidders/pbs-build-a-bid-adapter.html). + +## Where to Find Help + +If you need help with Prebid Server, the best ways to communicate with us are: + +- [Post an issue](https://github.com/prebid/prebid-server/issues) in the prebid-server GitHub repo. +- [Join prebid.org](/partners/partners.html) and get access to our Slack workspace. diff --git a/prebid-server/prebid-server-overview.md b/prebid-server/prebid-server-overview.md deleted file mode 100644 index 46817ad133..0000000000 --- a/prebid-server/prebid-server-overview.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -layout: page_v2 -title: Prebid Server Overview -description: Prebid Server Overview -pid: 0 -top_nav_section: prebid-server -nav_section: prebid-server -sidebarType: 5 ---- - -# Prebid Server Overview -{:.no_toc} - -Prebid Server is an open-source solution for server-to-server header bidding with Prebid.js and Prebid Mobile. By running your header bidding auction server-side you can improve your page’s load time, thereby improving performance. - -* TOC -{:toc} - -## Hosted Solution - -Your simplest route to working with Prebid Server is to sign up for a hosted solution. Several [Prebid.org members host](/prebid-server/hosted-servers.html) up-to-date server software with a global footprint, and provide tools to manage stored requests. - -## On Your Own - -If you decide to implement your own Prebid Server solution, you can [download the source code from GitHub](https://github.com/prebid/prebid-server). The GitHub site has [full instructions](https://github.com/prebid/prebid-server/tree/master/docs/developers) for configuring, deploying, and testing your implementation. - -## Bidders - -Prebid.org provides a full list of [Prebid Server bidders]({{site.baseurl}}/dev-docs/prebid-server-bidders.html), including various details about parameters and open issues. - -You can also find [additional information]({{site.baseurl}}/prebid-server/developers/pbs-bidder-info.html) for some of the Prebid Server bidders that will help you with your implementation. - -## Endpoints - -Full documentation is available for all Prebid Server endpoints: - -- [Bidder List](/prebid-server/endpoints/info/bidders.html) -- [Bidder Info - BidderName]({{site.baseurl}}/prebid-server/endpoints/info/bidders/bidderName.html) -- [Bidder Params]({{site.baseurl}}/prebid-server/endpoints/bidders/params.html) -- [Starting Cookie Sync]({{site.baseurl}}/prebid-server/endpoints/cookieSync.html) -- [Prebid Server AMP]({{site.baseurl}}/prebid-server/endpoints/openrtb2/amp.html) -- [Prebid Server Auction]({{site.baseurl}}/prebid-server/endpoints/openrtb2/auction.html) -- [Saving User Syncs]({{site.baseurl}}/prebid-server/endpoints/setuid.html) -- [Get Status]({{site.baseurl}}/prebid-server/endpoints/status.html) - -## Additional Developer Information - -- [Add a New Analytics Module]({{site.baseurl}}/prebid-server/developers/add-new-analytics-module.html) - Description, including and example, of how to add an analytics module to Prebid Server. - -- [Add a New Bidder]({{site.baseurl}}/prebid-server/developers/add-new-bidder.html) - Learn how to define and test a new bidder, then add the bidder to theExchange. - -- [Cookie Syncs]({{site.baseurl}}/prebid-server/developers/cookie-syncs.html) - Describes the mechanics of a Prebid Server cookie sync. - -- [GDPR]({{site.baseurl}}/prebid-server/developers/gdpr.html) - Explore the way in which Prebid Server supports GDPR regulations. - -- [Stored Request]({{site.baseurl}}/prebid-server/developers/stored-requests.html) - Learn about the Prebid Server Stored Requests feature. diff --git a/prebid-server/use-cases/pbs-amp.md b/prebid-server/use-cases/pbs-amp.md new file mode 100644 index 0000000000..98ae98d184 --- /dev/null +++ b/prebid-server/use-cases/pbs-amp.md @@ -0,0 +1,206 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Use Cases | AMP + +--- + +# Use Case: Prebid Server | AMP + +[Accelerated Mobile Pages (AMP)](https://ampproject.org/) is an alternate web technology that can speed page performance, but +as part of the tradeoff, header bidding wrappers like Prebid.js don't work well. Instead, AMP supports a method of header bidding called Real Time Configuration(RTC), which is implemented by Prebid Server. + +## Workflow + +Here's a workflow diagramming how this works. + +![Prebid AMP Architecture](/assets/images/flowcharts/prebid-server/pbs-amp-flow.png){:class="pb-xlg-img"} + +1. A browser processing an Accelerated Mobile Page (AMP) calls Prebid Server using the Real Time Protocol (RTC) and passing in a number of parameters, including a stored request ID. Each ad on the page is a separate request. +1. Prebid Server looks up the stored request to find which bidders and parameters to use. +1. The auction takes place and bid responses are placed in a cache. +1. Prebid Server responds to the AMP page with results and ad server targeting variables. +1. The ad server targeting variables are sent along to the ad server with the ad request. +1. When header bidding wins in the ad server, the ad server responds with a call to the [Prebid Universal Creative](overview/prebid-universal-creative.html). +1. The Prebid Universal Creative pulls the winning bid from the cache. +1. The Prebid Universal Creative displays the winning bid creative from the cache. + +## Details + +The following sections give additional details of the steps provided in the workflows. + +### AMP RTC Tags are Placed in the Page + +As described in the [Prebid AMP Implementation Guide](/dev-docs/show-prebid-ads-on-amp-pages.html), `amp-ad` tags are placed in the AMP content. + +There are two basic ways of invoking AMP RTC: + +- One option is to use one of the pre-defined [vendors listed in the AMP repo](https://github.com/ampproject/amphtml/blob/master/extensions/amp-a4a/0.1/callout-vendors.js). + +``` + + +``` +**Note:** the `prebidrubicon` and `prebidappnexus` AMP vendors define different parameters. AppNexus uses "PLACEMENT_ID" as the argument to rtc-config while Rubicon uses "REQUEST_ID". + + +- The other option is to construct a direct URL from component pieces: w, h, slot, targeting, gdpr_consent, account, page url (purl), etc. + +``` + +
+ +The Go version of Prebid Server is for those who: +
    +
  • Need long-form video
  • +
  • Need the most recent bidder adapters
  • +
  • Prefer the Go language
  • +
+ +
+
+ +Go Logo + +
+
+ + +## Features + +PBS-Go has all the core PBS features, but does have a backlog of newer [features](/prebid-server/features/pbs-feature-idx.html), so you'll want to look over the list to be familiar with the differences. + +## Code Repositories + +- [Prebid Server - Go](https://github.com/prebid/prebid-server) +- [Prebid Cache Server - Go](https://github.com/prebid/prebid-cache) + +## Installation + +See [Hosting your own Prebid Server](/prebid-server/hosting/pbs-hosting.html) for +important architectural considerations, then follow the instructions for [Installing PBS-Go](/prebid-server/developers/installing-go.html). + +## References + +- [Building an Analytics Adapter](/prebid-server/developers/pbs-build-an-analytics-adapter.html#adding-an-analytics-adapter-in-pbs-go) + +## See Also +- [Prebid Server - Java](/prebid-server/versions/pbs-versions-java.html) +- [Endpoint reference](/prebid-server/endpoints/pbs-endpoint-overview.html) diff --git a/prebid-server/versions/pbs-versions-java.md b/prebid-server/versions/pbs-versions-java.md new file mode 100644 index 0000000000..ae665e225d --- /dev/null +++ b/prebid-server/versions/pbs-versions-java.md @@ -0,0 +1,52 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Versions | Java + +--- + +# Prebid Server - Java + +
+
+ +The Java version of Prebid Server is for those who: +
    +
  • Want to host Programmatic Guaranteed
  • +
  • Prefer the Java language
  • +
+ +
+
+ +Java Logo + +
+
+ + +## Features + +PBS-Java look over the [feature list](/prebid-server/features/pbs-feature-idx.html) to be familiar with the differences. + +## Code Repositories + +The repositories are currently in the Rubicon-Project GitHub organization, but +will soon move to the Prebid org. + +- [Prebid Server - Go](https://github.com/rubicon-project/prebid-server-java) +- [Prebid Cache Server - Go](https://github.com/prebid/prebid-cache-java) + +## Installation + +See [Hosting your own Prebid Server](/prebid-server/hosting/pbs-hosting.html) for +important architectural considerations, then follow the instructions for [Installing PBS-Java](/prebid-server/developers/installing-java.html). + +## References + +- [Building an Analytics Adapter](/prebid-server/developers/pbs-build-an-analytics-adapter.html#adding-an-analytics-adapter-in-pbs-java) + +## See Also + +- [Prebid Server - Go](/prebid-server/versions/pbs-versions-go.html) +- [Endpoint reference](/prebid-server/endpoints/pbs-endpoint-overview.html) diff --git a/prebid-server/versions/pbs-versions-overview.md b/prebid-server/versions/pbs-versions-overview.md new file mode 100644 index 0000000000..921e1779d8 --- /dev/null +++ b/prebid-server/versions/pbs-versions-overview.md @@ -0,0 +1,23 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Versions | Overview + +--- + +# Prebid Server Code Bases + +Prebid Server has two code bases: Go and Java. The original version of Prebid Server was the Go-Lang version. Rubicon Project ported it to Java because they had more engineers who knew Java than Go. + +- [Prebid Server - Go](/prebid-server/versions/pbs-versions-go.html) +- [Prebid Server - Java](/prebid-server/versions/pbs-versions-java.html) + +Both versions are live in production, and they are kept identical in external APIs and reasonably close in functionality. + +For demand partners, we recommend building new bid adapters in Go - the team will port it to Java for you within a couple of months. + +For those looking to host a Prebid Server, here's some guidance on selecting which version to use: + +- If you plan to use long-form video, we recommend the Go version of the server. +- Look over the [features in each version](/prebid-server/features/pbs-feature-idx.html) and see if there are any available in only one version that are important to you. +- Otherwise, just choose the language your engineering team is most comfortable with inspecting and enhancing. diff --git a/prebid-video/video-getting-started.md b/prebid-video/video-getting-started.md index ec5e60eb93..e9a76e3d99 100644 --- a/prebid-video/video-getting-started.md +++ b/prebid-video/video-getting-started.md @@ -47,7 +47,7 @@ Follow the instructions for your ad server to create line items for instream vid If you already have a Prebid integration for banner, you don’t need to do anything differently for outstream video. Outstream units use the same creative and line item targeting setup as banner creatives. See the [Step by Step Guide to Google Ad Manager Setup]({{site.github.url}}/adops/step-by-step.html) for instructions. (If you’re not using Google Ad Manager as your ad server, follow your ad server’s guidelines for setting up your line items.) {: .alert.alert-info :} -**Prebid Server** If you’ve decided to conduct your header bidding auctions server-side rather than on the client, you need to have a Prebid Server account. See [Get Started with Prebid Server]({{site.github.url}}/dev-docs/get-started-with-prebid-server.html) to begin your integration. After you’ve created an account, you’ll need to pass along the account ID to your developers. +**Prebid Server** If you’ve decided to conduct your header bidding auctions server-side rather than on the client, you need to have a Prebid Server account or set up your own. See the [Prebid Server Overview](/prebid-server/overview/prebid-server-overview.html) to begin your integration. @@ -180,7 +180,9 @@ This section contains working examples of instream and outstream video ads for v + [Ooyala]({{site.baseurl}}/examples/video/server/ooyala/pbs-ve-ooyala.html) + [VideoJS]({{site.baseurl}}/examples/video/server/videojs/pbs-ve-videojs.html) + ## Further Reading - [Prebid.js for Video Overview]({{site.github.url}}/prebid-video/video-overview.html) - [What is Prebid?]({{site.github.url}}/overview/intro.html) + diff --git a/prebid-video/video-long-form.md b/prebid-video/video-long-form.md index 0220d0d99a..4eb1a61b2d 100644 --- a/prebid-video/video-long-form.md +++ b/prebid-video/video-long-form.md @@ -133,7 +133,7 @@ A string indicating the type of content being displayed in the video player. The mimes: ['video/mp4'],
-

For more on Prebid Server ad unit requirements, see Getting Started with Prebid Server – Video.

+

For more on Prebid Server ad unit requirements, see Getting Started with Prebid Server – Video.

@@ -141,6 +141,84 @@ A string indicating the type of content being displayed in the video player. The After you’ve defined your ad units, you can continue with the rest of your configuration. +#### Deal Support + +To prioritize certain video deals and ensure delivery and performance within the Freewheel stack Prebid has additional configurations that can be enabled. + +`prioritizeDeals` +A boolean that indicates if deals should be given a higher preference. If true, Prebid will set the value of `hb_pb_cat_dur` with `bid.video.tier` replacing the cpm value. For example: + +
+    hb_pb_cat_dur=dealId_395_15s
+  
+ +`dealTier` +An object that enables publishers to set a prefix and minimum deal tier for each bidder. The `dealTier` object enables publishers to have different line item setups with varying priorities. + +`dealTier.prefix` +An optional string that enables bidders to target deal line items. + +`dealTier.minDealTier` +An integer that will give higher preference to deal bids which return tier greater than minDealTier. Bids with `minDealTier` values less than five will not be ignored, however their cache key will contain `dealId` in place of `cpm`. These bids will be auctioned as non-deal bids. + +
+    // This will replace the cpm with dealId in cache key as well as targeting kv pair when prioritizeDeals flag is set to true.
+        pbjs.setConfig({
+        adpod: {
+          prioritizeDeals: true,
+          dealTier: {
+            'appnexus': {
+              prefix: 'tier',
+              minDealTier: 5
+            },
+            'some-other-bidder': {
+              prefix: 'deals',
+              minDealTier: 20
+            }
+          }
+        }
+        })
+    
+ +For adpods, the bidder will return multiple bids. Each bid can have a different priority/deal tier setting. To enable publishers to have control over the deal tier a `filterBids` setting has been added to `pbjs.adServers.freewheel.getTargeting` to select certain deal bids. + +
+    pbjs.adServers.freewheel.getTargeting({
+      codes: [adUnitCode1],
+      callback: function(err, targeting) {
+          //pass targeting to player api
+      }
+    });
+  
+ +Below is an example of a bid response for deals. + +
+  // Sample return targeting key value pairs
+    {
+    'adUnitCode-1': [
+      {
+        'hb_pb_cat_dur': 'tier9_400_15s', // Bid with deal id
+      },
+      {
+        'hb_pb_cat_dur': 'tier7_401_15s', // Bid with deal id
+      },
+      {
+        'hb_pb_cat_dur': '15.00_402_15s',
+      },
+      {
+        'hb_cache_id': '123'
+      }
+    ]
+    }
+  
+ ### Examples -See [Prebid Video Examples](/examples/video/long-form/pb-ve-lf-freewheel.html) for examples of long-form video ads. +See [Prebid Video Examples](/examples/video/long-form/pb-ve-lf-freewheel.html) for examples of long-form video ads. + +## Further Reading + +- [Prebid.js for Video Overview]({{site.github.url}}/prebid-video/video-overview.html) +- [Getting Started with Video for Prebid.js]({{site.github.url}}/prebid-video/video-getting-started.html) +- [What is Prebid?]({{site.github.url}}/overview/intro.html) diff --git a/prebid/events.md b/prebid/events.md index a98695cf16..19d95b126e 100644 --- a/prebid/events.md +++ b/prebid/events.md @@ -8,15 +8,20 @@ sidebarType: 0 # Prebid.org Events {:.no_toc} -## Upcoming events: +## Upcoming Event: + +{: .table .table-bordered .table-striped } +| Title: | How to Make Prebid the Supply Path Buyers Choose | +| Date: | Aug 27, 2020 | +| Registration: | [link](https://event.on24.com/eventRegistration/EventLobbyServlet?target=reg20.jsp&referrer=&eventid=2543494&sessionid=1&key=A724FF00CF11F4BF9C611B265C62DAEE®Tag=&sourcepage=register) | + -TBA -# Past events: +## Past Events: {: .table .table-bordered .table-striped } | Date | Description | Location | |------+-------+------------| | Jun 2, 2020 | Prebid Product Roadmap - Moving Forward While Staying In Place | [View webinar](https://event.on24.com/wcc/r/2366096/86825880B7AF15ACBCE71F188729FC63) | -| Oct 24, 2019 | Prebid Meetup | San Francisco, CA, USA | | Nov 19, 2019 | Prebid Meetup | Hamburg, Germany | +| Oct 24, 2019 | Prebid Meetup | San Francisco, CA, USA | diff --git a/prebid/managed.md b/prebid/managed.md index f6bda3b50b..7a35f0ea04 100644 --- a/prebid/managed.md +++ b/prebid/managed.md @@ -10,14 +10,30 @@ sidebarType: 0 Several Prebid.org members will configure and host your Prebid implementations, helping publishers install Prebid.js, Prebid SDK, and/or Prebid Server. +

Leader, Tech, and Publisher Prebid Members

+ +
AppNexus, a Xandr company, offers a full managed Prebid solution including implementation and maintenance, as well as consulting support for publishers with their own tech resources. AppNexus works with users to enable client and/or server-side header bidding across web, AMP, and mobile app channels, and support display, video, and native ad formats. Contact AppNexus for more information, and to get a quote!
OpenWrap provides a transparent enterprise wrapper solution for Prebid.js and Prebid Server. Manage demand partners and push updates via a cloud-based UI without development resources or code changes. Access powerful reporting and analytics tools for data driven business decisions and dedicated account optimization and technical support teams. https://pubmatic.com/products/header-bidding/
PubWise is the only Prebid.js management service offering Smart Path Optimization Technology (SPOT™) which uses AI to deliver an optimized ad configuration matched to user segments, with tailored demand inclusion that increases net revenue while improving latency. PubWise provides a turnkey platform to deploy, manage, monitor and optimize Prebid.js. PubWise is committed to protecting publisher value and data with clear auction dynamics, no arbitrage and transparent fees. Contact us for a live demonstration or try PubWise Analytics at no cost. +
Rubicon Project's Prebid-as-a-service solution makes it easy for large publishers to deploy and control custom header bidding implementations without writing code. The combination of an intuitive UI and on-demand support from our Prebid and yield management experts enables publishers to make faster decisions and potentially capture more revenue. This solution supports display and video ads across desktop and mobile app environments via Prebid.js, Prebid SDK and Prebid Server. Contact sales@rubiconproject.com for more information.
+

Community Prebid Members

+ + + + + + +
Browsi, a tech provider solely focused on creating premium ad inventory for publishers, offers a fully managed Prebid solution service focused on personalization and speed, along with other AI-based solutions for inventory such as user viewability predictions, predictive lazy loading and more. Browsi makes it easy to integrate and to make any changes, and offers an intuitive unified analytics and monitoring solution. For more information contact us at contact@gobrowsi.com. +
Media.net Managed Prebid solution gives flexibility to the publishers to manage complex header bidding integrations without compromising on revenue. Media.net's easy to use Configuration management system makes real-time changes to the publisher's page configurations without the need of any code changes. Our robust reporting and dashboard tools help publishers gain insights into their demand stack and make further optimizations. Additionally Media.net Marketplace brings together all formats of demand, including unique access to billions in search budgets, along with robust contextual data to induce more competition, overcome challenges with cookie-deficient environments and maximize revenues. This solution supports display and native ads across desktop and mobile web environments via Prebid.js and Media.net Server to Server. Contact pubsales@media.net for more information. +
+ + If you're a company providing Managed Prebid Solutions, [join Prebid.org](/overview/what-is-prebid-org.html) to get on this list. diff --git a/prebid/prebidjsReleases.md b/prebid/prebidjsReleases.md index 736d429c4a..9ec879476c 100644 --- a/prebid/prebidjsReleases.md +++ b/prebid/prebidjsReleases.md @@ -16,6 +16,11 @@ The table below is a summary of feature changes and important bug fixes in core {: .table .table-bordered .table-striped } | Release | Feature | | --- | --- | +| 3.24 | PBS Bid Adapter allows setting site params | +| 3.23 | If a server-side bid contains imp.ext.prebid.event.win, pbsBidAdapter listens to BidsWon events and hits the URL. | +| 3.22 | Secure creatives use event.origin rather than a hard coded adServerDomain | +| 3.21 | Price Floors Module: New Analytics signals | +| 3.17 | UserID module also exports IDs as eids | | 3.16 | isSafariBrowser fixed for Chrome and Firefox on iOS | | 3.15 | Advanced Size Mapping module support adunits of the same name | | 3.14 | New [GDPR enforcement module](/dev-docs/modules/gdprEnforcement.html) supports enforcing Purpose 1 - DeviceAccess | diff --git a/principles.md b/principles.md index 8ac27dff2a..7143451e65 100644 --- a/principles.md +++ b/principles.md @@ -3,9 +3,6 @@ layout: page_v2 title: Project Principles head_title: Project Principles description: A set of principles that guide how we develop Prebid -pid: 0 -top_nav_section: overview -nav_section: intro sidebarType: 0 --- @@ -13,7 +10,7 @@ sidebarType: 0 # Project Principles -Prebid.org uses the following principles to guide how we develop [Prebid.js]({{site.baseurl}}/prebid/prebidjs.html), [Prebid Server]({{site.baseurl}}/prebid-server/prebid-server-overview.html), [Prebid Mobile]({{site.baseurl}}/prebid-mobile/prebid-mobile.html), and any future sub-projects: +Prebid.org uses the following principles to guide how we develop [Prebid.js]({{site.baseurl}}/prebid/prebidjs.html), [Prebid Server](/prebid-server/overview/prebid-server-overview.html), [Prebid Mobile](/prebid-mobile/prebid-mobile.html), and any future sub-projects: + **Collaborative**: Foster a community of contribution. diff --git a/privacy.md b/privacy.md index b3cc26146d..74373d2556 100644 --- a/privacy.md +++ b/privacy.md @@ -8,9 +8,10 @@ sidebarType: 0 # Prebid.org Website Privacy Policy {:.no_toc} -Last updated Dec 18, 2018 +Last updated Aug 5, 2020 Prebid.org, Inc. respects your right to privacy. This Privacy Notice explains who we are, how we collect, share and use personal information about you, and how you can exercise your privacy rights. This Privacy Notice applies to personal information that we collect through our website at [https://prebid.org/](https://prebid.org/) and its subdomains ("**Website**") and via our marketing activities and events. +This Privacy Notice does not apply to any information collected by third parties using our open source software. If you have any questions or concerns about our use of your personal information, then please contact us using the contact details provided at the bottom of this Privacy Notice. @@ -26,10 +27,11 @@ We recommend that you read this Privacy Notice in full to ensure you are fully i Prebid.org is an industry consortium that provides free and open source solutions to implement header bidding. We’re utilized globally and headquartered in the United States. We seek to ensure and promote fair, transparent, and efficient header bidding across the ad tech industry, representing all parts of the programmatic ecosystem, from ad tech vendors to publishers and others. -The open source software products we make available may be utilized by third parties for the purposes of serving online advertisements. These third parties may configure the software to enable pseudonymized data included in bid requests to be transmitted within the online advertising ecosystem. However, Prebid.org has no involvement in these transactions and does not itself transmit, store or otherwise process the pseudonymized data in these transactions.  Prebid.org is not responsible for the privacy practices of such third parties and it is the responsibility of the third party concerned to handle data in accordance with applicable privacy laws.  +The open source software products we make available may be utilized by third parties for the purposes of serving online advertisements. These third parties may configure the software to enable pseudonymized data included in bid requests to be transmitted within the online advertising ecosystem. However, Prebid.org has no involvement in these transactions and does not itself transmit, store or otherwise process the pseudonymized data in these transactions.  Prebid.org is not responsible for the privacy practices of third parties that use our software and it is the responsibility of the third party concerned to handle data in accordance with applicable privacy laws.  For more information about Prebid.org, please see the “About” section of our Website at [https://prebid.org/overview/what-is-prebid-org.html](/overview/what-is-prebid-org.html). + ## What personal information does Prebid.org collect and why? The personal information that we may collect from our Website or through our marketing activities broadly falls into the following categories: @@ -56,6 +58,7 @@ Collecting this information enables us to better understand the visitors who com Some of this information may be collected using cookies and similar tracking technology, as explained further in our [Cookies Notice](/cookies.html). + ## Who does Prebid.org share my personal information with? We may disclose your personal information to the following categories of recipients: @@ -92,7 +95,7 @@ We use appropriate technical and organisational measures to protect the personal Your personal information may be transferred to, and processed in, countries other than the country in which you are resident. We are headquartered in the US, and our member companies and third party service providers and partners operate around the world. Therefore, when we collect your personal information, we may process it in countries that have data protection laws that are different to the laws of your country and in some cases, may not be as protective. -We will take appropriate safeguards to ensure that your personal information will remain protected in accordance with this Privacy Notice, including signing standard contractual clauses with our third party service providers, or engaging third party service providers that are Privacy Shield certified. Further details can be provided upon request – please write to us using the contact details further below. +We will take appropriate safeguards to ensure that your personal information will remain protected in accordance with this Privacy Notice, including signing standard contractual clauses with our third party service providers. Further details can be provided upon request – please write to us using the contact details further below. ## Data retention @@ -100,21 +103,39 @@ We retain personal information we collect from you where we have an ongoing legi When we have no ongoing legitimate business need to process your personal information, we will either delete or anonymise it or, if this is not possible (for example, because your personal information has been stored in backup archives), then we will securely store your personal information and isolate it from any further processing until deletion is possible. + ## Your data protection rights -If you are a resident of the European Economic Area, you have the following data protection rights: +If you are a resident of the European Economic Area or California, you have the right to request to access or request deletion of your personal information. You may exercise this right at any time by using the contact details provided under the ["How to contact us"](#contact) heading below. -* If you wish to access, correct, update or request deletion of your personal information, you can do so at any time by using the contact details provided under the ["How to contact us"](#contact) heading below. +In addition, if you are a resident of the European Economic Area, you have the following additional data protection rights: -* In addition, you can object to processing of your personal information, ask us to restrict processing of your personal information or request portability of your personal information. Again, you can exercise these rights by contacting us using the contact details provided under the ["How to contact us"](#contact) heading below. +* You may object to processing of your personal information, ask us to restrict processing of your personal information or request portability or correction of your personal information. Again, you can exercise these rights by contacting us using the contact details provided under the ["How to contact us"](#contact) heading below. +* If we have collected and processed your personal information with your consent, then you can withdraw your consent at any time. Withdrawing your consent will not affect the lawfulness of any processing we conducted prior to your withdrawal, nor will it affect processing of your personal information conducted in reliance on lawful processing grounds other than consent. +* You have the right to complain to a data protection authority about our collection and use of your personal information. For more information, please contact your local data protection authority. Contact details for data protection authorities in the European Economic Area are available [here](https://ec.europa.eu/justice/data-protection/article-29/structure/data-protection-authorities/index_en.htm). -* You have the right to opt-out of marketing communications we send you at any time. You can exercise this right by clicking on the "unsubscribe" or "opt-out" link in the marketing e-mails we send you. Alternatively, you can opt out by using the contact details provided under the ["How to contact us"](#contact) heading below. +Everyone has the right to opt-out of marketing communications we send you +at any time. You can exercise this right by clicking on the "unsubscribe" or +"opt-out" link in the marketing e-mails we send you. Alternatively, you can opt +out by using the contact details provided under the ["How to contact us"](#contact) heading below. -* Similarly, if we have collected and processed your personal information with your consent, then you can withdraw your consent at any time. Withdrawing your consent will not affect the lawfulness of any processing we conducted prior to your withdrawal, nor will it affect processing of your personal information conducted in reliance on lawful processing grounds other than consent. +We respond to all requests we receive from individuals wishing to exercise their data protection rights in accordance with applicable data protection laws. -* You have the right to complain to a data protection authority about our collection and use of your personal information. For more information, please contact your local data protection authority. Contact details for data protection authorities in the European Economic Area are available [here](https://ec.europa.eu/justice/data-protection/article-29/structure/data-protection-authorities/index_en.htm). +## Additional information for California residents + +If you are a California resident, please review the following additional privacy disclosures under the California Consumer Privacy Act ("CCPA"). + +You have the right to understand how we collect, use, and disclose your personal information, to access your information, to request that we delete certain information, and to not be discriminated against for exercising your privacy rights. You may exercise these rights as described in the ["Your data protection rights"](#data-protection-rights) section above. + +You also have the right to understand what information we collect, for what purpose, and how we disclose personal information to third parties. As described in the [What personal information does Prebid.org collect and why?](#what-personal-info) section, we collect the categories of personal information listed below, and we use and disclose these categories of information for the business purposes described in that section. The categories are: + +* Identifiers, like your name, email address, IP address, device ID, cookie ID, and other similar identifiers. +* Internet or other electronic network activity information, such as the usage data we receive when you access or use our Website. This includes information about your interactions with the Website and about the devices and computers you use to access the Website. +* Professional or employment related information, including any information (like your name, email address, or similar information) that you provide about your employment or employer. +* Other information that you choose to provide. + +We share these categories of personal information as described in the [Who does Prebid.org share my personal information with?](#share-personal-info) section. We never sell the personal information we collect. -We respond to all requests we receive from individuals wishing to exercise their data protection rights in accordance with applicable data protection laws. ## Updates to this Privacy Notice diff --git a/questions.md b/questions.md index ddeafa69fe..8c20f13b22 100644 --- a/questions.md +++ b/questions.md @@ -2,7 +2,7 @@ layout: page_v2 title: Questions & FAQ description: -hide: true + ---
diff --git a/support/support.md b/support/support.md index ff07757e98..ef1be7beb9 100644 --- a/support/support.md +++ b/support/support.md @@ -6,7 +6,7 @@ pid: 0 is_top_nav: yeah top_nav_section: support nav_section: intro -hide: true + --- diff --git a/troubleshooting/troubleshooting-guide.md b/troubleshooting/troubleshooting-guide.md index 0fdec8f924..8e3eac1799 100644 --- a/troubleshooting/troubleshooting-guide.md +++ b/troubleshooting/troubleshooting-guide.md @@ -417,6 +417,24 @@ When this event is logged, it shows that Prebid.js has requested to render the a
+## Common Bid Response Parameters + +The following parameters in the `bidResponse` object are common across all bidders. + +{: .table .table-bordered .table-striped } +| Name | Type | Description | Example | +|----------+---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------| +| `bidder` | String | Unique bidder code used by ad server's line items to identify the bidder | `"appnexus"` | +| `adId` | String | Unique identifier of a bid creative. Used by the line item's creative as in [this example]({{site.baseurl}}/adops/send-all-bids-adops.html#step-3-add-a-creative) | `"123"` | +| `pbLg` | String | Low granularity price bucket: $0.50 increment, capped at $5, floored to 2 decimal places (0.50, 1.00, 1.50, ..., 5.00) | `"1.50"` | +| `pbMg` | String | Medium granularity price bucket: 0.10 increment, capped at $20, floored to 2 decimal places (0.10, 0.20, ..., 19.90, 20.00) | `"1.60"` | +| `pbHg` | String | High granularity price bucket: 0.01 increment, capped at $20, floored to 2 decimal places (0.01, 0.02, ..., 19.99, 20.00) | `"1.61"` | +| `size` | String | Size of the bid creative; concatenation of width and height by 'x' | `"300x250"` | +| `width` | Integer | Width of the bid creative in pixels | `300` | +| `height` | Integer | Height of the bid creative in pixels | `250` | +| `adTag` | String | Creative's payload in HTML | `""` | + + ## Related Topics {:.no_toc} diff --git a/videos/index.md b/videos/index.md index 2d8e9e10f2..d8ae237a1a 100644 --- a/videos/index.md +++ b/videos/index.md @@ -28,7 +28,7 @@ This page has a collection of header bidding training videos. Optanon.InsertHtml('','vimeo1', null, {deleteSelectorContent: true}, 3); -

Header Bidding from AppNexus on Vimeo.

+

Header Bidding from Xandr on Vimeo.

### Downloading and Installing Prebid.js @@ -41,7 +41,7 @@ Optanon.InsertHtml('','vimeo2', null, {deleteSelectorContent: true}, 3); -

Downloading and Installing Prebid.js from AppNexus on Vimeo.

+

Downloading and Installing Prebid.js from Xandr on Vimeo.

### Ad Server Setup for Header Bidding @@ -65,7 +65,7 @@ Optanon.InsertHtml('','vimeo4', null, {deleteSelectorContent: true}, 3); -

Setup Google Ad Manager for Header Bidding from AppNexus on Vimeo.

+

Setup Google Ad Manager for Header Bidding from Xandr on Vimeo.

### Ad Units Array Setup @@ -91,7 +91,7 @@ Optanon.InsertHtml('','vimeo6', null, {deleteSelectorContent: true}, 3); -

Troubleshooting Header Bidding Configuration from AppNexus on Vimeo.

+

Troubleshooting Header Bidding Configuration from Xandr on Vimeo.

### Troubleshooting Ad Server: Size and Inventory