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 e23b4ee839..8a606fc372 100644 --- a/_data/partners.yml +++ b/_data/partners.yml @@ -230,6 +230,10 @@ 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 @@ -268,6 +272,10 @@ 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 69bc7a1ff9..3e6518302b 100644 --- a/_data/sidebar.yml +++ b/_data/sidebar.yml @@ -27,14 +27,6 @@ sectionTitle: subgroup: 0 -- sbSecId: 0 - title: About Prebid.org - link: /overview/what-is-prebid-org.html - isHeader: 0 - isSectionHeader: 0 - sectionTitle: - subgroup: 0 - - sbSecId: 0 title: Project Principles link: /principles.html @@ -43,22 +35,6 @@ sectionTitle: subgroup: 0 -- sbSecId: 0 - title: Membership - link: /partners/partners.html - isHeader: 0 - isSectionHeader: 0 - sectionTitle: - subgroup: 0 - -- sbSecId: 0 - title: Prebid Management Committees - link: /overview/prebid-management-committees.html - isHeader: 0 - isSectionHeader: 0 - sectionTitle: - subgroup: 0 - - sbSecId: 0 title: Developers link: /developers.html @@ -76,7 +52,7 @@ subgroup: 1 - sbSecId: 0 - title: '  Header Bidding Wrapper' + title: '  Header Bidding' link: /wrapper_code_of_conduct.html isHeader: 0 isSectionHeader: 0 @@ -84,8 +60,8 @@ subgroup: 0 - sbSecId: 0 - title: '  Community' - link: /overview/community-code-of-conduct.html + title: '  Module Rules' + link: /dev-docs/module-rules.html isHeader: 0 isSectionHeader: 0 subgroup: 0 @@ -130,30 +106,6 @@ isSectionHeader: 0 subgroup: 0 -- sbSecId: 0 - title: "Other" - link: - isHeader: 0 - isSectionHeader: 0 - isCatHeader: 1 - sectionTitle: - subgroup: 1 - -- sbSecId: 0 - title: '  Managed Services' - link: /prebid/managed.html - isHeader: 0 - isSectionHeader: 0 - subgroup: 0 - -- sbSecId: 0 - title: '  Events' - link: /prebid/events.html - isHeader: 0 - isSectionHeader: 0 - subgroup: 0 - - #--------------Prebid.js--------------| @@ -193,6 +145,14 @@ sectionTitle: subgroup: 0 +- sbSecId: 1 + title: Consent Management Best Practices + link: /dev-docs/cmp-best-practices.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 0 + - sbSecId: 1 title: Examples link: @@ -495,6 +455,14 @@ sectionTitle: subgroup: 5 +- sbSecId: 1 + title: Instream Video Ads Tracking + link: /dev-docs/modules/instreamTracking.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 5 + - sbSecId: 1 title: Freewheel Module link: /dev-docs/modules/freewheel.html @@ -536,6 +504,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: @@ -627,6 +604,14 @@ sectionTitle: subgroup: 8 +- sbSecId: 1 + title: First Party Data + link: /features/firstPartyData.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 8 + #--------------Prebid Mobile--------------| @@ -1127,6 +1112,22 @@ sectionTitle: subgroup: 0 +- sbSecId: 3 + title: Setup Rewarded Video Line Items For MoPub + link: /prebid-mobile/adops-setup-rewarded-video-mopub.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 0 + +- sbSecId: 3 + title: Setup Full Screen Video Line Items For MoPub + link: /prebid-mobile/adops-setup-full-screen-video-mopub.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 0 + - sbSecId: 3 title: Setup Native Ads link: /prebid-mobile/adops-native-setup.html @@ -1340,6 +1341,14 @@ 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 @@ -1623,7 +1632,7 @@ sbCollapseId: prebid-server - sbSecId: 5 - title: Prebid Server Overview + title: Overview link: isHeader: 1 headerId: serveroverview @@ -1633,182 +1642,323 @@ - 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: Cookie Sync Technical Details - link: /prebid-server/developers/cookie-syncs.html + title: Product Features + link: + isHeader: 1 + headerId: serverfeatures + isSectionHeader: 0 + sectionTitle: + subgroup: 3 + +- sbSecId: 5 + 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/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: First Party Data + link: /prebid-server/features/pbs-fpd.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--------------| @@ -1935,7 +2085,7 @@ - sbSecId: 7 title: Blog - link: /blog.html + link: https://prebid.org/blog/ isHeader: 0 isSectionHeader: 0 sectionTitle: 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/footer.html b/_includes/footer.html index 668058859f..bffb0c8508 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -9,15 +9,16 @@ - + + - - + + + + - - - + - + - + - + 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-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..326b22aa11 100644 --- a/faq/prebid-server-faq.md +++ b/faq/prebid-server-faq.md @@ -20,7 +20,7 @@ Nope. The only approval process is a code review. There are separate instruction - [Prebid Server - Go](https://github.com/prebid/prebid-server/blob/master/docs/developers/add-new-bidder.md) - [Prebid Server - Java](https://github.com/rubicon-project/prebid-server-java/blob/master/docs/developers/add-new-bidder.md) -As for [membership](/partners/partners.html) in Prebid.org, that's entirely optional -- we'd be happy to have you join and participate in the various committees, +As for [membership](https://prebid.org/membership/) in Prebid.org, that's entirely optional -- we'd be happy to have you join and participate in the various committees, but it's not necessary for contributing code as a community member. ## How can I debug Prebid Server requests? @@ -70,108 +70,39 @@ pbjs.setConfig({ ``` ## How do user ID cookies and ID syncing work in Prebid Server? -There are 3 answers here. The easy answer is for requests coming into Prebid Server from the Prebid SDK - there's no concept of cookies there, so no syncing takes place in that scenario. ID in mobile is based on IDFA. +For Prebid SDK there's no concept of cookies, so no syncing takes place in that scenario. ID in mobile is based on IDFA. -For other scenarios, Prebid Server sets up and manages a multi-vendor ID match table in the `uids` cookie in the host company's -domain. i.e. adnxs.com, rubiconproject.com, or whichever Prebid Server vendor you're utilizing. When the user has a `uids` cookie, -Prebid Server parses it and passes the vendor-specific IDs to the relevant server-side bid adapters. +For Prebid.js and AMP, see [Prebid Server User ID sync](/prebid-server/developers/pbs-cookie-sync.html) -Syncing in the AMP scenario uses the [load-cookie.html](/dev-docs/show-prebid-ads-on-amp-pages.html#user-sync) file that's part of -the Prebid Universal Creative package. When placed into an AMP-iframe, this file will call /cookie-sync and initiate a sync that -creates or updates the `uids` cookie. +## How does Prebid Server support privacy signals? -The most common source of requests for Prebid Server is from Prebid.js in a scenario where the user doesn't have any cookies for the Prebid Server domain. -1. The user loads a page with Prebid.js that's going to call Prebid Server -- i.e. the pub has set up s2sConfig. -2. Immediately after confirming that s2sConfig is setup, Prebid.js calls Prebid Server's /cookie-sync endpoint to initiate syncing -3. Prebid Server determines there is no `uids` cookie and responds to the browser with a list of pixel syncs for bidders that need to be synced. -4. Prebid.js places all of the pixels on the page and initiates the auction. -5. Because the syncs haven't completed, the auction call to Prebid Server will not contain the uids cookie. -6. The first auction occurs without IDs -7. At some point later, the pixels come back to Prebid Server through a /setuid redirect, setting (or updating) the uids cookie. -8. The second page view will have the IDs available. +See the [Prebid Server Privacy Feature Page](/prebid-server/features/pbs-privacy.html) +## Do you have any best practices and/or tips to increase the user-match rate? +For Prebid.js-initated server requests, we've found that cookie match rates are about what can be expected given the constraints: -{: .alert.alert-info :} -Note: the company that's hosting Prebid Server can configure it to read and utilize their exchange's -native cookie. i.e. if you're using Rubicon Project's Prebid Server, it can read their 'khaos' cookie, and if you're using -AppNexus' Prebid Server, it can read their 'uuid2' cookie. In other words, if the host company is an exchange and the user -has the exchange cookie, the host company will have an ID one page-view sooner than the other bidders. This gives a slight edge to -the hosting company in some scenarios, but it's technically unavoidable and better for both buyers and sellers to have one ID available rather than zero. +- The [/cookie_sync](/prebid-server/developers/pbs-cookie-sync.html) process is initiated by Prebid.js the moment the [s2sConfig](https://docs.prebid.org/dev-docs/publisher-api-reference.html#setConfig-Server-to-Server) is parsed. +- A limited number of bidders will be synced at once. PBS-Go will sync all the bidders listed in the `bidders` array. PBS-Java will sync all of them and possibly additional bidders. Publishers can change the number of syncs by specifying `userSyncLimit` on the s2sConfig. +- Privacy settings (e.g. GDPR) can affect sync rate. e.g. If a lot of your traffic is in the EEA, it's going to be harder to set cookies. -## How does Prebid Server support privay signals? +[AMP](/prebid-server/use-cases/pbs-amp.html) is a different story. There are several things you should check: -### Mobile 'Limit Ad Tracking' flag +- First, the page has to include the [usersync amp-iframe](/dev-docs/show-prebid-ads-on-amp-pages.html#user-sync). This amp-iframe loads `load-cookie.html`. +- Then AMP has to run this iframe. There are limitations as to where this amp-iframe can be on the page and possible how many amp-iframes there are on the page. +- The [/cookie_sync](/prebid-server/developers/pbs-cookie-sync.html) call is initiated from `load-cookie.html`, but there are many adapters on the server side, and a limited number of them will be synced at once. Consider setting `max_sync_count` higher to get all bidders synced faster, +- In a GDPR context, AMP doesn't supply the `gdprApplies` field. Prebid Server will determine for itself whether it can sync cookies, but it will not tell bidders whether the request is in GDPR-scope, so each bidder will have to determine scope for itself. -If PBS receives 'device.lmt' flag in the OpenRTB request, it does the following anonymization: +## How does the Notice URL work for Prebid Server? -- 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 +**Banner** -### GDPR +If a bidder adapter supplies 'nurl' in the bidResponse object, there are two paths: -Prebid Server host companies and publishers have the ability to control the enforcement -activities that take place. +1) If it's cached in Prebid Cache (e.g. AMP and App), then the 'nurl' is cached along with the 'adm' and utilized by the Prebid Universal Creative. +2) If it's not cached, the Prebid.js PrebidServerBidAdapter will append the 'nurl' to the bottom of the creative in a new div. -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 +**Video** +If a bidder adapter supplies 'nurl' in the bidResponse object instead of 'adm', +this URL will be treated as the location of the VAST XML. diff --git a/features/firstPartyData.md b/features/firstPartyData.md new file mode 100644 index 0000000000..c1786fbfa2 --- /dev/null +++ b/features/firstPartyData.md @@ -0,0 +1,160 @@ +--- +layout: page_v2 +title: Prebid.js First Party Data +description: First Party Data - Prebid.js +sidebarType: 1 +--- + +# First Party Data - Prebid.js +{: .no_toc} + +* TOC +{:toc} + +Prebid allows publishers to supply attributes related to their content +and users, and to apply permissions so only certain bidders are allowed +to access those attributes. + +{: .alert.alert-warning :} +These conventions aren't implemented by all adapters. Please +check with each of your bidders to make sure they're reading first +party data from the standard Prebid locations. + +## How It Works + +Here's a summary of how first party data (FPD) works: + +![First Party Data Summary](/assets/images/flowcharts/FirstPartyData-Summary.png){: .pb-lg-img :} + +This diagram shows a page that can provide: + +- Global context (site) data that applies to all AdUnits and all bidders +- Global user data that applies to all AdUnits and all bidders +- AdUnit-specific data that applies to all bidders +- Bidder-specific context data that applies to all AdUnits +- Bidder-specific user data that applies to all AdUnits + +## In-Page Examples + +The Prebid First Party Data JSON structure reflects the OpenRTB standard. +Arbitrary values should go in fpd.context.data or fpd.user.data. Fields +that are meant to be standard [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) values should be in fpd.context or fpd.user. Specfically, the standard values for `site` are: name, domain, cat, sectioncat, pagecat, page, ref, search, keywords. For `user` these are: yob, gender, keywords. + +{: .alert.alert-info :} +'Context' corresponds to the OpenRTB 'site' object. + +### Supplying Global Data + +Here's how a publisher can let all bid adapters have access +to first party data that might be useful in ad targeting: +{% highlight js %} +pbjs.setConfig({ + fpd: { + context: { + keywords: "power tools", // keywords is a standard OpenRTB field + search: "drill", // same with search and content + content: { userrating: 4 }, + data: { + pageType: "article", + category: "tools" + } + }, + user: { + keywords: "a,b", // keywords is a standard OpenRTB field + data: { + registered: true, + interests: ["cars"] + } + } + } +}); +{% endhighlight %} + +{: .alert.alert-warning :} +Note that supplying first party **user** data may require special +consent in certain regions. Prebid does **not** police the passing +of user data as part of its GDPR or CCPA modules. + +### Supplying AdUnit-Specific Data + +If an attribute is specific to an AdUnit, it can be passed this way: + +{% highlight js %} +pbjs.addAdUnits({ + code: "test-div", + mediaTypes: { + banner: { + sizes: [[300,250]] + } + }, + fpd: { + context: { + pbAdSlot: "homepage-top-rect", + adUnitSpecificContextAttribute: "123" + } + }, + ... +}); +{% endhighlight %} + +{: .alert.alert-info :} +Prebid does not support AdUnit-Specific **user** data. + +### Supplying Bidder-Specific Data + +Use the [`setBidderConfig()`](/dev-docs/publisher-api-reference.html#module_pbjs.setBidderConfig) function to supply bidder-specific data. In this example, only bidderA and bidderB will get access to the supplied +global data. + +{% highlight js %} +pbjs.setBidderConfig({ + bidders: ['bidderA', 'bidderB'], + config: { + fpd: { + context: { + data: { + pageType: "article", + category: "tools" + } + }, + user: { + data: { + registered: true, + interests: ["cars"] + } + } + } + } +}); + +pbjs.setBidderConfig({ // different bidders can receive different data + bidders: ['bidderC'], + config: { + fpd: { ... } + } +}); +{% endhighlight %} + +{: .alert.alert-info :} +Applying permissions to AdUnit-specific First Party Data has +to be done manually by using an event handler -- [pbjs.onEvent('beforeRequestBids', function())](/dev-docs/publisher-api-reference.html#module_pbjs.onEvent) + +## How Bid Adapters Should Read First Party Data + +To access global data, a Prebid.js bid adapter needs only to call [`getConfig()`](/dev-docs/publisher-api-reference.html#module_pbjs.getConfig), like this: + +{% highlight js %} +config.getConfig('fpd.context')) +config.getConfig('fpd.user')) +{% endhighlight %} + +AdUnit-specific values must be parsed out of the AdUnit object. + +The assumption is that bid adapters will copy the values to the appropriate protocol location for their endpoint. + +See [Prebid Server First Party Data](/prebid-server/features/pbs-fpd.html) for a discussion of this feature for Prebid Server bid adapters. + +## Further Reading + +- The [Prebid.js Publisher API](/dev-docs/publisher-api-reference.html) +- The [AdUnit Reference](/dev-docs/adunit-reference.html) +- [Prebid Server First Party Data support](/prebid-server/features/pbs-fpd.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/formats/video.md b/formats/video.md index 7ae5f3295d..8316a7a702 100644 --- a/formats/video.md +++ b/formats/video.md @@ -10,7 +10,7 @@ sidebarType: 6 # Prebid Video Ads {:.no_toc} -Video ads are supported by Prebid.js. Prebid Server support is coming soon. +Video ads are supported by both Prebid.js and Prebid Server. ## Prebid.js @@ -23,6 +23,8 @@ Video ads are supported by Prebid.js. Prebid Server support is coming soon. - [Getting started with video](/prebid-video/video-getting-started.html) - [Outstream video ads](/dev-docs/show-outstream-video-ads.html) +- [Prebid Server video ads](/use-cases/pbs-pbjs.html) +- [Prebid Server Long Form Video](r/use-cases/pbs-lfv.html) ### Prebid.js bid adapters that support instream and outstream video ads diff --git a/guide.md b/guide.md index 35e8d5a788..0cf5e9e7da 100644 --- a/guide.md +++ b/guide.md @@ -16,39 +16,39 @@ Sept 7, 2019 ## Core Technologies -The Prebid website is developed using [Jekyll](https://jekyllrb.com/), a static site generator which uses the following technology to create and style HTML pages. +The Prebid website is developed using [Jekyll](https://jekyllrb.com/), a static site generator which uses the following technology to create and style HTML pages. -**Markdown**: The majority of the content is written in Markdown language. Jekyll transform this into raw HTML. +**Markdown**: The majority of the content is written in Markdown language. Jekyll transform this into raw HTML. Learn more about Markdown](https://www.markdownguide.org/) -**Bootstrap**: A CSS template for responsive site design. Bootstrap provides the base formatting for the site. +**Bootstrap**: A CSS template for responsive site design. Bootstrap provides the base formatting for the site. Learn more about [Bootstrap](https://getbootstrap.com/docs/4.1/getting-started/introduction/_) -**Liquid**: A language created by Shopify to enable dynamic HTML creation. +**Liquid**: A language created by Shopify to enable dynamic HTML creation. Learn more about [Liquid](https://help.shopify.com/en/themes/liquid/basics) -**Javascript**: A combination of Javascript libraries are utilized for the Prebid site to include [JQuery](https://jquery.com/) and [BootstrapJS](https://getbootstrap.com/docs/3.3/javascript/) as well as custom code. +**Javascript**: A combination of Javascript libraries are utilized for the Prebid site to include [JQuery](https://jquery.com/) and [BootstrapJS](https://getbootstrap.com/docs/3.3/javascript/) as well as custom code. -**CSS**: The site builds on the base Bootstrap template with custom CSS stored in the style.css file. +**CSS**: The site builds on the base Bootstrap template with custom CSS stored in the style.css file. *** ## Site Config -The _config.yml file (note underscore prefix) sets the base configuration for the site. Refer to [Jekyll](https://jekyllrb.com/docs/configuration/) documentation on which properties can be set in the _congig.yml file. +The _config.yml file (note underscore prefix) sets the base configuration for the site. Refer to [Jekyll](https://jekyllrb.com/docs/configuration/) documentation on which properties can be set in the _congig.yml file. *** ## Directory Structure -Jekyll requires adherence to a certain directory structure to generate the site. Directories prefixed with an underscore contain files used to construct the html files of the site. +Jekyll requires adherence to a certain directory structure to generate the site. Directories prefixed with an underscore contain files used to construct the html files of the site. ### File Construction -For the Prebid.org site the following directories are used: +For the Prebid.org site the following directories are used: **_data** Jekyll was originally designed specifically for creation of blogging websites and not for dynamic, data-driven sites. However, by including the _data directory we can mimic a database structure to create a more robust site. Files in this directory can be saved in either *json*, *yml* or *csv* format. For Prebid.org they have been saved in *yml*. @@ -67,32 +67,32 @@ The contents of these files are used throughout the Prebid.org site for dynamica **_layouts** -The layout directory contains HTML files that, in conjunction with CSS and JS files, format the layout of pages throughout the site. +The layout directory contains HTML files that, in conjunction with CSS and JS files, format the layout of pages throughout the site. **_includes** -The includes directory contains HTML files that can be included within files, such as a file for the header and footer. +The includes directory contains HTML files that can be included within files, such as a file for the header and footer. **_posts** -The posts directory contains the files that make up the content of the blog section of the site. Unlike the layouts and includes directories, the posts files are written in Markdown. A blog.html file in the layout directory provides the formatting for these Markdown files. +The posts directory contains the files that make up the content of the blog section of the site. Unlike the layouts and includes directories, the posts files are written in Markdown. A blog.html file in the layout directory provides the formatting for these Markdown files. -**_bidders** +**_bidders** -The bidders directory is not a standard part of Jekyll; it’s a special use directory specifically for the Prebid.org site. The files in this directory are used to construct the table of partners on the partners/partners.html page. +The bidders directory is not a standard part of Jekyll; it’s a special use directory specifically for the Prebid.org site. The files in this directory are used to construct the table of partners on the partners/partners.html page. **_sites** -The sites directory is created by Jekyll. It contains the live site generated from the collected files and data listed above, combined with the CSS, JS and image assets and the Markdown files for individual pages. +The sites directory is created by Jekyll. It contains the live site generated from the collected files and data listed above, combined with the CSS, JS and image assets and the Markdown files for individual pages. *** ## Assets -The assets directory contains the CSS, Javascript, images and other assets used to create the site. +The assets directory contains the CSS, Javascript, images and other assets used to create the site. -The base CSS file used is Bootstrap (version 3.7.1) Custom CSS and modifications to Bootstrap classes are contained in the style.css file. +The base CSS file used is Bootstrap (version 3.7.1) Custom CSS and modifications to Bootstrap classes are contained in the style.css file. The JS directory contains the Javascript files required for the Prebid.org site. It includes JQuery and Bootstrap javascript frameworks as well as other third party libraries and custom javascript written specifically for the Prebid site. For JQuery and Bootstrap both the expanded and minified versions of the javascript files are included but only the minified files are linked from the site header. @@ -104,34 +104,34 @@ The JS directory contains the Javascript files required for the Prebid.org site. This file contains custom CSS classes and modifications to Bootstrap classes. The file is broken up into the various sections relating to navigaton, homepage and content pages. *Navbar* -The navbar class is a Bootstrap class. It controls the formatting of the top level navigation. Portions of it have been modified specifically for Prebid formatting. +The navbar class is a Bootstrap class. It controls the formatting of the top level navigation. Portions of it have been modified specifically for Prebid formatting. *Dropdown* The dropdown class is a Boostrap class. It controls the formatting and functionality of the dropdown items of the top navigation. Portions of it have been modified specifically for Prebid formatting. *Sidebar* -The sidebar class is a Boostrap class. It controls the formatting and functionality of the dropdown items of the top navigation. Portions of it have been modified specifically for Prebid formatting. Additional custom classes have been created for specific formatting or functionality required by Prebid. +The sidebar class is a Boostrap class. It controls the formatting and functionality of the dropdown items of the top navigation. Portions of it have been modified specifically for Prebid formatting. Additional custom classes have been created for specific formatting or functionality required by Prebid. *Homepage* -The classes in the homepage secton are custom classes created to format the top portion of the Prebid website homepage. +The classes in the homepage secton are custom classes created to format the top portion of the Prebid website homepage. *Container* -A custom container class created for the Prebid website. +A custom container class created for the Prebid website. *Hover Effect* -A custom series of classes created to control the formatting functionalty of the icon buttons on the Prebid website homepage. +A custom series of classes created to control the formatting functionalty of the icon buttons on the Prebid website homepage. *Message* -A custom series of classes created to control the formatting of the message box on the Prebid website homepage. +A custom series of classes created to control the formatting of the message box on the Prebid website homepage. *Benfits* -A custom series of classes created to control the formatting of the Benefits section of the Prebid website homepage. +A custom series of classes created to control the formatting of the Benefits section of the Prebid website homepage. *Carousel* -The carousel class is a Bootstrap class. It controls the formatting and functionality of the carousel displayed on the homepage. Portions of it have been modified specifically for Prebid formatting. Additional custom classes have been created for specific formatting or functionality required by Prebid. +The carousel class is a Bootstrap class. It controls the formatting and functionality of the carousel displayed on the homepage. Portions of it have been modified specifically for Prebid formatting. Additional custom classes have been created for specific formatting or functionality required by Prebid. *Partners* -A custom series of classes created to control the formatting of the [partners](/partners/partners.html) page. +A custom series of classes created to control the formatting of the [partners](/partners/partners.html) page. *Blog* A custom series of classes created to control the formatting of the blog pages. @@ -146,8 +146,8 @@ A custom class created to control the formatting of the footer. The CSS file has multiple @media sections that handle the formatting of the website pages at specific screen widths. Those widths (in pixels) are: -| Width | Device | -| --- | --- | +| Width | Device | +| --- | --- | | 1300 | Small browsers | | 1024 | Large tablets e.g. iPadPro | | 768 | Regular tablets e.g. iPads | @@ -161,21 +161,21 @@ The CSS file has multiple @media sections that handle the formatting of the webs ## Data Models -The data files are stored in the __data directory. +The data files are stored in the __data directory.
- + ### Partners There are three locations important for adding a new partner onto the [Partners Page](/partners/partners.html) @@ -346,7 +346,7 @@ The attributes in the Jekyll 'front matter' drive various behaviors and dynamic | userIds | no | comma-separated list of supported user id modules | For display. | | prebid_member | no | true or false, whether this company is a prebid.org member | For display. | -The bidderCode, aliasCode, and prevBiddercode parameters bear some description. +The bidderCode, aliasCode, and prevBiddercode parameters bear some description. Some adapters have a longer bidderCode and a shorter bidderCode -- their adapter supports both (with the `alias` feature) but there's only one documentation file and of course one PBJS adapter file. An relatively common scenario is when the company started off with a long bidderCode, but found it awkward to set up ad server targeting variables because GAM limits you to 20 chars, which is easy to exceed 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..5f623d4ff8 100644 --- a/overview/intro.md +++ b/overview/intro.md @@ -12,6 +12,9 @@ sidebarType: 0 ## Overview +{: .alert.alert-info :} +If you're looking for a more high-level overview of Prebid.org, including product features, membership, events, and so on, visit [Prebid.org](https://prebid.org/). + Prebid is more than a product; it's a product suite, a community, and an organization. - **Product Suite:** A free and open source suite of software products designed to enable publishers to implement header bidding on their websites and from within their apps. Our product line includes: @@ -19,7 +22,7 @@ Prebid is more than a product; it's a product suite, a community, and an organiz - **Prebid Server:** Provides a hosted or custom server-side solution for header bidding. Utilizing Prebid Server can reduce latency between bid request and ad selection, and speed the presentation of your site and ads. - **Prebid Mobile:** Our native iOS and Android solutions to enable header bidding within a mobile app. - **Community:** The developers that maintain and improve our products. -- **Organization:** A collection of leaders within the ad tech industry that promotes our products, works with the ad tech community to expand the solutions our products can provide, and encourages the development of the platform. +- **Organization:** A collection of leaders within the ad tech industry that promotes our products, works with the ad tech community to expand the solutions our products can provide, and encourages the development of the platform. For more about the organization, see the [Prebid.org](https://prebid.org/) website. {% include alerts/alert_note.html content="Our flagship product, Prebid.js, is sometimes referred to as simply *Prebid*, but please be aware that the Prebid product line supports header bidding for web, AMP, and mobile apps, using both client- and server-side project components." %} @@ -77,7 +80,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 +115,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) -+ [Managed Prebid Solutions](/prebid/managed.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](https://prebid.org/product-suite/managed-services/) 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..f3577affc8 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. @@ -15,10 +13,37 @@ Formed in September of 2017, Prebid.org is an independent organization designed Prebid.org is open to all companies who are part of the programmatic ecosystem, from ad tech vendors to publishers and others. We believe strongly that by working together, we can do some great things in the industry. -[Learn more](/partners/partners.html) about becoming a member of Prebid.org. +[Learn more](https://prebid.org/membership/) 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) +* [Prebid.org Members and Partners](https://prebid.org/membership/) * [The Drum reporting on Prebid.org](https://www.thedrum.com/news/2017/09/11/appnexus-and-rubicon-project-launch-prebidorg-hailing-open-source-approach-header) -* [Current members of Prebid.org]({{site.baseurl}}/partners/partners.html) +* [Current members of Prebid.org](https://prebid.org/membership/member-directory/) diff --git a/prebid-mobile/adops-line-item-setup-mopub.md b/prebid-mobile/adops-line-item-setup-mopub.md index b8923eb326..cd5d578c87 100644 --- a/prebid-mobile/adops-line-item-setup-mopub.md +++ b/prebid-mobile/adops-line-item-setup-mopub.md @@ -11,12 +11,12 @@ sidebarType: 3 -# Step by Step Line Item Setup for MoPub +# Step-by-Step Line Item Setup for MoPub * TOC {:toc } -This page describes step by step how to set up Prebid Mobile line items for MoPub to serve ads on app with the Prebid SDK. It is using the Universal Prebid Creative. +This page provides step-by-step instructions to set up Prebid Mobile line items for MoPub to serve ads on app with the Prebid SDK. It is using the Universal Prebid Creative. ## Step 1. Add a line item 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/adops-setup-full-screen-video-mopub.md b/prebid-mobile/adops-setup-full-screen-video-mopub.md new file mode 100644 index 0000000000..429c0488d3 --- /dev/null +++ b/prebid-mobile/adops-setup-full-screen-video-mopub.md @@ -0,0 +1,57 @@ +--- +layout: page_v2 +title: Setup Rewarded Video for MoPub +description: Setup Full Screen Video for MoPub +pid: 1 +top_nav_section: prebid-mobile +nav_section: prebid-mobile-adops +sidebarType: 3 +--- + +# Step-by-Step Line Item Setup for Full-screen Video on MoPub + +* TOC +{:toc } + +This page provides step-by-step instructions to set up full-screen video line items on MoPub to be used with the Prebid Mobile SDK. + +## Step 1. Create full screen adUnit +Under New ad unit, select Fullscreen.   + +## Step 2. Add a line item +In the *Add a Line Item* section: +1. For the *Type and Priority* settings, select *Non-Guaranteed* as the type and set the priority to *12*. This ensures the line item will compete with all other demand. +2. Set the Rate to the price you want to target.  +For the Type and Priority settings, select Non-Guaranteed as the type and set the priority to 12   +3. In the *Advanced Targeting* section, set the target for *Keywords* to `hb_pb:0.50`  +In the Advanced Targeting section, set the target for Keywords to hb_pb:0.50   + +For each level of pricing granularity required, one line item/creative pairing will need to be set up. + +Line items must be set up to target custom keywords that include bid price information. The bid price keywords will contain how much the buyer bid on the impression. + +Prebid Mobile, by default, will send the highest bid price to MoPub using the keyword `hb_pb` but will also submit the key `hb_pb_BIDDERCODE` for each bidder. You can decide to create one set of line items for all bidders or one set of line items for each bidder. + +## Step 3. Add creatives to your line item +Full-screen video creatives must have a *VAST tag* with the *Format* set to *Fullscreen* that includes the code below: +``` + + + + MoPub + + + + + +``` +
+MoPub VAST tag code   + +The `hb_uuid` variable value is the cache id that will load the ad markup from the bid stored in Prebid Cache. Within each line item, for each ad unit size, there should be one creative with this content. + +The XML can be constructed by providing the VAST tag URL as: +`https://%%KEYWORD:hb_cache_host%%%%KEYWORD:hb_cache_path%%?uuid=%%KEYWORD:hb_uuid%%` + +## Step 4. Duplicate line items +Duplicate your line items according to your [price granularity](/prebid-mobile/adops-price-granularity.html) setting. diff --git a/prebid-mobile/adops-setup-rewarded-video-mopub.md b/prebid-mobile/adops-setup-rewarded-video-mopub.md new file mode 100644 index 0000000000..839a8593e7 --- /dev/null +++ b/prebid-mobile/adops-setup-rewarded-video-mopub.md @@ -0,0 +1,55 @@ +--- +layout: page_v2 +title: Setup Rewarded Video for MoPub +description: Setup Rewarded Video for MoPub +pid: 1 +top_nav_section: prebid-mobile +nav_section: prebid-mobile-adops +sidebarType: 3 +--- + +# Step-by-Step Line Item Setup for Rewarded Video on MoPub + +* TOC +{:toc } + +This page provides step-by-step instructions to set up rewarded-video line items on MoPub to be used with the Prebid Mobile SDK. + +## Step 1. Add a line item + + In the *Add a Line Item* section: + 1. For the *Type and Priority* settings, select *Non-Guaranteed* as the type and set the priority to *12*. This ensures the line item will compete with all other demand. + 2. Set the Rate to the price you want to target.  + For the Type and Priority settings, select Non-Guaranteed as the type and set the priority to 12   + 3. In the *Advanced Targeting* section, set the target for *Keywords* to `hb_pb:0.50`  + In the Advanced Targeting section, set the target for Keywords to hb_pb:0.50   + +For each level of pricing granularity required, one line item/creative pairing will need to be set up. + +Line items must be set up to target custom keywords that include bid price information. The bid price keywords will contain how much the buyer bid on the impression. + +Prebid Mobile, by default, will send the highest bid price to MoPub using the keyword `hb_pb` but will also submit the key `hb_pb_BIDDERCODE` for each bidder. You can decide to create one set of line items for all bidders or one set of line items for each bidder. + +## Step 2. Add creatives to your line item +Rewarded video creatives must have a *VAST tag* with the *Format* set to *Rewarded Video* that includes the code below: + +``` + + + + MoPub + + + + +``` + +
+MoPub VAST tag code   +The `hb_uuid` variable value is the cache id that will load the ad markup from the bid stored in Prebid Cache. Within each line item, for each ad unit size, there should be one creative with this content. + +The XML can be constructed by providing the VAST tag URL as: +`https://%%KEYWORD:hb_cache_host%%%%KEYWORD:hb_cache_path%%?uuid=%%KEYWORD:hb_uuid%%` + +## Step 3. Duplicate line items +Duplicate your line items according to your [price granularity](/prebid-mobile/adops-price-granularity.html) setting. diff --git a/prebid-mobile/dr-prebid.md b/prebid-mobile/dr-prebid.md index d672e5b846..799f8dab86 100644 --- a/prebid-mobile/dr-prebid.md +++ b/prebid-mobile/dr-prebid.md @@ -55,6 +55,8 @@ The type of ad you want to test. This will be the ad type that is associated wit Select from: - *Banner* - *Interstitial* +- *Native* +- *Video* **Ad Size** @@ -94,6 +96,10 @@ Select your Prebid Server host: - *AppNexus* - *Rubicon* +- *Custom* + +**Custom Server Host** +Provide the url of the custom hosted prebid server **Account ID** diff --git a/prebid-mobile/pbm-api/android/pbm-adunit-android.md b/prebid-mobile/pbm-api/android/pbm-adunit-android.md index 5a2acdc87d..5bdddecf88 100755 --- a/prebid-mobile/pbm-api/android/pbm-adunit-android.md +++ b/prebid-mobile/pbm-api/android/pbm-adunit-android.md @@ -47,12 +47,62 @@ PB Ad Slot is an identifier tied to the placement the ad will be delivered in. T Trigger a call to Prebid Server to retrieve demand for this Prebid Mobile ad unit. +#### Mopub or GAM + +By default, Prebid SDK uses inflection to determine the publisher ad server, one of Mopub or Google Ad Manager (GAM), to convert Prebid's targeting keys (PBS bid keys, host and cache key) to trigger targeted line items. To render ads in ad servers other than Mopub or GAM, follow the instructions in the 3rd party ad server below. + + **Parameters** - `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 +#### 3rd Party Ad Server + +The default ad servers for Prebid's Mobile SDK are MoPub and GAM. The SDK can be expanded to include support for 3rd party ad servers through the fetchDemand function. This function returns the Prebid Server bidder key/values (targeting keys), which can then be passed to the ad server of choice. + +In this mode, the publisher will be responsible for the following actions: +* Call fetchDemand with extended targetingDict callback +* Retrieve targeting keys from extended fetchDemand function +* Convert targeting keys into the format for your ad server +* Pass converted keys to your ad server +* Render ad with Prebid Universal Creative or custom renderer + + +**Function Callbacks** + +* `ResultCode`: enum [result codes](https://docs.prebid.org/prebid-mobile/pbm-api/android/pbm-api-result-codes-android.html) +* `unmodifiableMap`: [Prebid Server Response targeting keys](https://docs.prebid.org/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#targeting) + + +``` +func fetchDemand(completion: @escaping(_ result: ResultCode, _ kvResultDict: [String : String]?) -> Void) +``` + +{: .alert.alert-warning :} +unmodifiableMap is an immutable object. Attempting to modify at runtime will throw an UnsupportedOperationException error. This is to prevent accidental changes to the Prebid targeting keys. If there is a desire to update, create or remove a key, making a copy of unmodifiableMap is recommended before passing to the ad server. + + +Example: + +```java +func loadMPRewardedVideo() { +private void loadMPRewardedVideo() { + + adUnit.fetchDemand(new OnCompleteListener2() { + @Override + public void onComplete(ResultCode resultCode, Map unmodifiableMap) { + //copy of unmodifiableMap. It is an extra step to avoid runtime exception during changing unmodifiableMap + Map kvMap = new HashMap<>(unmodifiableMap); + String mpKeywords = Util.convertMapToMoPubKeywords(kvMap); + adServerRewardedVideoManager.RequestParameters parameters = new adServerRewardedVideoManager.RequestParameters(mpKeywords); + adServerObject.loadRewardedVideo(ADUNITID_REWARDED, parameters); + } + }); + +} +``` diff --git a/prebid-mobile/pbm-api/android/pbm-targeting-params-android.md b/prebid-mobile/pbm-api/android/pbm-targeting-params-android.md index 57bd5862e7..f299f4ad67 100755 --- a/prebid-mobile/pbm-api/android/pbm-targeting-params-android.md +++ b/prebid-mobile/pbm-api/android/pbm-targeting-params-android.md @@ -113,6 +113,66 @@ storeUrl = TargetingParams.getStoreUrl(); TargetingParams.setStoreUrl(storeUrl); ``` + +### Open Measurment SDK (OMSDK) + +OMSDK is designed to facilitate 3rd party viewability and verification measurement for ads served in mobile app enviroments. Prebid SDK will provide the signaling component to Bid Adapters, by way of Prebid Server, indicating the impression is elligible for OMSDK support. Prebid SDK does not currently integrate with OMSDK itself, instead it will rely on a publisher ad server to render viewability and verification measurement code. + +There three components to signaling support for OMSDK: +* Partner Name +* Partner Version +* API code + +**Partner Name** + +This will be the [IAB OMSDK compliant partner name](https://complianceomsdkapi.iabtechlab.com/compliance/latest) responsible for integrating with the OMSDK spec. See below for configuration and examples + +#### omidPartnerName +Open Measurement partner name. + +``` +TargetingParams.setOmidPartnerName() +``` + +Examples: + +Java +```java +TargetingParams.setOmidPartnerName("Google") +``` + +**Partner Version** + +The OMSDK version number the partner integrated with. See below for configuration and examples. + + +#### omidPartnerVersion +Partner's OMSDK version number implementation +``` +TargetingParams.setOmidPartnerVersion(); +``` + +Examples: + +Java +```java +TargetingParams.setOmidPartnerVersion("1.0"); +``` + +**API Code** + +Per OpenRTB 2.5, support for OMSDK is signaled using the imp.[media type].api field represented in Prebid SDK withing each ad format type under the parameters object. Refer to the documentation of the respective ad unit class. + +Example: +``` +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))); +``` + + + ### Inventory (Context) Keywords Context Keywords are a list of keywords about the app as referenced in OpenRTB 2.5 as app.keywords. Any keyword passed in the context keyword field may be passed to the buyer for targeting. diff --git a/prebid-mobile/pbm-api/ios/pbm-adunit-ios.md b/prebid-mobile/pbm-api/ios/pbm-adunit-ios.md index db5aea1f42..91c656bb60 100755 --- a/prebid-mobile/pbm-api/ios/pbm-adunit-ios.md +++ b/prebid-mobile/pbm-api/ios/pbm-adunit-ios.md @@ -53,14 +53,88 @@ PB Ad Slot is an identifier tied to the placement the ad will be delivered in. T Trigger a call to Prebid Server to retrieve demand for this Prebid Mobile ad unit. +#### Mopub or GAM + +By default, Prebid SDK uses inflection to determine the publisher ad server, one of Mopub or Google Ad Manager (GAM), to convert Prebid's targeting keys (PBS bid keys, host and cache key) to trigger targeted line items. To render ads in ad servers other than Mopub or GAM, use the next section's 3rd party ad server support feature. + **Parameters** `adObject`: adServer object to which the Prebid keys need to be attached. `completion`: Closure which receives one argument, the enum `ResultCode`. There is no return value. -{% include alerts/alert_warning.html content="Ad Unit *User* keywords will be deprecated in favor of [targeting keywords](pbm-targeting-ios#user-keywords) for Prebid versions 1.2+. Support will continue for Ad Unit User Keywords as users migrate to targeting user keywords." %} +#### 3rd Party Ad Server + +The default ad servers for Prebid's Mobile SDK are MoPub and GAM. The SDK can be expanded to include support for 3rd party ad servers through the fetchDemand function. This function returns the Prebid Server bidder key/values (targeting keys), which can then be passed to the ad server of choice. + +In this mode, the publisher will be responsible for the following actions: +* Call fetchDemand with extended targetingDict callback +* Retrieve targeting keys from extended fetchDemand function +* Convert targeting keys into the format for your ad server +* Pass converted keys to your ad server +* Render ad with Prebid Universal Creative or custom renderer + + +**Function callbacks** + +* `ResultCode`: enum [result codes](https://docs.prebid.org/prebid-mobile/pbm-api/ios/pbm-api-result-codes-ios.html) +* `targetingDict`: [Prebid Server Response targeting keys](https://docs.prebid.org/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#targeting) + + +``` +func fetchDemand(completion: @escaping(_ result: ResultCode, _ kvResultDict: [String : String]?) -> Void) +``` + +Examples: + +Swift +```swift +func loadBanner() { + + //adUnit is BannerAdUnit type + adUnit.fetchDemand { [weak self] (resultCode: ResultCode, targetingDict: [String : String]?) in + + self?.adServerRequest.customTargeting = targetingDict + self?.adServerBanner.load(self?.adServerRequest) + } +} + + +func loadRewardedVideo() { + let adUnit = RewardedVideoAdUnit(configId: "1001-1") + adUnit.fetchDemand { [weak self] (resultCode: ResultCode, targetingDict: [String : String]?) in + + //Publisher should provide support for converting keys into format of 3rd party ad server and loading ads + let keywords = convertDictToAdServerKeywords(dict: targetingDict) + AdServerLoadAds.loadAd(withAdUnitID: "46d2ebb3ccd340b38580b5d3581c6434", keywords: keywords) + } +} +``` + +Objective-C +```objective-C +-(void) loadAdServerBanner { + + //adUnit is BannerAdUnit Type + [self.adUnit fetchDemandWithCompletion:^(enum ResultCode resultCode, NSDictionary * _Nullable targetingDict) { + + [self.request setCustomTargeting:targetingDict]; + [self.adServerView loadRequest:self.request]; + }]; +} + +-(void) loadAdServerRewardedVideo { + + //adUnit is RewardedVideoAdUnit Type + [adUnit fetchDemandWithCompletion:^(enum ResultCode resultCode, NSDictionary * _Nullable targetingDict) { + + NSString *keywords = [Utils.shared convertDictToMoPubKeywordsWithDict:targetingDict]; + [adServerRewardedVideo loadRewardedVideoAdWithAdUnitID:@"46d2ebb3ccd340b38580b5d3581c6434" keywords:keywords ]; + + }]; +} +``` ### addUserKeyword diff --git a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md index deb7bbfa52..334587b370 100644 --- a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md +++ b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md @@ -151,6 +151,77 @@ Targeting.shared.itunesID Targeting.shared.itunesID = itunesID ``` +### Open Measurment SDK (OMSDK) + +OMSDK is designed to facilitate 3rd party viewability and verification measurement for ads served in mobile app enviroments. Prebid SDK will provide the signaling component to Bid Adapters, by way of Prebid Server, indicating the impression is elligible for OMSDK support. Prebid SDK does not currently integrate with OMSDK itself, instead it will rely on a publisher ad server to render viewability and verification measurement code. + +There three components to signaling support for OMSDK: +* Partner Name +* Partner Version +* API code + +**Partner Name** + +This will be the [IAB OMSDK compliant partner name](https://complianceomsdkapi.iabtechlab.com/compliance/latest) responsible for integrating with the OMSDK spec. See below for configuration and examples + +#### omidPartnerName +Open Measurement partner name. + +``` +Targeting.shared.omidPartnerName +``` + +Examples: + +Swift +```swift +Targeting.shared.omidPartnerName = "Google" +``` + +Objective C +```objective_c +Targeting.shared.omidPartnerName = @"Google"; +``` + + +**Partner Version** + +The OMSDK version number the partner integrated with. See below for configuration and examples. + + +#### omidPartnerVersion +Partner's OMSDK version number implementation +``` +Targeting.shared.omidPartnerVersion +``` + +Examples: + +Swift +```swift +Targeting.shared.omidPartnerVersion = "1.0" +``` + +Objective C +```objective_c +Targeting.shared.omidPartnerVersion = @"1.0"; +``` + +**API Code** + +Per OpenRTB 2.5, support for OMSDK is signaled using the imp.[media type].api field represented in Prebid SDK withing each ad format type under the parameters object. Refer to the documentation of the respective ad unit class. + +Example: +``` +let bannerUnit = BannerAdUnit(configId: "6ace8c7d-88c0-4623-8117-75bc3f0a2e45", size: CGSize(width: 300, height: 250)) +let parameters = BannerAdUnit.Parameters() +parameters.api = [Signals.Api(7)] +adUnit.setParameters(parameters); +``` + + + + ## Inventory (Context) Keywords Context Keywords are a list of keywords about the app as referenced in OpenRTB 2.5 as app.keywords. Any keyword passed in the context keyword field may be passed to the buyer for targeting. 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 d5f4d30669..c98333cf3c 100644 --- a/prebid-mobile/privacy-regulation.md +++ b/prebid-mobile/privacy-regulation.md @@ -36,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. @@ -53,6 +53,93 @@ 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) @@ -81,5 +168,8 @@ The job of the Prebid SDK will: - 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 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..4f35c310c8 --- /dev/null +++ b/prebid-server/developers/add-new-bidder-go.md @@ -0,0 +1,266 @@ +--- +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 Request Standards + +Prebid clients ([Prebid.js](/use-cases/pbs-pbjs.html), [Prebid SDK](/use-cases/pbs-sdk.html), and [AMP](/use-cases/pbs-amp.html)) pass a number of parameters +that bid adapters should take into account: + +- Currency: The publisher's desired bid currency is in the OpenRTB `cur` field. If your bid is in a different currency, you must set the bid currency in the response. +- Bid Floor: `imp[].bidfloor` and `imp[].bidfloorcur` - please make use of this value before responding with a bid. +- First Party Data: bidders should look in these locations for first party data: `imp[].ext.context.data.*`, `site.ext.data.*`, `app.ext.data.*`, and `user.ext.data.*`. +- Supply Chain: `source.ext.schain` +- GDPR: `regs.ext.gdpr` and `user.ext.consent` +- CCPA: `regs.ext.us_privacy` +- COPPA: `regs.coppa` +- Test: Bidders should be aware that the OpenRTB `test` flag indicates non-production traffic. + +### 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..5a4d296f70 --- /dev/null +++ b/prebid-server/developers/add-new-bidder-java.md @@ -0,0 +1,217 @@ +--- +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 Request Standards + +Prebid clients ([Prebid.js](/use-cases/pbs-pbjs.html), [Prebid SDK](/use-cases/pbs-sdk.html), and [AMP](/use-cases/pbs-amp.html)) pass a number of parameters +that bid adapters should take into account: + +- Currency: The publisher's desired bid currency is in the OpenRTB `cur` field. I +f your bid is in a different currency, you must set the bid currency in the respo +nse. +- Bid Floor: `imp[].bidfloor` and `imp[].bidfloorcur` - please make use of this v +alue before responding with a bid. +- First Party Data: bidders should look in these locations for first party data: `imp[].ext.context.data.*`, `site.ext.data.*`, `app.ext.data.*`, and `user.ext.data.*`. +- Supply Chain: `source.ext.schain` +- GDPR: `regs.ext.gdpr` and `user.ext.consent` +- CCPA: `regs.ext.us_privacy` +- COPPA: `regs.coppa` +- Test: Bidders should be aware that the OpenRTB `test` flag indicates non-production traffic. + +### 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..5f7de31627 --- /dev/null +++ b/prebid-server/developers/pbs-cookie-sync.md @@ -0,0 +1,116 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Developer | User ID Sync + +--- + +# Prebid Server User ID Sync +{: .no_toc} + +* TOC +{:toc} + +## 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"} +``` + +## Setting the uids Cookie + +### Setting the uids cookie from Prebid.js + +Here's how these IDs get placed in the cookie from Prebid.js: + +![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. + +### Setting the uids cookie from 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. + + +## Bidder Instructions for 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. + +## Further Reading + +- [Prebid Server Overview](/prebid-server/overview/prebid-server-overview.html) +- [Prebid.js s2sConfig](/dev-docs/publisher-api-reference.html#setConfig-Server-to-Server) +- [Prebid AMP Implementation Guide](/dev-docs/show-prebid-ads-on-amp-pages.html) 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 61% rename from prebid-server/endpoints/openrtb2/amp.md rename to prebid-server/endpoints/openrtb2/pbs-endpoint-amp.md index c20521725e..6dd89dfe28 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 (PBS-Java only) | +| 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`. @@ -70,6 +80,84 @@ An example Stored Request is given below: } ``` +#### First Party Data + +(Currently only supported in PBS-Java) + +You can send first party data into an AMP request by encoding a JSON +targeting block like this: + +``` +GET /openrtb2/amp?tag_id=7470-Eater_AMP_ROS_ATF&w=300&h=250&ow=&oh=&ms=&slot=%2F172968584%2Feater%2Fgoogle%2Famp_med_rec_02&targeting=%7B%22site%22%3A%7B%22keywords%22%3A%22article%2C%20las%20vegas%22%2C%22cat%22%3A%7B%22blah%22%3A%221%22%7D%2C%22other-attribute%22%3A%22other-value%22%2C%22ext%22%3A%7B%22data%22%3A%7B%22entry_group%22%3A%5B%22front-page%22%2C%22featured-stories%22%5D%2C%22page_type%22%3A%22AMP%22%7D%7D%7D%2C%22user%22%3A%7B%22gender%22%3A%22m%22%7D%2C%22bidders%22%3A%5B%22rubicon%22%2C%22appnexus%22%5D%2C%22keywords%22%3A%22las%20vegas%20hospitality%20employees%22%2C%22foo%22%3A%7B%22bar%22%3A%22baz%22%7D%7D... +``` + +Prebid Server will expand the targeting value and merge the data into +the resulting OpenRTB JSON for the appropriate bidders. + +For example, if this AMP targeting is provided: +``` +{ + "site": { + "keywords": "article, las vegas", // (1) + "cat": { "blah": "1" }, // invalid data type, will be dropped + "other-attribute": "other-value", // not openrtb2, remove + "ext": { + "data": { + "entry_group": ["front-page","featured-stories"], // (4) + "page_type": "AMP" // (5) + } + } + }, + "user": { + "gender": "m", // (2) + }, + "bidders": ["rubicon","appnexus"], // (3) + "keywords": "las vegas hospitality employees", // (6) + "foo": { // (7) + "bar": "baz" + } +} +``` +The numbered elements from the raw targeting data above are merged into the resulting OpenRTB like this: +``` +{ + "imp": [...], + "site": { + "publisher": { … }, + "keywords": "article, las vegas" // (1) + "ext":{ + "data": { + "entry_group": ["front-page","featured-stories"], // (4) + "page_type": "AMP" // (5) + } + } + }, + "user": { + "gender": "m" // (2) + }, + "ext": { + "prebid": { + "data": { + "bidders": ["rubicon",appnexus"], // (3) + } + } + }, + "imp": [ + ... + "ext": { + "context": { + "data": { + "keywords": "las vegas hospitality employees", // (6) + "foo": { // (7) + "bar": "baz" + } + } + } + } + ] +} +``` + ### Response A sample response payload looks like this: @@ -113,7 +201,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 +226,9 @@ The following errors can occur when loading a stored OpenRTB request for an inco -### Query Parameters +### Query Parameter Details -This endpoint supports the following query parameters: - -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 +236,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 +272,8 @@ 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) +- [Prebid Server First Party Data](/prebid-server/features/pbs-fpd.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..15f77672ab --- /dev/null +++ b/prebid-server/endpoints/pbs-endpoint-admin.md @@ -0,0 +1,151 @@ +--- +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 +} +``` + +## /logging/httpinteraction + +(PBS-Java only) + +This endpoint turns on temporary logging of raw HTTP requests and responses, mainly for troubleshooting production issues. + +Interaction is logged at INFO level using http-interaction logback logger so make sure this logger has at least INFO or more verbose level set (logback configuration bundled in JAR file sets this logger to INFO level). + +Query Params +- endpoint - endpoint to be affected; valid values: auction, amp; if omitted all valid endpoints will be affected +- statusCode - specifies that only interactions resulting in this response status code should be logged; valid values: >=200 and <=500 +- account - specifies that only interactions involving this account should be logged +- limit - number of interactions to log; there is an upper threshold for this value set in configuration + +## /logging/changelevel + +(PBS-Java only) + +This endpoint allows changing org.prebid.server logger level temporarily, mainly for troubleshooting production issues. + +Query Params +- level - desired logging level to set; must be one of error, warn, info, debug +- duration - for how long (in milliseconds) to change level before it gets reset to original; there is an upper threshold for this value set in configuration + 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..18683d93b4 --- /dev/null +++ b/prebid-server/features/pbs-feature-idx.md @@ -0,0 +1,64 @@ +--- +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/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/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. | | | +| Operations | [Request Logging Admin Endpoints](/troubleshooting/pbs-troubleshooting.html#request-logging) | Log a limited number of requests to understand the raw data clients are sending. | | | diff --git a/prebid-server/features/pbs-fpd.md b/prebid-server/features/pbs-fpd.md new file mode 100644 index 0000000000..a488c46dac --- /dev/null +++ b/prebid-server/features/pbs-fpd.md @@ -0,0 +1,130 @@ +--- +layout: page_v2 +sidebarType: 5 +title: First Party Data - Prebid Server +--- + +# First Party Data - Prebid Server +{: .no_toc} + +* TOC +{:toc} + +Prebid allows publishers to supply attributes related to their content +and users, and to apply permissions so only certain bidders are allowed +to access those attributes. + +{: .alert.alert-warning :} +For now, this feature is only supported in PBS-Java and these conventions aren't implemented by all adapters. Please +check with each of your bidders to make sure they're reading first +party data from the standard Prebid locations. + +## How It Works + +Each of the three main sources of Prebid Server traffic will place +First Party Data in the OpenRTB JSON in several places: + +{: .table .table-bordered .table-striped } +| OpenRTB Attribute | Description | PBJS Source | SDK Source | AMP Source | +| --- | --- | --- | --- | --- | +| site.ATTR | Only standard OpenRTB attributes should be here: name, domain, cat, sectioncat, pagecat, page, ref, search, keywords. | config.fpd.context.ATTR | n/a | site.ATTR | +| site.ext.data.ATTR | Any other site-related attributes should go here. | config.fpd.context.data | n/a | site.ext.data.ATTR | +| app.ext.data.ATTR | Any app-related attributes should go here. | n/a | Targeting addContextData() | n/a | +| user.ATTR | Only standard OpenRTB attributes should be here: yob, gender, keywords. | config.fpd.user.ATTR | n/a | user.ATTR | +| user.ext.data.ATTR | Any other user-related attributes should go here. | config.fpd.user.data.ATTR | Targeting addUserData() | user.ext.data.ATTR | +| imp[].ext.context.data.ATTR | AdUnit-specific attributes should go here. | AdUnit.fpd.context | AdUnit addContextData() | n/a | +| ext.prebid.data.bidders[] | If specified, only these bidders are allowed to see fields in {site/app/user}.ext.data. | n/a | addBidderToAccessControlList() | bidders | +| ext.prebid.bidderconfig | Bidder-specific config | [setBidderConfig()](/dev-docs/publisher-api-reference.html#module_pbjs.setBidderConfig) | n/a | n/a | + +This diagram summarizes how first party data flows into the OpenRTB JSON: + +![First Party Data Summary](/assets/images/flowcharts/FirstPartyData-Detailed.png){: .pb-lg-img :} + +{: .alert.alert-info :} +Note that Prebid.js supports the [`setBidderConfig`](/dev-docs/publisher-api-reference.html#module_pbjs.setBidderConfig) method of defining +bidder-specific first party data, while SDK and AMP only support the `ext.prebid.data.bidders[]` approach. + +## OpenRTB Examples + +In this example, only BidderA has access to the global first party data: +``` +{ + ext: { + prebid: { + data: { bidders: [ "bidderA" ] } // limit bidders that receive global data + } + }, + site: { + keywords: "", + search: "", + ext: { + data: { + // only seen by bidderA as named in ext.prebid.data.bidders[] + GLOBAL CONTEXT DATA + } + } + }, + user: { + keywords: "", + gender: "", + yob: 1999, + geo: {}, + ext: { + data: { + // only seen by bidderA as named in ext.prebid.data.bidders[] + GLOBAL USER DATA + } + } + }, + imp: [ + ... + ext: { + context: { + keywords: "", + search: "", + data: { + // everyone sees this data + ADUNIT SPECIFIC CONTEXT DATA + } + } + } + ] +} +``` + +This example shows an array of bidder-specific config: +``` +{ + ext: { + prebid: { + bidderconfig: [ { + bidders: [ 'bidderA', 'bidderB' ], + config: { + fpd: { site: { ... }, user: { ...} } + } + },{ + bidders: [ 'bidderC' ], + config: { + fpd: { site: { ... }, user: { ...} } + } + }] + } + } +} +``` + +## How Server-Side Bid Adapters Read First Party Data + +Bid adapters don't need to worry about whether the request came from +Prebid.js, the SDK, or AMP -- everything is merged into the OpenRTB JSON. If a bid adapter receives first party data on any of the fields noted in +the table above, they can simply pass that data to their endpoint in +the expected way. + +In other words, just be aware of site.ext.data.ATTR, app.ext.data.ATTR, user.ext.data.ATTR, +and imp[].ext.context.data.ATTR and either pass them straight through or map +attributes to where your endpoints expect them. + +## Further Reading + +- [Prebid.js First Party Data](/features/firstPartyData.html) +- [Prebid Server and AMP](/prebid-server/use-cases/pbs-amp.html) 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/features/pbs-privacy.md b/prebid-server/features/pbs-privacy.md new file mode 100644 index 0000000000..dd31507d47 --- /dev/null +++ b/prebid-server/features/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. Currently PBS requires the host company to have a GVL-ID or the setting of the `uids` cookie in GDPR scope will fail. +- The default expiration time of the uids cookie set in the host company domain should be defined to match what's in the TCF 2.1 `maxCookieAgeSeconds` GVL field. +- 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/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/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..89f1fe8603 --- /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 a header bidding 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](https://prebid.org/membership/) 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..cfa2db3d5d --- /dev/null +++ b/prebid-server/use-cases/pbs-amp.md @@ -0,0 +1,219 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Use Cases | AMP + +--- + +# Use Case: Prebid Server | AMP +{: .no_toc} + +* TOC +{:toc} + +[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). + +``` + + +``` + +{: .alert.alert-info :} +**Note:** the `prebidrubicon` and `prebidappnexus` AMP vendor strings define slightly different parameters; AppNexus uses "PLACEMENT_ID" as the argument to rtc-config while Rubicon uses "REQUEST_ID". They both translate to `tag_id` when passed to Prebid Server. + +- 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 a67ce223f8..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.

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 deleted file mode 100644 index 7a35f0ea04..0000000000 --- a/prebid/managed.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -layout: page_v2 -title: Managed Prebid -description: Managed Prebid -sidebarType: 0 ---- - -# Managed Prebid Solutions -{:.no_toc} - -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 9ec879476c..068e50e609 100644 --- a/prebid/prebidjsReleases.md +++ b/prebid/prebidjsReleases.md @@ -16,6 +16,15 @@ The table below is a summary of feature changes and important bug fixes in core {: .table .table-bordered .table-striped } | Release | Feature | | --- | --- | +| 4.8 | GDPR updates around modules and storage manager. | +| 4.6 | Removed cmpuishown event for TCF2 logic | +| 4.5 | Price Floors: Add bid object into cpmAdjustment function | +| 4.4 | DFP Video Module supports VAST 4 | +| 4.3 | DFP Video Module bug fixed | +| 4.1.1 | Release of the [GPT Pre-Auction Module](https://docs.prebid.org/dev-docs/modules/gpt-pre-auction.html). Price Floors: new signals (location: noData + floorProvider) | +| 4.0 | TCF Purpose 1 and Purpose 2 enforced by default when GDPR enforcement module turned on. Removed Digitrust userId module. Removed audienceNetworkBidAdapter. | +| 3.27.1 | DFP Video Module bug fixed | +| 3.27 | An important bug in the DFP Video Module was introduced with this release and fixed in 4.3 and 3.27.1. The dfpVideoModule only looked in adunit.sizes but adunit.sizes was stripped. Unfortunately there's not a workaround - if you use that video module, you shouldn't use Prebid.js 3.27 through 4.2 inclusive. | | 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 | 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/support/index.md b/support/index.md index 746ab735cd..a6db9daf8e 100644 --- a/support/index.md +++ b/support/index.md @@ -23,7 +23,7 @@ For questions about how an adapter works, it's best to reach out to the company For Prebid news or general questions, we recommend the Ad Ops Slack Channel, Quora, or Twitter. {: .alert.alert-success :} -There are serveral Prebid.org members that will install & maintain Prebid on a publisher's behalf. See the list of [Managed Prebid Solutions](/prebid/managed.html). +There are serveral Prebid.org members that will install & maintain Prebid on a publisher's behalf. See the list of [Managed Prebid Solutions](https://prebid.org/product-suite/managed-services/). ## GitHub diff --git a/troubleshooting/pbs-troubleshooting.md b/troubleshooting/pbs-troubleshooting.md index 0a1abab007..4175cd2f47 100644 --- a/troubleshooting/pbs-troubleshooting.md +++ b/troubleshooting/pbs-troubleshooting.md @@ -121,6 +121,22 @@ Could result in this response, assuming that the IDs exist in the database table } {% endhighlight %} +## Request Logging + +(PBS-Java only) + +Sometimes you want to see what's coming into the server before being processed by PBS. +If the admin endpoints are enabled and you have the admin endpoint password, you can +hit these two URLs with the desired parameter values: + +- https://HOST/logging/[changelevel](/prebid-server/endpoints/pbs-endpoint-admin.html#loggingchangelevel)?level=debug&duration=10000 +- https://HOST/logging/[httpinteraction](/prebid-server/endpoints/pbs-endpoint-admin.html#logginghttpinteraction)?limit=100&endpoint=auction&account=1111 + +Then you can check server logs for output like: +``` +http-interaction : Requested URL: "/openrtb2/auction?debug=1", request body: "{ ... }" +``` + ## Related Topics {:.no_toc} 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/wrapper_code_of_conduct.md b/wrapper_code_of_conduct.md index 81c4bf654a..608521d72b 100644 --- a/wrapper_code_of_conduct.md +++ b/wrapper_code_of_conduct.md @@ -57,3 +57,4 @@ This Wrapper Code of Conduct establishes the principles by which we believe head + [Project Principles]({{site.baseurl}}/principles.html) + [Getting Started]({{site.baseurl}}/overview/getting-started.html) ++ [Prebid.org Community Code of Conduct](https://prebid.org/code-of-conduct/)