From 20da552d5a46ea1d9a1b2def09559280ac956e39 Mon Sep 17 00:00:00 2001 From: ashleysmithTTD <157655209+ashleysmithTTD@users.noreply.github.com> Date: Tue, 28 May 2024 03:33:44 -0600 Subject: [PATCH 01/46] added documentation on how to disable cstg flag if needed (#5325) * added documentation on how to disable cstg flag if needed * making a branch * removed euid space * removed unnecesarry dollar signs * added bash language --- dev-docs/modules/userid-submodules/euid.md | 6 ++++++ dev-docs/modules/userid-submodules/unified2.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/dev-docs/modules/userid-submodules/euid.md b/dev-docs/modules/userid-submodules/euid.md index 7e279c9cf1..7551b53fa0 100644 --- a/dev-docs/modules/userid-submodules/euid.md +++ b/dev-docs/modules/userid-submodules/euid.md @@ -103,6 +103,12 @@ pbjs.setConfig({ There is a server-only mode where the value of the advertising token can be provided either directly (see the `value` parameter in the [European Unified ID Configuration](#european-unified-id-configuration) section) or via a cookie. In this mode, no attempt is made to automatically refresh the token. +For a server-side integration, you can create a smaller Prebid.js build by disabling client-side integration functionality. To do this, pass the `--disable UID2_CSTG` flag: + +```bash + gulp build --modules=euidIdSystem --disable UID2_CSTG +``` + ### Cookie-based server-only mode To use the cookie-based server-only mode, set a cookie named `__euid_advertising_token` to the value of the advertising token only, as shown in this fictitious example: diff --git a/dev-docs/modules/userid-submodules/unified2.md b/dev-docs/modules/userid-submodules/unified2.md index f2d2f23549..c61b98bec0 100644 --- a/dev-docs/modules/userid-submodules/unified2.md +++ b/dev-docs/modules/userid-submodules/unified2.md @@ -55,6 +55,12 @@ To use the cookie-based server-only mode, set a cookie named `__uid2_advertising `__uid2_advertising_token=eb33b0cb-8d35-4722-b9c0-1a31d4064888` +For a server-side integration, you can create a smaller Prebid.js build by disabling client-side integration functionality. To do this, pass the `--disable UID2_CSTG` flag: + +```bash + gulp build --modules=uid2IdSystem --disable UID2_CSTG +``` + ## Unified ID 2.0 Configuration The following parameters apply only to the Unified ID 2.0 module integration. From 66f7e498e28031ae3930a34bfd881fc3a0676294 Mon Sep 17 00:00:00 2001 From: kampungkat <139214234+kampungkat@users.noreply.github.com> Date: Tue, 28 May 2024 17:38:35 +0800 Subject: [PATCH 02/46] moved adzymic.md and fixed typos (#5341) --- dev-docs/{ => bidders}/adzymic.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) rename dev-docs/{ => bidders}/adzymic.md (88%) diff --git a/dev-docs/adzymic.md b/dev-docs/bidders/adzymic.md similarity index 88% rename from dev-docs/adzymic.md rename to dev-docs/bidders/adzymic.md index 585db1c6ee..e05d58752d 100644 --- a/dev-docs/adzymic.md +++ b/dev-docs/bidders/adzymic.md @@ -6,13 +6,16 @@ biddercode: adzymic pbjs: true pbs: false aliasCode: appnexus -gdpr_supported: true +tcfeu_supported: true +usp_supported: false +coppa_supported: false +gpp_supported: false media_types: banner, video, native safeframes_ok: false multiformat_supported: will-bid-on-any gvl_id: 723 schain_supported: true -userId: all +userIds: all sidebarType: 1 --- ### Bid Params From 080b7046eae7981895fd2fd6049ef97566aeac6f Mon Sep 17 00:00:00 2001 From: ahmadlob <109217988+ahmadlob@users.noreply.github.com> Date: Tue, 28 May 2024 12:48:39 +0300 Subject: [PATCH 03/46] support-dchain (#5338) --- dev-docs/bidders/taboola.md | 1 + 1 file changed, 1 insertion(+) diff --git a/dev-docs/bidders/taboola.md b/dev-docs/bidders/taboola.md index 8ae4fe2cd5..ed1ced43f7 100644 --- a/dev-docs/bidders/taboola.md +++ b/dev-docs/bidders/taboola.md @@ -10,6 +10,7 @@ usp_supported: true coppa_supported: true gpp_supported: true schain_supported: false +dchain_supported: true media_types: banner gvl_id: 42 prebid_member: true From 6c3f3cfe0d85042a97ccbb661c9fe917241796f9 Mon Sep 17 00:00:00 2001 From: Baptiste Haudegand <89531368+github-baptiste-haudegand@users.noreply.github.com> Date: Tue, 28 May 2024 14:34:35 +0200 Subject: [PATCH 04/46] Update Teads documentation for supported GPP privacy laws (#5336) --- dev-docs/bidders/teads.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-docs/bidders/teads.md b/dev-docs/bidders/teads.md index 3099d222e9..3847370dc7 100644 --- a/dev-docs/bidders/teads.md +++ b/dev-docs/bidders/teads.md @@ -20,7 +20,7 @@ multiformat_supported: will-not-bid ortb_blocking_supported: true floors_supported: true coppa_supported: true -gpp_sids: false +gpp_sids: tcfeu, usp fpd_supported: false sidebarType: 1 --- From c6b3d16c080cbe05e48ae51973338f896063ac9f Mon Sep 17 00:00:00 2001 From: jkneiphof <64132960+jkneiphof@users.noreply.github.com> Date: Tue, 28 May 2024 17:53:54 +0200 Subject: [PATCH 05/46] Welect Bid Adapter: initial release (#5352) --- dev-docs/bidders/welect.md | 55 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 dev-docs/bidders/welect.md diff --git a/dev-docs/bidders/welect.md b/dev-docs/bidders/welect.md new file mode 100644 index 0000000000..40879ba494 --- /dev/null +++ b/dev-docs/bidders/welect.md @@ -0,0 +1,55 @@ +--- +layout: bidder +title: Welect +description: Prebid Welect Bidder Adaptor +pbjs: true +biddercode: welect +media_types: no-display, video +userIds: false +tcfeu_supported: true +gvl_id: 282 +gpp_sids: tcfeu +usp_supported: false +coppa_supported: false +schain_supported: false +dchain_supported: false +safeframes_ok: false +fpd_supported: false +floors_supported: false +ortb_blocking_supported: false +multiformat_supported: will-bid-on-one +privacy_sandbox: none +sidebarType: 1 + +--- + +### Note +The Welect bidder adapter requires setup and approval from the Welect team. Please reach out to [dev@welect.de](mailto:dev@welect.de) for more information. + +### Bid params + +{: .table .table-bordered .table-striped } +| Name | Description | Example | Type | +|---|---|---|---| +| `placementId` | an identifier for your placement, provided by Welect | `'exampleID'` | `string` | +| `domain` | The domain of your placement | `'www.example.com'` | `string` | + +### Example Ad Unit Setup + +```javascript +var adUnits = [ + { + bidder: 'welect', + params: { + placementId: 'exampleId', + domain: 'www.welect.de' + }, + sizes: [[640, 360]], + mediaTypes: { + video: { + context: 'instream' + } + }, + }; +]; +``` From 7a092c3563511be96a80aff0bcab441e3bde9507 Mon Sep 17 00:00:00 2001 From: bretg Date: Wed, 29 May 2024 09:56:49 -0400 Subject: [PATCH 06/46] PBS auction multiformat default update (#5355) --- prebid-server/endpoints/openrtb2/pbs-endpoint-auction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.md b/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.md index be831ef08d..ecc266f5ee 100644 --- a/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.md +++ b/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.md @@ -1526,7 +1526,7 @@ ext.prebid.biddercontrols: { Here's how this works: -1. If the bid adapter YAML declares support of multiformat, then `prefmtype` is ignored in the request. The default value of multiformat supported is `true` in PBS 2.0, but will be `false` in PBS 3.0. +1. If the bid adapter YAML declares support of multiformat, then `prefmtype` is ignored in the request. The default value of multiformat supported is `true`. 1. If the bidder declares that they don't support multiformat and the incoming request contains multiple formats, then one of the formats is chosen by either `$.ext.prebid.biddercontrols.BIDDER.prefmtype` or config `auction.preferredmediatype.BIDDER` #### OpenRTB Response Extensions From 6444ee7899807233d77a4afa006fe21db7a21c15 Mon Sep 17 00:00:00 2001 From: bretg Date: Wed, 29 May 2024 11:47:43 -0400 Subject: [PATCH 07/46] mobile targeting params update (#5304) * mobile targeting params update * lint * lint * lint * lint * updated title * mobile parameters update, broken link fixing * lint * lint * sorted targeting methods * cleaning up TBDs * account settings ID * lint * added mobile faq to top menu * fix copy-paste --- _data/dropdown_v2.yml | 9 + _data/sidebar.yml | 32 +- adops/before-you-start.md | 1 - adops/js-dynamic-creative.md | 2 +- dev-docs/modules/azerionedgeRtdProvider.md | 4 +- dev-docs/modules/gppControl_usnat.md | 6 +- features/ac-quebec.md | 2 +- features/firstPartyData.md | 4 +- .../rendering/ios-sdk-integration-gam.md | 6 +- ...ndroid-sdk-integration-gam-original-api.md | 294 ++----- .../android/code-integration-android.md | 59 +- .../pbm-api/android/pbm-plugin-renderer.md | 2 +- .../android/pbm-targeting-params-android.md | 779 +++++++++++++----- .../pbm-api/ios/code-integration-ios.md | 66 +- .../ios-sdk-integration-gam-original-api.md | 241 ++---- .../pbm-api/ios/pbm-targeting-ios.md | 487 +++++++---- .../prebid-mobile-getting-started.md | 100 ++- .../prebid-mobile-privacy-regulation.md | 30 +- prebid-mobile/prebid-mobile.md | 40 +- prebid-server/developers/add-a-module-go.md | 6 +- prebid-server/pbs-modules/index.md | 2 +- 21 files changed, 1244 insertions(+), 928 deletions(-) diff --git a/_data/dropdown_v2.yml b/_data/dropdown_v2.yml index 9e8f7102dc..b8c2f365e7 100644 --- a/_data/dropdown_v2.yml +++ b/_data/dropdown_v2.yml @@ -276,6 +276,15 @@ sectionName: Support title: Prebid Server link: /faq/prebid-server-faq.html + needsDivider: 0 + isHeader: 0 + isSubSectionStart: 0 + + - subsectionId: 3 + sectionId: 2 + sectionName: Support + title: Prebid Mobile + link: /faq/prebid-mobile-faq.html needsDivider: 1 isHeader: 0 isSubSectionStart: 0 diff --git a/_data/sidebar.yml b/_data/sidebar.yml index 8dd030909a..ae817d8622 100644 --- a/_data/sidebar.yml +++ b/_data/sidebar.yml @@ -743,6 +743,14 @@ sectionTitle: subgroup: 2 +- sbSecId: 2 + title: Global Parameters + link: /prebid-mobile/pbm-api/ios/pbm-targeting-ios.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 2 + - sbSecId: 2 title: GAM Original Integration link: /prebid-mobile/pbm-api/ios/ios-sdk-integration-gam-original-api.html @@ -783,14 +791,6 @@ sectionTitle: subgroup: 2 -- sbSecId: 2 - title: Targeting Parameters - link: /prebid-mobile/pbm-api/ios/pbm-targeting-ios.html - isHeader: 0 - isSectionHeader: 0 - sectionTitle: - subgroup: 2 - - sbSecId: 2 title: Ad Experience Controls link: /prebid-mobile/modules/rendering/combined-ad-experience-controls.html @@ -824,6 +824,14 @@ sectionTitle: subgroup: 3 +- sbSecId: 2 + title: Global Parameters + link: /prebid-mobile/pbm-api/android/pbm-targeting-params-android.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 3 + - sbSecId: 2 title: GAM Original Integration link: /prebid-mobile/pbm-api/android/android-sdk-integration-gam-original-api.html @@ -864,14 +872,6 @@ sectionTitle: subgroup: 3 -- sbSecId: 2 - title: Targeting Parameters - link: /prebid-mobile/pbm-api/android/pbm-targeting-params-android.html - isHeader: 0 - isSectionHeader: 0 - sectionTitle: - subgroup: 3 - - sbSecId: 2 title: Ad Experience Controls link: /prebid-mobile/modules/rendering/combined-ad-experience-controls.html diff --git a/adops/before-you-start.md b/adops/before-you-start.md index 23b075abe2..056e917932 100644 --- a/adops/before-you-start.md +++ b/adops/before-you-start.md @@ -7,7 +7,6 @@ sbUUID: 3.2 --- # Ad Ops and Prebid - {: .no_toc } Ad Operations (Ad Ops) are the people who work directly with the ad server software to create, analyze, and update ad campaigns. In companies that use automated processes rather than working directly in the ad server UI, people in Ad Ops define the inputs to the automation that ensure campaigns run as expected. Whatever your actual job title or exact job description, when we refer to “Ad Ops” we’re talking about the non-engineering tasks involved in running and managing ad campaigns. diff --git a/adops/js-dynamic-creative.md b/adops/js-dynamic-creative.md index 3eb5fc493a..8ead0d2d7e 100644 --- a/adops/js-dynamic-creative.md +++ b/adops/js-dynamic-creative.md @@ -40,6 +40,6 @@ To render native ads, you also need to include the [nativeRendering](/dev-docs/m ## Further reading -- [Creative Considerations](/adops/creative-considerations.md) +- [Creative Considerations](/adops/creative-considerations.html) - [Prebid Universal Creative](/overview/prebid-universal-creative.html) - [Native rendering module](/dev-docs/modules/nativeRendering.html) diff --git a/dev-docs/modules/azerionedgeRtdProvider.md b/dev-docs/modules/azerionedgeRtdProvider.md index 58778d0666..2c3da1eb4d 100644 --- a/dev-docs/modules/azerionedgeRtdProvider.md +++ b/dev-docs/modules/azerionedgeRtdProvider.md @@ -20,7 +20,7 @@ Client-side contextual cookieless audiences. Azerion Edge RTD module helps publishers to capture users' interest audiences on their site, and attach these into the bid request. -Please contact [edge@azerion.com](edge@azerion.com) for more information. +Please contact for more information. Maintainer: [azerion.com](https://www.azerion.com/) @@ -63,7 +63,7 @@ pbjs.setConfig( | :--- | :------- | :------------------ | :--------------- | | name | `String` | RTD sub module name | Always "azerionedge" | | waitForIt | `Boolean` | Required to ensure that the auction is delayed for the module to respond. | Optional. Defaults to false but recommended to true. | -| params.key | `String` | Publisher partner specific key | Mandatory. The key is required for the module to work. If you haven't received one, please reach [support@improvedigital.com](support@improvedigital.com) | +| params.key | `String` | Publisher partner specific key | Mandatory. The key is required for the module to work. If you haven't received one, please reach | | params.bidders | `Array` | Bidders with which to share segment information | Optional. Defaults to "improvedigital". | | params.process | `Object` | Configuration for the Azerion Edge script. | Optional. Defaults to `{}`. | diff --git a/dev-docs/modules/gppControl_usnat.md b/dev-docs/modules/gppControl_usnat.md index b2414c5926..b9de3e0585 100644 --- a/dev-docs/modules/gppControl_usnat.md +++ b/dev-docs/modules/gppControl_usnat.md @@ -21,9 +21,9 @@ sidebarType : 1 ## Overview -This consent management control module is designed to support the [Global Privacy Platform](https://iabtechlab.com/gpp/) Section 7 string, USNat. For more Prebid-related background, see [Prebid MSPA Support](/features/mspa-usnat.html). In sum, the USNat string is intended to unify various state laws into a single privacy string, with participants' behavior governed by the IAB's ([MSPA](https://www.iabprivacy.com/#)). It is intended to complement, not replace, the GPP consent management module, which gathers GPP consent strings and makes them available to vendor integrations. The goal is to gather sensible and conservative [activity controls](/dev-docs/dev-docs/activity-controls.html) for elements of Prebid.js given various expressions of the [USNat consent string](https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/main/Sections/US-National/IAB%20Privacy%E2%80%99s%20National%20Privacy%20Technical%20Specification.md). +This consent management control module is designed to support the [Global Privacy Platform](https://iabtechlab.com/gpp/) Section 7 string, USNat. For more Prebid-related background, see [Prebid MSPA Support](/features/mspa-usnat.html). In sum, the USNat string is intended to unify various state laws into a single privacy string, with participants' behavior governed by the IAB's ([MSPA](https://www.iabprivacy.com/#)). It is intended to complement, not replace, the GPP consent management module, which gathers GPP consent strings and makes them available to vendor integrations. The goal is to gather sensible and conservative [activity controls](/dev-docs/activity-controls.html) for elements of Prebid.js given various expressions of the [USNat consent string](https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/main/Sections/US-National/IAB%20Privacy%E2%80%99s%20National%20Privacy%20Technical%20Specification.md). -This module does not support any other GPP section id or local GPP api. For US state section see the [GPP Control - US State module](/dev-docs/modules/gppControl_usstates.html). In order to control activities in a section without a control module, publishers can express their controls directly in the syntax of the [activity control infrastructure](/dev-docs/dev-docs/activity-controls.html). If a publisher wants finer control over section 7 implications on Prebid.js behavior than this module provides (eg not invalidating certain strings), they are able to achieve that using the activity control syntax as an alternative to this module. +This module does not support any other GPP section id or local GPP api. For US state section see the [GPP Control - US State module](/dev-docs/modules/gppControl_usstates.html). In order to control activities in a section without a control module, publishers can express their controls directly in the syntax of the [activity control infrastructure](/dev-docs/activity-controls.html). If a publisher wants finer control over section 7 implications on Prebid.js behavior than this module provides (eg not invalidating certain strings), they are able to achieve that using the activity control syntax as an alternative to this module. {: .alert.alert-warning :} Prebid functionality created to address regulatory requirements does not replace each party's responsibility to determine its own legal obligations and comply with all applicable laws. **We recommend consulting with your legal counsel before determining how to utilize these features in support of your overall privacy approach. This module is not yet intended to replace other consent modules; it supplements them.** @@ -48,7 +48,7 @@ You can also use the [Prebid.js Download](/download.html) page. - [IAB Global Privacy Platform CMP API Specification](https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/main/Core/CMP%20API%20Specification.md) - [IAB Global Privacy Platform USNat string Specification](https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/main/Sections/US-National/IAB%20Privacy%E2%80%99s%20National%20Privacy%20Technical%20Specification.md) - [Prebid MSPA Support](/features/mspa-usnat.html) -- [Prebid Activity Controls](/dev-docs/dev-docs/activity-controls.html) +- [Prebid Activity Controls](/dev-docs/activity-controls.html) - [Prebid Consent Management - US Privacy Module](/dev-docs/modules/consentManagementUsp.html) - [Prebid Consent Management - GPP Module](/dev-docs/modules/consentManagementGpp.html) - [Prebid Consent Management - GPP Control - US States module](/dev-docs/modules/gppControl_usstates.html) diff --git a/features/ac-quebec.md b/features/ac-quebec.md index 8adeb46692..7a76f77f07 100644 --- a/features/ac-quebec.md +++ b/features/ac-quebec.md @@ -28,8 +28,8 @@ Given this context, Prebid has identified publisher concern that many will not b References: -- [TCF Canada Infographic on Quebec Privacy Law](https://iabcanada.com/content/uploads/2022/04/IAB-Canada_Quebec-Privacy-Law-Inforgraphic.pdf) - [IAB Canada TCF Canada policies](https://iabcanada.com/tcf-canada/for-publishers/) +- [IAB Canada Quebec Privacy Legislation (Law 25) Resource Centre](https://iabcanada.com/iab-standards-and-guidelines/law25-resource-centre/) - [IABTL's GPP Canada section spec](https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/main/Sections/Canada/GPPExtension%3A%20IAB%20Canada%20TCF.md) ## TCF Canada and GPP Support in Prebid.js diff --git a/features/firstPartyData.md b/features/firstPartyData.md index 2d8f0abc3d..135f78e363 100644 --- a/features/firstPartyData.md +++ b/features/firstPartyData.md @@ -52,7 +52,7 @@ If not specified through any of the methods above, Prebid.js attempts to automat {: .table .table-bordered .table-striped } | Field | Value | Notes | |-----------+--------------| -| `site.page` | Site URL, from `pageUrl` falling back to `location.href` | [`pageUrl` config](/dev-docs/publisher-api-reference/setConfig.md#setConfig-Page-URL) | +| `site.page` | Site URL, from `pageUrl` falling back to `location.href` | [`pageUrl` config](/dev-docs/publisher-api-reference/setConfig.html#setConfig-Page-URL) | | `site.ref` | `document.referrer` | | | `site.domain` | Domain portion of `site.page` | | | `site.keywords` | Contents of ``, if such a tag is present on the page | | @@ -65,7 +65,7 @@ If not specified through any of the methods above, Prebid.js attempts to automat | `device.sua` | User agent client hints | [uaHints config](#uaHints) | | `device.ext.webdriver`| `true` if the browser declares to be an automation tool | [Navigator.webdriver](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/webdriver) | | `device.ext.cdep`| Google Chrome cookie deprecation label | [Chrome-facilitated testing](https://developers.google.com/privacy-sandbox/setup/web/chrome-facilitated-testing) | -| `regs.coppa` | COPPA Regulation flag | [COPPA config](/dev-docs/publisher-api-reference/setConfig.md#setConfig-coppa) +| `regs.coppa` | COPPA Regulation flag | [COPPA config](/dev-docs/publisher-api-reference/setConfig.html#setConfig-coppa) | `regs.ext.gpc` | Global Privacy Control setting | [Navigator.globalPrivacyControl](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/globalPrivacyControl) | Publisher-provided first party data always takes precedence for all fields; you can also set `null` to disable them. For example, the following discards the automatically collected `device.keywords`: diff --git a/prebid-mobile/modules/rendering/ios-sdk-integration-gam.md b/prebid-mobile/modules/rendering/ios-sdk-integration-gam.md index c667c79871..26cdd8eb3f 100644 --- a/prebid-mobile/modules/rendering/ios-sdk-integration-gam.md +++ b/prebid-mobile/modules/rendering/ios-sdk-integration-gam.md @@ -6,7 +6,6 @@ sidebarType: 2 --- # GAM with Prebid Rendering - {:.no_toc} The integration of Prebid Rendering API with Google Ad Manager (GAM) assumes that the publisher has an account on GAM and has already integrated the Google Mobile Ads SDK (GMA SDK) into the app project. @@ -200,7 +199,6 @@ Call the method `loadAd()` which will make a bid request to Prebid Server. Wait for the Prebid Server to return an ad and show it to the user in any suitable time. - ```swift // MARK: InterstitialRenderingAdUnitDelegate @@ -217,7 +215,7 @@ GAM setup: 1. Leave the original order and ad units as is. They are not relevant for the rendering approach but they will serve ads for released applications. 2. Create a new GAM ad unit. -3. Setup the new [GAM Order](rendering-gam-line-item-setup.html) for rendering approach. +3. Setup the new [GAM Order](prebid-mobile/modules/rendering/ios-sdk-integration-gam.html) for rendering approach. Integration: @@ -312,7 +310,7 @@ GAM setup: 1. Leave the original order and ad units as is. They are not relevant for the rendering approach but they will serve ads for released applications. 2. Create a new GAM ad unit. -3. Setup the new [GAM Order](rendering-gam-line-item-setup.html) for rendering approach. +3. Setup the new [GAM Order](prebid-mobile/modules/rendering/ios-sdk-integration-gam.html) for rendering approach. Integration: diff --git a/prebid-mobile/pbm-api/android/android-sdk-integration-gam-original-api.md b/prebid-mobile/pbm-api/android/android-sdk-integration-gam-original-api.md index 0c345afff6..4484b2f197 100755 --- a/prebid-mobile/pbm-api/android/android-sdk-integration-gam-original-api.md +++ b/prebid-mobile/pbm-api/android/android-sdk-integration-gam-original-api.md @@ -12,7 +12,7 @@ sidebarType: 2 Prebid Mobile is an open-source library that provides an end-to-end header bidding solution for mobile app publishers. -* TOC +- TOC {:toc} ## Overview @@ -86,9 +86,9 @@ private fun createGAMListener(adView: AdManagerAdView): AdListener { Initialize the `BannerAdUnit` with properties: -* `configId` - an ID of the Stored Impression on the Prebid Server -* `width` - the width of the ad unit which will be used in the bid request. -* `height` - the height of the ad unit which will be used in the bid request. +- `configId` - an ID of the Stored Impression on the Prebid Server +- `width` - the width of the ad unit which will be used in the bid request. +- `height` - the height of the ad unit which will be used in the bid request. #### Step 2: Configure banner parameters {:.no_toc} @@ -100,10 +100,10 @@ Starting from PrebidMobile `2.1.0` the `BannerBaseAdUnit.Parameters` class is de The `api` property is dedicated to adding values for API Frameworks to a bid response according to the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) spec. The supported values for GMA SDK integration are: -* `3` or `Signals.Api.MRAID_1` : MRAID-1 support signal -* `5` or `Signals.Api.MRAID_2` : MRAID-2 support signal -* `6` or `Signals.Api.MRAID_3` : MRAID-3 support signal -* `7` or `Signals.Api.OMID_1` : signals OMSDK support +- `3` or `Signals.Api.MRAID_1` : MRAID-1 support signal +- `5` or `Signals.Api.MRAID_2` : MRAID-2 support signal +- `6` or `Signals.Api.MRAID_3` : MRAID-3 support signal +- `7` or `Signals.Api.OMID_1` : signals OMSDK support #### Step 3: Create an AdManagerAdView {:.no_toc} @@ -203,9 +203,9 @@ private fun createListener(gamView: AdManagerAdView): AdListener { Initialize the `BannerAdUnit` with the following properties: -* `configId` - an ID of the Stored Impression on the Prebid Server -* `adSize` - the size of the ad unit which will be used in the bid request. -* `adUnitFormats` - `AdUnitFormat.VIDEO` for a video ad +- `configId` - an ID of the Stored Impression on the Prebid Server +- `adSize` - the size of the ad unit which will be used in the bid request. +- `adUnitFormats` - `AdUnitFormat.VIDEO` for a video ad #### Step 2: Configure video parameters {:.no_toc} @@ -222,22 +222,22 @@ Starting from PrebidMobile `2.1.0` the `VideoBaseAdUnit.Parameters` class is dep In the context of a VideoInterstitialAdUnit, rewarded video ads are typically labeled as interstitial. As such, Prebid SDK will default to value 5 if no placement value is supplied. -* `2` or `InBanner` : In-Banner placement exists within a web banner that leverages the banner space to deliver a video experience as opposed to another static or rich media format. The format relies on the existence of display ad inventory on the page for its delivery. -* `3` or `InArticle` : In-Article placement loads and plays dynamically between paragraphs of editorial content; existing as a standalone branded message. -* `4` or `InFeed` : In-Feed placement is found in content, social, or product feeds. -* `5` or `Slider`, `Floating` or `Interstitial` : Open RTB supports one of three values for option 5 as either Slider, Floating or Interstitial. If an enum value is supplied in placement, bidders will receive value 5 for placement type and assume to be interstitial with the instl flag set to 1. +- `2` or `InBanner` : In-Banner placement exists within a web banner that leverages the banner space to deliver a video experience as opposed to another static or rich media format. The format relies on the existence of display ad inventory on the page for its delivery. +- `3` or `InArticle` : In-Article placement loads and plays dynamically between paragraphs of editorial content; existing as a standalone branded message. +- `4` or `InFeed` : In-Feed placement is found in content, social, or product feeds. +- `5` or `Slider`, `Floating` or `Interstitial` : Open RTB supports one of three values for option 5 as either Slider, Floating or Interstitial. If an enum value is supplied in placement, bidders will receive value 5 for placement type and assume to be interstitial with the instl flag set to 1. #### api {:.no_toc} The `api` property is dedicated to adding values for API Frameworks to a bid response according to the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) spec. The supported values for GMA SDK integration are: -* `1` or `Signals.Api.VPAID_1` : VPAID 1.0 -* `2` or `Signals.Api.VPAID_2` : VPAID 2.0 -* `3` or `Signals.Api.MRAID_1` : MRAID-1 support signal -* `5` or `Signals.Api.MRAID_2` : MRAID-2 support signal -* `6` or `Signals.Api.MRAID_3` : MRAID-3 support signal -* `7` or `Signals.Api.OMID_1` : signals OMSDK support +- `1` or `Signals.Api.VPAID_1` : VPAID 1.0 +- `2` or `Signals.Api.VPAID_2` : VPAID 2.0 +- `3` or `Signals.Api.MRAID_1` : MRAID-1 support signal +- `5` or `Signals.Api.MRAID_2` : MRAID-2 support signal +- `6` or `Signals.Api.MRAID_3` : MRAID-3 support signal +- `7` or `Signals.Api.OMID_1` : signals OMSDK support #### maxBitrate {:.no_toc} @@ -269,26 +269,26 @@ Array of strings representing the supported OpenRTB 2.5 content MIME types (e.g. Array of OpenRTB 2.5 playback methods. If none are specified, any method may be used. Only one method is typically used in practice. It is strongly advised to use only the first element of the array. -* `1` or `Signals.PlaybackMethod.AutoPlaySoundOn` : Initiates on Page Load with Sound On -* `2` or `Signals.PlaybackMethod.AutoPlaySoundOff` : Initiates on Page Load with Sound Off by Default -* `3` or `Signals.PlaybackMethod.ClickToPlay` : Initiates on Click with Sound On -* `4` or `Signals.PlaybackMethod.MouseOver` : Initiates on Mouse-Over with Sound On -* `5` or `Signals.PlaybackMethod.EnterSoundOn` : Initiates on Entering Viewport with Sound On -* `6` or `Signals.PlaybackMethod.EnterSoundOff`: Initiates on Entering Viewport with Sound Off by Default +- `1` or `Signals.PlaybackMethod.AutoPlaySoundOn` : Initiates on Page Load with Sound On +- `2` or `Signals.PlaybackMethod.AutoPlaySoundOff` : Initiates on Page Load with Sound Off by Default +- `3` or `Signals.PlaybackMethod.ClickToPlay` : Initiates on Click with Sound On +- `4` or `Signals.PlaybackMethod.MouseOver` : Initiates on Mouse-Over with Sound On +- `5` or `Signals.PlaybackMethod.EnterSoundOn` : Initiates on Entering Viewport with Sound On +- `6` or `Signals.PlaybackMethod.EnterSoundOff`: Initiates on Entering Viewport with Sound Off by Default #### protocols {:.no_toc} Array or enum of OpenRTB 2.5 supported Protocols. Values can be one of: -* `1` or `Signals.Protocols.VAST_1_0` : VAST 1.0 -* `2` or `Signals.Protocols.VAST_2_0` : VAST 2.0 -* `3` or `Signals.Protocols.VAST_3_0` : VAST 3.0 -* `4` or `Signals.Protocols.VAST_1_0_Wrapper` : VAST 1.0 Wrapper -* `5` or `Signals.Protocols.VAST_2_0_Wrapper` : VAST 2.0 Wrapper -* `6` or `Signals.Protocols.VAST_3_0_Wrapper` : VAST 3.0 Wrapper -* `7` or `Signals.Protocols.VAST_4_0` : VAST 4.0 -* `8` or `Signals.Protocols.VAST_4_0_Wrapper` : VAST 4.0 Wrapper +- `1` or `Signals.Protocols.VAST_1_0` : VAST 1.0 +- `2` or `Signals.Protocols.VAST_2_0` : VAST 2.0 +- `3` or `Signals.Protocols.VAST_3_0` : VAST 3.0 +- `4` or `Signals.Protocols.VAST_1_0_Wrapper` : VAST 1.0 Wrapper +- `5` or `Signals.Protocols.VAST_2_0_Wrapper` : VAST 2.0 Wrapper +- `6` or `Signals.Protocols.VAST_3_0_Wrapper` : VAST 3.0 Wrapper +- `7` or `Signals.Protocols.VAST_4_0` : VAST 4.0 +- `8` or `Signals.Protocols.VAST_4_0_Wrapper` : VAST 4.0 Wrapper #### Step 3: Create an AdManagerAdView {:.no_toc} @@ -346,10 +346,10 @@ adUnit?.fetchDemand(request) { Initialize the `BannerAdUnit` with properties: -* `configId` - an ID of the Stored Impression on the Prebid Server -* `width` - the width of the ad unit which will be used in the bid request. -* `height` - the height of the ad unit which will be used in the bid request. -* `adUnitFormats` - ad unit formats for the current ad unit. +- `configId` - an ID of the Stored Impression on the Prebid Server +- `width` - the width of the ad unit which will be used in the bid request. +- `height` - the height of the ad unit which will be used in the bid request. +- `adUnitFormats` - ad unit formats for the current ad unit. #### Step 2-5 {:.no_toc} @@ -409,9 +409,9 @@ private fun createListner(): AdManagerInterstitialAdLoadCallback { Initialize the Interstitial Ad Unit with properties: -* `configId` - an ID of Stored Impression on the Prebid Server -* `minWidthPerc`: Optional parameter to specify the minimum width percent an ad may occupy of a device's screen. Support in SDK version 1.2+ -* `minHeightPrec`: Optional parameter to specify the minimum height percent an ad may occupy of a device's screen. Support in SDK version 1.2+ +- `configId` - an ID of Stored Impression on the Prebid Server +- `minWidthPerc`: Optional parameter to specify the minimum width percent an ad may occupy of a device's screen. Support in SDK version 1.2+ +- `minHeightPrec`: Optional parameter to specify the minimum height percent an ad may occupy of a device's screen. Support in SDK version 1.2+ > **NOTE:** As of version 1.2+, Prebid SDK has extended the functionality of Interstitial ad monetization by using a smart ad size selection process to monetize sizes smaller than full screen ads. App developers can specify a minimum width and minimum height percentage an ad can occupy of a devices screen, with Prebid Server (PBS) deriving a limited set of ad sizes (max 10) as eligible for the auction. > @@ -516,8 +516,8 @@ private fun createAdListener(): AdManagerInterstitialAdLoadCallback { Initialize the `InterstitialAdUnit` with the following properties: -* `configId` - an ID of Stored Impression on the Prebid Server -* `adUnitFormats` - AdUnitFormat.VIDEO for a video ad +- `configId` - an ID of Stored Impression on the Prebid Server +- `adUnitFormats` - AdUnitFormat.VIDEO for a video ad #### Step 2: Configure video parameters {:.no_toc} @@ -570,8 +570,8 @@ adUnit?.fetchDemand(request) { Initialize the `InterstitialAdUnit` with the following properties: -* `configId` - an ID of Stored Impression on the Prebid Server -* `adUnitFormats` - ad unit formats for the current ad unit. +- `configId` - an ID of Stored Impression on the Prebid Server +- `adUnitFormats` - ad unit formats for the current ad unit. #### Steps 2-3 {:.no_toc} @@ -641,7 +641,7 @@ private fun createListener(): RewardedAdLoadCallback { Initialize the Rewarded Video Ad Unit with the following properties: -* `configId` - an ID of Stored Impression on the Prebid Server +- `configId` - an ID of Stored Impression on the Prebid Server ### Step 2: Configure video parameters {:.no_toc} @@ -763,9 +763,9 @@ private fun initializePlayer() { Initialize the VideoAdUnit with the following properties: -* `configId` - an ID of Stored Impression on the Prebid Server -* `width` - Width of the video ad unit. -* `height` - Height of the video ad unit +- `configId` - an ID of Stored Impression on the Prebid Server +- `width` - Width of the video ad unit. +- `height` - Height of the video ad unit ### Step 2: Configure the video parameters {:.no_toc} @@ -881,16 +881,16 @@ private fun addNativeAssets(adUnit: NativeAdUnit?) { Initialize the `NativeAdUnit` with properties: -* `configId` - an ID of the Stored Impression on the Prebid Server +- `configId` - an ID of the Stored Impression on the Prebid Server #### Step 2: Add Native Assets and Event Trackers {:.no_toc} In order to make a bid request for the native ads you should provide a description of native assets that should be present in the native bid response. Prebid SDK supports the following set of assets to request. -* `NativeImageAsset` -* `NativeDataAsset` -* `NativeTitleAsset` +- `NativeImageAsset` +- `NativeDataAsset` +- `NativeTitleAsset` #### Step 3: Create an AdManagerAdView {:.no_toc} @@ -1094,16 +1094,16 @@ private class SafeNativeListener : PrebidNativeAdEventListener { Initialize the `NativeAdUnit` with the following properties: -* `configId` - an ID of the Stored Impression on the Prebid Server +- `configId` - an ID of the Stored Impression on the Prebid Server ##### Step 2: Add Native Assets and Event Trackers {:.no_toc} In order to make a bid request for the native ads you should provide a description of native assets that should be present in the native bid response. Prebid SDK supports the following set of assets to request. -* `NativeImageAsset` -* `NativeDataAsset` -* `NativeTitleAsset` +- `NativeImageAsset` +- `NativeDataAsset` +- `NativeTitleAsset` ##### Step 3: Make a bid request {:.no_toc} @@ -1341,7 +1341,7 @@ private fun inflatePrebidNativeAd(ad: PrebidNativeAd) { Initialize the `PrebidAdUnit` with the following properties: -* `configId` - an ID of the Stored Impression on the Prebid Server +- `configId` - an ID of the Stored Impression on the Prebid Server ### Step 2: Create a PrebidRequest {:.no_toc} @@ -1355,9 +1355,9 @@ In addition you can set the following properties of the `PrebidRequest`. For each intersted ad format you should creatae a respective configuration parameter: -* [BannerParameters](#step-2-configure-banner-parameters) object. -* [VideoParameters](#step-2-configure-the-video-parameters) object. -* [NativeParameters](#nativeparameters) object +- [BannerParameters](#step-2-configure-banner-parameters) object. +- [VideoParameters](#step-2-configure-the-video-parameters) object. +- [NativeParameters](#nativeparameters) object #### NativeParameters {:.no_toc} @@ -1444,13 +1444,6 @@ PB Ad Slot is an identifier tied to the placement the ad will be delivered in. T `adUnit.ortb2Imp.ext.data.pbadslot = "/1111111/homepage/med-rect-2"` -### AppContext - -#### setAppContent -{:.no_toc} - -Provides targeting information for the `app.content` field of the bid request. Parameter is an `ContentObject` which provides all respective fields. - ### Auto Refresh #### setAutoRefreshPeriodMillis @@ -1460,7 +1453,7 @@ If set on a given Prebid Mobile ad unit, the `fetchDemand` function will be call **Parameters** -* `periodMillis`: Integer defining the refresh time in milliseconds. +- `periodMillis`: Integer defining the refresh time in milliseconds. #### startAutoRefresh {:.no_toc} @@ -1472,168 +1465,21 @@ Starts the auto-refresh behavior for a given Prebid Mobile ad unit. Halts the auto-refresh behavior for a given Prebid Mobile ad unit. If no auto-refresh behavior has been set, `stopAutoRefresh` will be ignored. -### Context Keywords - -#### addContextKeywords -{:.no_toc} - -Ad Unit context keywords object is a free form list of comma separated keywords about the app as defined in app.keyword in OpenRTB 2.5. - -**Parameters** -`keyword` : a keyword of type string. - -```java -void addContextKeyword(String keyword) -``` - -#### addContextKeywords -{:.no_toc} - -**Parameters** -`keyword` : a keyword of type string. - -```java -void addContextKeywords(Set keywords) -``` - -#### removeContextKeywords -{:.no_toc} - -**Parameters** -`keyword`: a keyword of type string. - -```java -void removeContextKeyword(String keyword) -``` - -#### clearContextKeywords -{:.no_toc} - -```java -void clearContextKeywords() -``` - -### First Party Data - -First Party Data (FPD) is free form data supplied by the publisher to provide additional targeting of the user or inventory context. It is used primarily for striking PMP (Private MarketPlace) deals with Advertisers. Data supplied in the data parameters are typically not sent to DSPs whereas information sent in non-data objects (i.e. `setYearOfBirth`, `setGender`, etc.) will be. Access to FPD can be limited to a supplied set of Prebid bidders via an access control list. - -Data is broken up into two different data types: - -* User - * Global in scope only -* Inventory (context) - * Global scope - * Ad Unit grain - - The first party inventory context will apply to the specic ad unit the data object it is applied to. For global user or inventory context level first party data, refer to [first party data section of the Targeting](pbm-targeting-params-android#first-party-data) page. - -#### addContextData -{:.no_toc} - -**Parameters** -`key`: string containing the key for the specific data object -`value`: String containing the value for the supplied key - -```java -void addContextData(String key, String value) -``` - -#### updateContextData -{:.no_toc} - -**Parameters** -`key`: string containing the key for the specific data object -`value`: String containing the value for the supplied key - -```java -void updateContextData(String key, Set value) -``` - -#### removeContextData -{:.no_toc} - -**Parameters** -`key`: string containing the key - -```java -void removeContextData(String key) -``` - -#### clearContextData -{:.no_toc} - -```java -void clearContextData() -``` - ### GPID (requires SDK v2.1.6) +The Global Placement ID (GPID) is a key that uniquely identifies a specific instance of an adunit. Some bidders require this value. An important scenario is "infinite scroll" -- if your app creates instances +of an adunit dynamically as the user scrolls through content, the the GPID must be different for each by appending some kind of sequence or ID. e.g. "/newsfeed#7" + Using the following method, you can set the impression-level [GPID](https://docs.prebid.org/features/pbAdSlot.html#the-gpid) value to the bid request: ``` kotlin adUnit?.gpid = "/36117602/hnp-sfgate.com/Homepage/AP300" ``` -### UserKeyword - -#### setUserKeyword -{:.no_toc} +## Further Reading -Set a single key-value pair. - -**Parameters** - -* `key`: String containing the key. -* `value`: String containing the value. - -#### setUserKeywords -{:.no_toc} - -Define multiple values for a single key. - -**Parameters** - -* `key`: String containing the key. -* `values`: String array containing the list of values for the key. - -#### removeUserKeyword -{:.no_toc} - -Remove a key and all its associated values from a given Prebid Mobile ad unit. - -**Parameters** - -* `key`: String containing the key you want to remove. - -#### removeUserKeywords -{:.no_toc} - -Clear all key-value combinations from the Prebid Mobile ad unit. - -### UserData - -The following methods enable adding `user.data[]` objects into the bid request: - -```kotlin -public void addUserData(DataObject dataObject) - -public ArrayList getUserData() - -public void clearUserData() -``` - -### App Content Data - -In order to set the `app.contnent.data[]` objects use the `getAppContent()` first and then one of the respective methods of the `ContentObject` class: - -```kotlin -public void addData(@NonNull DataObject dataObject) - -public ArrayList getDataList() - -public void setDataList(@NonNull ArrayList dataObjects) - -public void clearDataList() -``` +- [Prebid Mobile Overview](/prebid-mobile/prebid-mobile.html) +- [Prebid SDK Android integration](/prebid-mobile/pbm-api/android/code-integration-android.html) +- [Prebid SDK Global Parameters - Android](/prebid-mobile/pbm-api/android/pbm-targeting-android.html) diff --git a/prebid-mobile/pbm-api/android/code-integration-android.md b/prebid-mobile/pbm-api/android/code-integration-android.md index 0ce5beba6f..7611dfa20d 100644 --- a/prebid-mobile/pbm-api/android/code-integration-android.md +++ b/prebid-mobile/pbm-api/android/code-integration-android.md @@ -8,12 +8,12 @@ nav_section: prebid-mobile-android sidebarType: 2 --- -# Integration for Android +# Prebid SDK Integration for Android {:.no_toc} Get started with Prebid Mobile by creating a [Prebid Server account](/prebid-mobile/prebid-mobile-getting-started.html). Once your account is set up include the Prebid Mobile SDK in your app by either using Maven or by [cloning the repo](https://github.com/prebid/prebid-mobile-android) and using our included script to build the SDK. -* TOC +- TOC {:toc} ## SDK Integration @@ -62,9 +62,9 @@ If you see errors while building the Prebid Mobile SDK or Demo Applications, mak {% endcapture %} {% include /alerts/alert_warning.html content=warning_note %} -## Add SDK +## Add the Prebid SDK -### Set Prebid Server +### Point to a Prebid Server {% capture warning_note %} All integration examples for Android are written in `Kotlin`. @@ -81,10 +81,22 @@ PrebidMobile.setPrebidServerAccountId(YOUR_ACCOUNT_ID) PrebidMobile.setPrebidServerHost(Host.APPNEXUS) ``` -If you have opted to host your own Prebid Server solution you will need to store the url to the server in your app. Make sure that your URL points to the [/openrtb2/auction](https://docs.prebid.org/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html) endpoint. +If you have opted to host your own Prebid Server solution you will need to store the url to the server in your app. Make sure that your URL points to the [/openrtb2/auction](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html) endpoint. ```kotlin -PrebidMobile.setPrebidServerHost(Host.createCustomHost(PREBID_SERVER_AUCTION_ENDPOINT)) +PrebidMobile.setPrebidServerHost(Host.createCustomHost("https://prebidserver.example.com/openrtb2/auction")) +``` + +#### Account Settings ID + +Each mobile app may have its own "account settings ID". This is used to look up data in Prebid Server like timeout, targeting, and price granularity. + +By default the Account Settings ID is set to be the same as the Account ID. i.e. the setPrebidServerAccountId() function will set both values. +If you want to define a different Account Settings ID as determined in conjunction with +your Prebid Server team, use the [arbitrary OpenRTB](/prebid-mobile/pbm-api/android/pbm-targeting-params-android.html#arbitrary-openrtb) method like this: + +```kotlin +adUnitConfiguration?.ortbConfig = "{\"ext\":{\"prebid\":{\"storedrequest\": {\"id\":\"account-settings-id\"}}}}" ``` ### Initialize SDK @@ -148,8 +160,8 @@ Open your AndroidManifest.xml and add the following permissions and activity dec **Notes:** -* `ACCESS_COARSE_LOCATION` or `ACCESS_FINE_LOCATION` will automatically allow the device to send user location for targeting, which can help increase revenue by increasing the value of impressions to buyers. -* `WRITE_EXTERNAL_STORAGE` is optional and only required for MRAID 2.0 storePicture ads. +- `ACCESS_COARSE_LOCATION` or `ACCESS_FINE_LOCATION` will automatically allow the device to send user location as First Party Data, which can help increase revenue by increasing the value of impressions to buyers. +- `WRITE_EXTERNAL_STORAGE` is optional and only required for MRAID 2.0 storePicture ads. For *banner and interstitial ads only*, include the following custom activities (even though you won't instantiate them directly). This is not necessary for video interstitial ads. @@ -175,19 +187,24 @@ Add this tag to your `` to use Google Play Services: ``` -## Set Targeting Parameters +## Set Global Parameters + +There are several types of parameters app developers should consider providing to Prebid SDK: -Targeting parameters enable you to define the target audience for the bid request. Prebid Mobile supports the following global targeting parameters. These targeting parameters are set only once and apply to all Prebid Mobile ad units. They do not change for a given user session. +- Values that control Prebid SDK behavior (timeout, etc) +- Privacy consent settings (TCF, GPP, COPPA, etc). +- First Party Data to help bidders understand the context and/or u +ser better. -View the full list of [targeting parameters](/prebid-mobile/pbm-api/android/pbm-targeting-params-android.html). +See the [global parameters page](/prebid-mobile/pbm-api/android/pbm-targeting-android.html) for details. ## Supported Android versions Prebid supports the following versions by release: -* Prebid SDK version 1.0 or 1.1 supports Android 16+ -* Prebid SDK version 1.1.1+ supports Android 19+ -* Prebid SDK version 2.0.0+ supporst Android 16+ +- Prebid SDK version 1.0 or 1.1 supports Android 16+ +- Prebid SDK version 1.1.1+ supports Android 19+ +- Prebid SDK version 2.0.0+ supporst Android 16+ ## Setup SDK @@ -304,8 +321,8 @@ You can pass some SDK configuration properties from PBS to the SDK using the `ex For now Prebid SDK supports the following configuration properties: -* `cftbanner` - see the `Prebid.creativeFactoryTimeout` -* `cftprerender` - see the `Prebid.creativeFactoryTimeoutPreRenderContent` +- `cftbanner` - see the `Prebid.creativeFactoryTimeout` +- `cftprerender` - see the `Prebid.creativeFactoryTimeoutPreRenderContent` An example of a stored request: @@ -343,11 +360,11 @@ All values received in the `passthrough` of the bid response will be applied to Follow the corresponding guide to integrate Prebid Mobile: -* [GAM using Original API](android-sdk-integration-gam-original-api.html) -* [No Ad Server](../../modules/rendering/android-sdk-integration-pb.html) -* [GAM using Rendering API](../../modules/rendering/android-sdk-integration-gam.html) -* [AdMob](../../modules/rendering/android-sdk-integration-admob) -* [AppLovin MAX](../../modules/rendering/android-sdk-integration-max.html) +- [GAM using Original API](android-sdk-integration-gam-original-api.html) +- [No Ad Server](../../modules/rendering/android-sdk-integration-pb.html) +- [GAM using Rendering API](../../modules/rendering/android-sdk-integration-gam.html) +- [AdMob](../../modules/rendering/android-sdk-integration-admob) +- [AppLovin MAX](../../modules/rendering/android-sdk-integration-max.html) ### Test configs diff --git a/prebid-mobile/pbm-api/android/pbm-plugin-renderer.md b/prebid-mobile/pbm-api/android/pbm-plugin-renderer.md index 86d7162e6c..626341cd65 100755 --- a/prebid-mobile/pbm-api/android/pbm-plugin-renderer.md +++ b/prebid-mobile/pbm-api/android/pbm-plugin-renderer.md @@ -127,7 +127,7 @@ It is important to notice that the compliant formats you set on `isSupportRender ### Original API -The Plugin Renderer feature does not work with [GAM Original API](/prebid-mobile/pbm-api/android/android-sdk-integration-gam-original-api.md) since the ad rendering does not happen in the Prebid SDK but externally. Despite that if you are using the regular GAM integration it will work fine. +The Plugin Renderer feature does not work with [GAM Original API](/prebid-mobile/pbm-api/android/android-sdk-integration-gam-original-api.html) since the ad rendering does not happen in the Prebid SDK but externally. Despite that if you are using the regular GAM integration it will work fine. ## Ad Event Listeners An optional dedicated generic ad event listener is offered in case of the existing event listeners are insufficient to keep your ad consumer fully aware of your ad lifecycle. 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 13273f10c1..3478a86e57 100755 --- a/prebid-mobile/pbm-api/android/pbm-targeting-params-android.md +++ b/prebid-mobile/pbm-api/android/pbm-targeting-params-android.md @@ -1,387 +1,754 @@ --- layout: page_v2 -title: Global Targeting Parameters - Android -description: Prebid Mobile API global targeting parameters for Android +title: Global Parameters - Android +description: Prebid Mobile API global parameters for Android top_nav_section: prebid-mobile nav_section: prebid-mobile sidebarType: 2 --- -# Global Targeting Parameters +# Prebid SDK Global Parameters - Android {:.no_toc} -Prebid Mobile supports the following global targeting parameters. These targeting parameters are set only once and apply to all Prebid Mobile ad units. They do not change for a given user session. - -* TOC +- TOC {:toc} -## Global GDPR Targeting +## How to Read this Guide -Prebid Mobile supports the [IAB GDPR recommendations](https://www.iab.com/topics/consumer-privacy/gdpr/). For a general overview of Prebid Mobile support for GDPR, see [Prebid Mobile Guide to European Ad Inventory and Providing Notice, Transparency and Choice](/prebid-mobile/prebid-mobile-privacy-regulation.html) +This page documents various global parameters you can set on the Prebid SDK for Android. It describes the properties and methods of the Prebid SDK that allow you to supply important parameters to the header bidding auction. -Prebid SDK doesn't modify values for IAB-defined keys in the `SharedPreferences`. Instead, SDK will keep the provided value in the in-memory property. +Specifically, app developers should consider each of these general sections: -The values provided via targeting API will be included in the bid request according to the `TCF v2` framework. +- Prebid SDK class parameters: these cover behavior of the SDK. Some values are required like a Prebid Server. +- Privacy / Consent Management parameters: we recommend developing a clear plan for user privacy with your legal counsel. +- First Party Data: data about the app or user that helps bidders choose an appropriate ad. -{% capture warning_note %} +{: .alert.alert-info :} +Note that the SDK's Targeting class uses the term "Targeting" loosely. It's mostly about +passing data to bidders that would help improve auction results. But there are also fields and methods +in the Targeting class that convey privacy data, Open Measurement info, and other data used beyond actual +bid targeting. -Since the SDK API has priority over CMP values, using the API blocks the CMP signals. Use a single way to provide the TCF signals. +## Prebid Global Properties and Methods -If you need to use an API way, ensure that all the following properties are set in the app code. +The `Prebid` class is a singleton that enables you to apply certain global settings. -If you need to use a CMP way, ensure that you don't set any of the following API properties. +### Prebid Class Global Properties -{% endcapture %} -{% include /alerts/alert_warning.html content=warning_note %} +All of these properties of the Prebid class can be set on the `shared` object like this: -### Subject To GPDR -{:.no_toc} +```kotlin +Prebid.shared.sendMraidSupportParams=true +``` + +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Purpose | Description | Example | +| --- | --- | --- | --- | --- | +| isCoppaEnabled | optional | boolean | ORTB | Set this to true if this app is aimed at children. It sets the ORTB `regs.coppa` flag. Default is false. | `true` | +| useExternalBrowser | optional | boolean | behavior | If true, clicking on the ad will open your default browser instead of showing within the app's webview. Defaults to `false`. | `true` | +| sendMraidSupportParams | optional | boolean | ORTB | If `true`, the SDK sends imp[].banner.api=[3,5], indicating support for MRAID. Defaults to `true`. | `false` | + +### Prebid Class Global Methods + +#### setPrebidServerAccountId() + +Your Prebid Server team will tell you whether this is required or not and if so, the value. See the initialization page for [Android](/prebid-mobile/pbm-api/android/code-integration-android.html). -Enable (true) or disable (false) the ability to provide consent. +#### setPrebidServerHost() + +This is where the Prebid SDK will send the auction information. + +Signature: ```kotlin -TargetingParams.isSubjectToGDPR() -TargetingParams.setSubjectToGDPR(true) +func setPrebidServerHost(host: String) ``` -### GDPR Consent String -{:.no_toc} +Parameters: -```java -val consent = TargetingParams.getGDPRConsentString(); -TargetingParams.setGDPRConsentString(string); +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| host | required | object | Host.APPNEXUS, Host.RUBICON, Host.createCustomHost(PREBID_SERVER_AUCTION_ENDPOINT) | Host.createCustomHost(`https://prebidserver``.example.com``/openrtb2/auction`) | + +Examples: + +```kotlin +PrebidMobile.setPrebidServerHost(Host.APPNEXUS) +PrebidMobile.setPrebidServerHost(Host.RUBICON) +PrebidMobile.setPrebidServerHost(Host.createCustomHost("https://prebidserver.example.com/openrtb2/auction")) ``` -### Purpose Consent -{:.no_toc} +#### setCustomStatusEndpoint() + +Signature: ```kotlin -val consent = TargetingParams.getPurposeConsents() -TargetingParams.setPurposeConsents(string) + public static void setCustomStatusEndpoint(String url) { ``` -## COPPA +Parameters: -Prebid supports passing of the Child Online Privacy Prection (COPPA) signal to Prebid Server (PBS) for all COPPA traffic. When PBS receives the COPPA flag we strip out all personal data from the requeset. For a general overview of COPPA, see the [FTC's guidlines](https://www.ftc.gov/enforcement/rules/rulemaking-regulatory-reform-proceedings/childrens-online-privacy-protection-rule). +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| url | required | string | Use this URL to check the status of Prebid Server. The default status endpoint is the PBS URL appended with '/status'. | `https://prebidserver``.example``.com/custom``/status` | -Example: +#### setTimeoutMillis() + +The Prebid SDK timeout. When this number of milliseconds passes, the Prebid SDK returns control to the ad server SDK to fetch an ad without Prebid bids. See the initialization page for [Android](/prebid-mobile/pbm-api/android/code-integration-android.html). + +#### setShareGeoLocation() + +If this flag is true AND the app collects the user’s geographical location data, Prebid Mobile will send the user’s lat/long geographical location data to the Prebid Server. The default is false. + +#### setIncludeWinnersFlag() + +If `true`, Prebid sdk will add the `includewinners` flag inside the targeting object described in [PBS Documentation](prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#targeting) . This is needed if you've set up line items in an ad server in "Send Top Bid" mode, as it's what creates the key value pairs like `hb_pb`. + +Signature: -```java -TargetingParams.setSubjectToCOPPA(true); +```kotlin + public static void setIncludeWinnersFlag(boolean includeWinners) ``` -## Parameters +Parameters: + +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| includeWinners | required | boolean | If `true`, Prebid sdk will add `includewinners` flag inside the targeting object described in [PBS Documentation](prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#targeting) . Default is `false`. | `true` | -The tables below list the methods and properties that the Prebid Rendering API uses for customization. -The more data about the user, app, and device that can be provided the more chances to win an impression. +#### setIncludeBidderKeysFlag() -It is advised that you strictly follow the recommendations in the tables below. Any field marked with an ❗is required and recommended. +If `true`, Prebid sdk will add the `includebidderkeys` flag inside the targeting object described in [PBS Documentation](prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#targeting) . This is needed if you've set up line items in an ad server in "Send All Bids" mode, as it's what creates the key value pairs like `hb_pb_bidderA`. -1. [Targeting Params](#targeting) +Signature: -### Targeting +```kotlin + public static boolean setIncludeBidderKeysFlag(boolean includeBidderKeys) { +``` -You can use `Targeting` to pass ad call request parameters. +Parameters: {: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| includeBidderKeys | required | boolean | If `true`, Prebid sdk will add `includewinners` flag inside the targeting object described in [PBS Documentation](prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#targeting) . Default is `false`. | `true` | -| **Parameter** | **Method** | Description | Required?| -| -------------------------- | ------------------------- | ------------------------------------------------------------ | -------- | -| User Age | `setUserAge` | Age of the user in years. For example: `35` | ❗ Highly Recommended | -| Buyer Id | `setBuyerId` | Buyer-specific ID for the user as mapped by the exchange for the buyer. | Optional | -| Custom User Data | `setUserCustomData` | Optional feature to pass bidder data that was set in the exchange’s cookie. The string must be in base85 cookie safe characters and be in any format. Proper JSON encoding must be used to include “escaped” quotation marks. | Optional | -| User Extensions | `setUserExt` | Placeholder for exchange-specific extensions to OpenRTB. | Optional | -| User Gender | `setGender` | The gender of the user (Male, Female, Other, Unknown). For example: `Gender.FEMALE` | ❗ Highly Recommended | -| Keywords | `addUserKeywords` | Comma separated list of keywords, interests, or intent. | Optional | -| Lat, Lon | `setUserLatLng` | Location of the user’s home base defined by a provided longitude and latitude. It's highly recommended to provide Geo data to improve the request.| Optional | -| Publisher Name | `setPublisherName` | Publisher name (may be aliased at the publisher’s request).| Recommended if available | -| Store Url | `setStoreUrl` | The URL for the mobile application in Google Play. That field is required in the request.
**For example:**`https://play.google.com/store/apps/details?id=com.outfit7.talkingtom`. | ❗ Required | -| User ID | `setUserId` | ID of the user within the app. For example: `"24601"` | ❗ Highly Recommended | -|Year of Birth|`setYearOfBirth`| The year of user's birth|| +#### setStoredAuctionResponse() -Example: +For testing and debugging. Get this value from your Prebid Server team. It signals Prebid Server to respond with a static response from the Prebid Server Database. +See [more information on stored auction responses](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#stored-responses). -``` java -// Set user parameters to enrich ad request data. -// Please see Targeting for the userKeys and the APIs available. -TargetingParams.addUserKeyword("socialNetworking"); -TargetingParams.setUserAge(18); +Signature: + +```kotlin +public static void setStoredAuctionResponse(@Nullable String storedAuctionResponse) ``` -### ORTBConfig +Parameters: -(requires SDK v2.2.1) +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| storedAuctionResponse | required | string | Key as defined by Prebid Server. Get this value from your Prebid Server team. | "abc123-sar-test-320x50" | -Provides a way for app publishers to customize most ORTB fields in the partial bid request that Prebid Mobile sends to the Prebid Server. The customization comes in the form of the ortbConfig parameter that takes a JSON String as input. The JSON string must follow the [ORTB guidelines](https://github.com/InteractiveAdvertisingBureau/openrtb2.x/blob/develop/2.6.md#321---object-bidrequest-) as it will be merged with the current JSON of the bid request. If you choose to input extra data using the ortbConfig parameter, please extensively test your requests sent to Prebid Server. +#### addStoredBidResponse() -There are certain protected fields such as regs, device, geo, ext.gdpr, ext.us_privacy, and ext.consent which cannot be changed. +Stored Bid Responses are for testing and debugging similar to Stored Auction Responses (see the Global Properties above). They signal Prebid Server to respond with a static pre-defined response, except Stored Bid Responses actually exercise the bidder adapter. For more information on how stored bid responses work, refer to the [Prebid Server endpoint doc](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#stored-responses). Your Prebid Server team will help you determine how best to setup test and debug. -``` kotlin -//global invocation -adUnitConfiguration?.ortbConfig = "{"ext":{"prebid":{"debug":1,"trace":"verbose"}}}" +Signature: + +```kotlin +void addStoredBidResponse(String bidder, String responseId) ``` -``` kotlin -//ad unit / impression-level -adUnit?.ortbConfig = "{"ext":{"gpid":"abc123"}}" +Parameters: + +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| bidder | required | string | Bidder name as defined by Prebid Server | "bidderA" | +| responseId | required | string | ID used in the Prebid Server Database. Get this value from your Prebid Server team. | "abc123-sbr-test-300x250" | + +#### clearStoredBidResponses() + +This method clears any stored bid responses. It doesn’t take any parameters. + +Signature: + +```kotlin +void clearStoredBidResponses() ``` -### Global User Targeting +Parameters: none. -#### User Keywords -{:.no_toc} +#### setLogLevel -User keywords are a list of keywords, intrests or intent as defined by user.keywords in OpenRTB 2.5. Any keywords passed in the UserKeywords object may be passsed to DSPs. +Controls the level of logging output to the console. + +Signature: ```kotlin -void addUserKeyword(String keyword) -void addUserKeywords(Set keywords) -void removeUserKeyword(String keyword) -void clearUserKeywords() + public static void setLogLevel(LogLevel logLevel) ``` -Example: +Parameters: + +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| logLevel | required | enum | The value can be NONE, VERBOSE, DEBUG, INFO, WARN, ERROR, ASSERT. The default is `NONE`. | `DEBUG` | + +#### setPbsDebug() + +Adds the debug flag (`test`:1) on the outbound http call to the Prebid Server. The `test` flag signals to the Prebid Server to emit the full resolved request and the full Bid Request and Bid Response to and from each bidder. + +Signature: ```kotlin -TargetingParams.addUserKeyword("globalUserKeywordValue1") -TargetingParams.addUserKeyword("globalUserKeywordValue2") +public static void setPbsDebug(boolean pbsDebug) ``` -## Global Application Targeting +Parameters: -### Inventory (Context) Keywords -{:.no_toc} +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| pbsDebug | required | boolean | Turn on/off debug mode. Defaults to `false`. | `true` | + +#### assignNativeAssetID() + +Whether to automatically assign an assetID for a Native ad. Default is `false`. -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. +Signature: ```kotlin -void addContextKeyword(String keyword) -void addContextKeywords(Set keywords) -void removeContextKeyword(String keyword) -void clearContextKeywords() + public static void assignNativeAssetID(boolean assignNativeAssetID) { ``` -Example: +Parameters: + +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| assignNativeAssetID | required | boolean | Whether to automatically assign an assetID for a Native ad. Defaults to `false`. | `true` | + +#### setCreativeFactoryTimeout() + +Controls how long a banner creative has to load before it is considered a failure. + +Signature: ```kotlin -TargetingParams.addContextKeyword("globalContextKeywordValue1") -TargetingParams.addContextKeyword("globalContextKeywordValue2") + public static void setCreativeFactoryTimeout(int creativeFactoryTimeout) ``` -### Bundle ID -{:.no_toc} +Parameters: -Use the following code to retrieve the platform-specific bundle/package name: +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| creativeFactoryTimeout | required | integer | Controls how long a banner creative has to load before it is considered a failure. This value is in milliseconds. The default is 6,000 milliseconds. | 10000 | + +#### setCreativeFactoryTimeoutPreRenderContent() + +Controls how much time video and interstitial creatives have to load before it is considered a failure. + +Signature: ```kotlin -bundleName = TargetingParams.getBundleName() + public static void setCreativeFactoryTimeoutPreRenderContent(int creativeFactoryTimeoutPreRenderContent) ``` -Pass in the platform-specific identifier - the bundle/package name - to set the bundle ID: +Parameters: + +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| creativeFactoryTimeoutPreRenderContent | required | integer | Controls how much time video and interstitial creatives have to load before it is considered a failure. This value is in milliseconds. The default is 30,000 milliseconds. | 60000 | + +#### setCustomHeaders() + +This method enables you to customize the HTTP call to Prebid Server. + +Signature: ```kotlin -TargetingParams.setBundleName(bundleName) + public static void setCustomHeaders(@Nullable HashMap customHeaders) ``` -### Domain -{:.no_toc} +Parameters: + +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| customHeaders | required | hashmap | Hashmap of custom headers | "X-mycustomheader: customvalue" | + +#### setCustomLogger() + +Define a custom PrebidLogger object. + +Signature: + +```kotlin + public static void setCustomLogger(@NonNull PrebidLogger logger) +``` + +Parameters: + +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| logger | required | object | The PrebidLogger interface enables the app developer to define where the Prebid SDK should send log-level details about the header bidding transaction. | | + +--- + +## Consent Management Parameters + +This section describes how app developers can provide info on user consent to the Prebid SDK and how SDK behaves under different kinds of restrictions. + +### GDPR / TCF-EU + +Prebid Mobile supports [IAB TCF](https://iabeurope.eu/transparency-consent-framework/). For a general overview of Prebid Mobile support for GDPR, see the [Prebid Mobile Guide to Privacy Regulation](/prebid-mobile/prebid-mobile-privacy-regulation.html). + +There are two ways to provide information on user consent to the Prebid SDK: + +- Explicitly via Prebid SDK API: publishers can provide TCF data via Prebid SDK’s 'Targeting' class. +- Implicitly set through the Consent Management Platform (CMP): Prebid SDK reads the TCF data stored in the `SharedPreferences`. This is the preferred approach. + +{: .alert.alert-warning :} +The Prebid SDK prioritizes values set explicitly through the API over those stored by the CMP. If the publisher provides TCF data both ways, the values set through the API will be sent to the PBS, and values stored by the CMP will be ignored. + +#### Setting TCF-EU Values with the API + +Prebid SDK provides three properties to set TCF consent values explicitly, though this method is not preferred. Ideally, the Consent Management Platform will set these values – see the next section. + +If you need to set the values directly, here's how to indicate that the user is subject to GDPR: + +```kotlin +TargetingParams.setSubjectToGDPR(true) +``` -Retrieve and set the domain of your app with the following commands: +To provide the consent string: ```kotlin -TargetingParams.setDomain(domain) +TargetingParams.setGDPRConsentString("BOMyQRvOMyQRvABABBAAABAAAAAAEA") +``` + +To set the purpose consent: + +```kotlin +TargetingParams.setPurposeConsents("100000000000000000000000") +``` + +See also the API references for isSubjectToGDPR(), getGDPRConsentString(), getPurposeConsent(int index), getPurposeConsents(), getDeviceAccessConsent() + +#### Getting Consent Values from the CMP + +Prebid SDK reads the values for the following keys from the `SharedPreferences` object: + +- **IABTCF_gdprApplies** - indicates whether the user is subject to GDPR +- **IABTCF_TCString** - full encoded TC string +- **IABTCF_PurposeConsents** - indicates the consent status for the purpose. + +For more detailed information, read the [In-App Details section](https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20CMP%20API%20v2.md#in-app-details) of the TCF. + +{: .alert.alert-warning :} +Publishers shouldn’t explicitly assign values for these keys unless they have a custom-developed Consent Management Platform (CMP). If the publisher wants to provide this data to the Prebid SDK, they should use the explicit APIs described above. + +Here's how Prebid SDK processes CMP values: + +- It reads CMP values during the initialization and on each bid request, so the latest value is always used. +- It doesn’t verify or validate CMP values in any way + +### CCPA / US Privacy + +The California Consumer Protection Act prompted the IAB to implement the "US Privacy" protocol. -val domain = TargetingParams.getDomain() +Prebid SDK reads and sends USP/CCPA signals according to the [US Privacy User Signal Mechanism](https://github.com/InteractiveAdvertisingBureau/USPrivacy/blob/master/CCPA/USP%20API.md) and [OpenRTB extension](https://github.com/InteractiveAdvertisingBureau/USPrivacy/blob/7f4f1b2931cca03bd4d91373bbf440071823f257/CCPA/OpenRTB%20Extension%20for%20USPrivacy.md). + +Prebid SDK reads the value for the `IABUSPrivacy_String` key from `SharedPreferences` and sends it in the `regs.ext.us_privacy` object of the OpenRTB request. + +### COPPA + +The Children's Online Privacy Protection Act of the United States is a way for content producers to declare that their content is aimed at children, which invokes additional privacy protections. + +Prebid SDK follows the OpenRTB 2.6 spec and provides an API to indicate whether the current content falls under COPPA regulation. Publishers can set the respective flag using the targeting API: + +```kotlin +TargetingParams.setSubjectToCOPPA(true) ``` +Prebid SDK passes this flag in the `regs.coppa` object of the bid requests. + +If you're app developer setting this COPPA flag, we recommend you also: + +- set the `shareGeoLocation` property to false +- avoid passing any sensitive first party data + +### Global Privacy Platform (GPP) + +A Consent Management Platform (CMP) utilizing [IAB's Global Privacy Protocol](https://iabtechlab.com/gpp/) is a comprehensive way for apps to manage user consent across multiple regulatory environments. + +Since version 2.0.6, Prebid SDK reads and sends GPP signals: + +- The GPP string is read from IABGPP_HDR_GppString in `SharedPreferences`. It is sent to Prebid Server on `regs.gpp`. +- The GPP Section ID is likewise read from IABGPP_GppSID. It is sent to Prebid Server on `regs.gpp_sid`. + +--- + ## Open Measurement SDK (OMSDK) API -**NOTE**: these properties are relevant only for the original Prebid integration into GAM monetization. In this case the creative is rendered by GMA SDK and publishers should provide OMID description in the bid re qest. If you use Prebid SDK as a rendering engine you shouldn’t use these properties. Prebid SDK sends them automaticaly according to the current OMID setup. +{: .alert.alert-info :} +Defining OMSDK values is only relevant for the 'Bidding-Only' Prebid integration with GAM. In this case the creative is rendered by GMA SDK and publishers should provide OMID description in the bid request. If you use Prebid SDK as a rendering engine you shouldn’t use these properties -- it sends them automaticaly according to the current OMID setup. -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 eligible 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. +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 that the impression is eligible 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: +There are three components to signaling support for OMSDK: -* Partner Name -* Partner Version -* API code +- Partner Name +- Partner Version +- Banner API code ### Partner Name -{:.no_toc} - -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 -Open Measurement partner name. +The [IAB OMSDK compliant partner name](https://complianceomsdkapi.iabtechlab.com/compliance/latest) responsible for integrating with the OMSDK spec. ```kotlin TargetingParams.setOmidPartnerName("Google") ``` ### Partner Version -{:.no_toc} -The OMSDK version number the partner integrated with. See below for configuration and examples. +The OMSDK version number for the integration partner. + +```kotlin +TargetingParams.setOmidPartnerVersion("1.0"); +``` + +### Banner API Code -Partner's OMSDK version number implementation +The following code lets bidders know that Open Measurement is being used for this adunit: -```java -TargetingParams.setOmidPartnerVersion(); +```swift +let parameters = BannerParameters() +parameters.api = [Signals.Api.OMID_1] ``` -## First Party Data +--- -First Party Data (FPD) is free form data supplied by the publisher to provide additional targeting of the user or inventory context, used primarily for striking PMP (Private MarketPlace) deals with Advertisers. Data supplied in the data parameters are typically not sent to DSPs whereas information sent in non-data objects (i.e. `setYearOfBirth`, `setGender`, etc.) will be. Access to FPD can be limited to a supplied set of Prebid bidders via an access control list. +## First Party Data -Data is broken up into two different data types: +First Party Data (FPD) is information about the app or user known by the developer that may be of interest to advertisers. -* User - * Global in scope only -* Inventory (context) - * Global scope - * Ad Unit grain +- User FPD includes details about a specific user like "frequent user" or "job title". This data if often subject to regulatory control, so needs to be specified as user-specific data. Note that some attributes like health status are limited in some regions. App developers are strongly advised to speak with their legal counsel before passing User FPD. +- Inventory FPD includes details about the particular part of the app where the ad will displayed like "sports/basketball" or "editor 5-star rating". -### First Party User Data -{:.no_toc} +### User FPD -User specic data is passed in the global scope (i.e. applicable to all ad units). +Prebid SDK provides a number of properties in the [Targeting class](/prebid-mobile/pbm-api/ios/pbm-targeting-ios.html#targeting-class-properties-and- +methods) for setting user-oriented First Party Data. -```java +```kotlin void addUserData(String key, String value) -void updateUserData(String key, Set value) + +void updateUserData( String key, Set value) + void removeUserData(String key) + void clearUserData() + +Map> getUserDataDictionary() { + +void addUserKeywords(Set keywords) { + +void removeUserKeyword(String keyword) { + +void clearUserKeywords() { + +String getUserKeywords() { + +Set getUserKeywordsSet() { ``` Example: -```java +```kotlin TargetingParams.addUserData("globalUserDataKey1", "globalUserDataValue1") ``` -### First Party Inventory (Context) Data -{:.no_toc} +{: .alert.alert-info :} +Note: The 'UserData' functions end up putting data into the OpenRTB user.ext.data object while the 'UserKeywords' functions +put data into user.keywords. -Inventory specific free form data decribing the context of the inventory. +### Inventory FPD -#### Global Context Data -{:.no_toc} +Prebid SDK provides a number of methods in the [Targeting class](/prebid-mobile/pbm-api/ios/pbm-targeting-ios.html#targeting-class-properties-and-methods) for setting content-oriented First Party Data. ```kotlin -void addContextData(String key, String value) -void updateContextData(String key, Set value) -void removeContextData(String key) -void clearContextData() +void addExtData(String key, String value) + +void updateExtData(String key, Set value) + +void removeExtData(String key) + +Map> getExtDataDictionary() + +void addExtKeyword(String keyword) + +void addExtKeywords(Set keywords) + +void removeExtKeyword(String keyword) + +void clearExtKeywords() + +Set getExtKeywordsSet() ``` Example: ```kotlin -TargetingParams.addContextData("globalContextDataKey1", "globalContextDataValue1, globalContextDataValue2") +Targeting.addExtData("globalContextDataKey1", "globalContextDataValue1") ``` -#### Ad Unit Context Data -{:.no_toc} - -For ad unit context data, please refer to the [ad unit](pbm-adunit-android.html) section. - -### Access Control List -{:.no_toc} - -The First Party Data Access Control List provides a method to restrict access to first party data to a supplied list of bidders. +### Controlling Bidder Access to FPD -Only bidders supplied in the ACL will have access to the first party data. If no bidder is supplied, Prebid Server will supply first party data to all bid adapers. +Prebid Server will let you control which bidders are allowed access to First Party Data. Prebid SDK collects this an Access Control List with the following methods: -```java +```kotlin void addBidderToAccessControlList(String bidderName) + void removeBidderFromAccessControlList(String bidderName) + void clearAccessControlList() + +Set getAccessControlList() ``` Example: -```java -TargetingParams.addBidderToAccessControlList(TargetingParams.BIDDER_NAME_RUBICON_PROJECT); +```kotlin +Targeting.addBidderToAccessControlList("bidderA") ``` +--- + ## User Identity -Prebid SDK supports two interfaces to pass / maintain User IDs and ID vendor details: +Mobile apps traditionally rely on IDFA-type device IDs for advertising, but there are other User ID systems available to app developers and more will be made available in the future. Prebid SDK supports two ways to maintain Extended User ID (EID) details: -* Real-time in Prebid SDK's API field setExternalUserIds -* Store User Id(s) in local storage +- A global property - in this approach, the app developer sets the IDs while initializing the Prebid SDK. This data persists only for the user session. +- Local storage - the developer can choose to store the IDs persistently in local storage and Prebid SDK will utilize them on each bid request. -Any identity vendor's details in local storage will be sent over to Prebid Server as is, unadulterated. If data is sent in the API and entered into local storage, the API detail will prevail. +Any identity vendor's details in local storage will be sent to Prebid Server unadulterated. If user IDs are set both in the property and entered into local storage, the property data will prevail. + +{: .alert.alert-info :} +Note that the phrase "EID" stands for "Extended IDs" in [OpenRTB 2.6](https://github.com/InteractiveAdvertisingBureau/openrtb2.x/blob/main/2.6.md), but for historic reasons, Prebid SDK methods use the word "external" rather than "extended". Please consider the phrase "external ID" a synonym for "extended ID". ### Prebid SDK API Access -{:.no_toc} -Prebid SDK supports passing an array of UserID(s) at auction time in the field setExternalUserIds, that is globably scopped. It is sufficient enough to set the externalUserIdArray object once per user session, as these values would be used in all consecutive ad auctions in the same session. +Prebid SDK supports passing an array of EIDs at auction time with the function storeExternalUserId, which is globably scoped. It is sufficient to set the externalUserIdArray object once per user session, as these values would be used in all consecutive ad auctions in the same session. -```java -public static void setExternalUserIds(List externalUserIds) +```kotlin +void storeExternalUserId( externalUserIds) + +List fetchStoredExternalUserIds() + +ExternalUserId fetchStoredExternalUserId(@NonNull String source) + +void removeStoredExternalUserId(@NonNull String source) { -public static List getExternalUserIds() +void clearStoredExternalUserIds() { ``` -Exmaple (JAVA): +Example: -```java -// User Id from External Third Party Sources -ArrayList externalUserIdArray = new ArrayList<>(); -externalUserIdArray.add(new ExternalUserId("adserver.org", "111111111111", null, new HashMap() { +```kotlin + // User Id from External Third Party Sources + ArrayList externalUserIdArray = new ArrayList<>(); + externalUserIdArray.add(new ExternalUserId("adserver.org", "111111111111", null, new HashMap() { { put ("rtiPartner", "TDID"); } - })); -externalUserIdArray.add(new ExternalUserId("netid.de", "999888777", null, null)); -externalUserIdArray.add(new ExternalUserId("criteo.com", "_fl7bV96WjZsbiUyQnJlQ3g4ckh5a1N", null, null)); -externalUserIdArray.add(new ExternalUserId("liveramp.com", "AjfowMv4ZHZQJFM8TpiUnYEyA81Vdgg", null, null)); -externalUserIdArray.add(new ExternalUserId("sharedid.org", "111111111111", 1, new HashMap() { - { - put("third", "01ERJWE5FS4RAZKG6SKQ3ZYSKV"); - } + externalUserIdArray.add(new ExternalUserId("netid.de", "999888777", null, null)); + externalUserIdArray.add(new ExternalUserId("criteo.com", "_fl7bV96WjZsbiUyQnJlQ3g4ckh5a1N", null, null)); + externalUserIdArray.add(new ExternalUserId("liveramp.com", "AjfowMv4ZHZQJFM8TpiUnYEyA81Vdgg", null, null)); + externalUserIdArray.add(new ExternalUserId("sharedid.org", "111111111111", 1, null)); })); -//Set External User ID -PrebidMobile.setExternalUserIds(externalUserIdArray); + +//Set External User IDs +PrebidMobile.storeExternalUserId(externalUserIdArray); ``` -### Local Storage -{:.no_toc} +--- + +## Targeting Class Methods -Prebid SDK provides a local storage interface to set, retrieve or update an array of user IDs with associated identity vendor details. Prebid SDK will retrieve and pass User IDs and ID vendor details to PBS if values are present in local storage. The main difference between the Prebid API interface and the local storage interface is the persistence of storage of data. Local Storage data will persist across user sessions whereas the Prebid API interface (setExternalUserIds) persists only for the user session. If a vendor's details are passed both in local storage and the Prebid API at the same time, the Prebid API data (setExternalUserIds) will prevail. +There are several other fields app developers may want to set to give bidders additional information about the auction. Prebid recommends that app developers consider setting the following values for best auction performance: -Prebid SDK Provides five functions to handle User ID details: +- setBundleName() +- setPublisherName() +- setStoreUrl() -```java -public static void storeExternalUserId(ExternalUserId externalUserId) -public static ExternalUserId fetchStoredExternalUserId(@NonNull String source) -public static List fetchStoredExternalUserIds() -public static void removeStoredExternalUserId(@NonNull String source) -public static void clearStoredExternalUserIds() +### setBundleName() + +Define the OpenRTB app.bundle field. + +Signature: + +```kotlin +void setBundleName(String bundleName) { ``` -Examples +Parameters: -```java -//Set External User ID -TargetingParams.storeExternalUserId(new ExternalUserId("sharedid.org", "111111111111", 1, new HashMap() { - { - put ("third", "01ERJWE5FS4RAZKG6SKQ3ZYSKV"); - } +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| bundleName | required | string | App bundle name. Sets ORTB `app.bundle`. | "com.example" | -})); +See also the API reference for getBundleName(). -//Get External User ID -ExternalUserId externalUserId = TargetingParams.fetchStoredExternalUserId("sharedid.org"); +### setDomain() -//Get All External User IDs -List externalUserIdList = TargetingParams.fetchStoredExternalUserIds(); +Define the OpenRTB app.domain field. -//Remove External UserID -TargetingParams.removeStoredExternalUserId("adserver.org"); +Signature: -//Remove All External UserID -TargetingParams.clearStoredExternalUserIds(); +```kotlin +void setDomain(String domain) ``` + +Parameters: + +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| domain | required | string | Domain. Sets `app.domain`. | "example.com" | + +See also the API reference for getDomain(). + +### setPublisherName() + +Define the OpenRTB app.publisher.name field. + +Signature: + +```kotlin +void setPublisherName(String publisherName) +``` + +Parameters: + +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| publisherName | required | string | Publisher name. Sets `app.publisher.name`. | "publisher 1" | + +See also the API reference for getPublisherName(). + +### setStoreUrl() + +Define the OpenRTB app.storeurl field. + +Signature: + +```kotlin +void setStoreUrl(String storeUrl) +``` + +Parameters: + +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| storeUrl | required | string | App store URL. Sets `app.storeurl` | `https://play.google.com/store/apps/details?id=1234` | + +See also the API reference for getStoreUrl(). + +### setOmidPartnerName() + +Define the OpenRTB source.ext.omidpn field. + +Signature: + +```kotlin +setOmidPartnerName(@Nullable String omidPartnerName) +``` + +Parameters: + +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| omidPartnerName | required | string | Open Measurement Partner name. | "MyIntegrationPartner" | + +See also the API reference for getOmidPartnerName(). + +### setOmidPartnerVersion() + +Define the OpenRTB source.ext.omidpv field. + +Signature: + +```kotlin +setOmidPartnerVersion(@Nullable String omidPartnerVersion) +``` + +Parameters: + +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| omidPartnerVerson | required | string | Open Measurement Partner version | "7.1" | + +See also the API reference for getOmidPartnerVersion(). + +### setUserLatLng() + +Sets the device location for buyer targeting. It's incumbent upon to the app developer to make sure they have permission to read this data. Prebid Server may remove it under some privacy scenarios. + +Signature: + +```kotlin +void setUserLatLng( Float latitude, Float longitude) +``` + +Parameters: + +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| latitude | required | double | The device latitude. | 40.71 | +| longitude | required | double | The device longitude. | 74.01 | + +--- + +## Arbitrary OpenRTB + +(requires SDK v2.2.1) + +While there are many specific methods for adding data to the request detailed in +this document, OpenRTB is big and it moves quickly. To cover scenarios not already covered by an existing method, +Prebid SDK Provides a way for app publishers to customize most ORTB fields in the partial bid request that Prebid Mobile sends to the Prebid Server. The customization comes in the form of the ortbConfig parameter that takes a JSON String as input. The JSON string must follow the [OpenRTB structure](https://github.com/InteractiveAdvertisingBureau/openrtb2.x/blob/main/2.6.md) -- it will be merged with the current JSON of the bid request. If you choose to input extra data using the ortbConfig parameter, please extensively test your requests sent to Prebid Server. + +There are certain protected fields such as regs, device, geo, ext.gdpr, ext.us_privacy, and ext.consent which cannot be changed. + +```kotlin +//global invocation +adUnitConfiguration?.ortbConfig = "{\"ext\":{\"prebid\":{\"debug\":1,\"trace\":\"verbose\"}}}" +``` + +```kotlin +//ad unit / impression-level +adUnit?.ortbConfig = "{\"ext\":{\"gpid\":\"abc123\"}}" +``` + +## Further Reading + +- [Prebid Mobile Overview](/prebid-mobile/prebid-mobile.html) +- [Prebid SDK Android integration](/prebid-mobile/pbm-api/android/code-integration-android.html) diff --git a/prebid-mobile/pbm-api/ios/code-integration-ios.md b/prebid-mobile/pbm-api/ios/code-integration-ios.md index 065ed65767..6b417c9ed6 100644 --- a/prebid-mobile/pbm-api/ios/code-integration-ios.md +++ b/prebid-mobile/pbm-api/ios/code-integration-ios.md @@ -8,12 +8,12 @@ nav_section: prebid-mobile-ios sidebarType: 2 --- -# Integration for iOS +# Prebid SDK Integration for iOS {:.no_toc} Get started with Prebid Mobile by creating a [Prebid Server account](/prebid-mobile/prebid-mobile-getting-started.html). Once your account is set up include the Prebid Mobile SDK in your app by either using dependencies managers or by [cloning the repo](https://github.com/prebid/prebid-mobile-ios) and using our included script to build the SDK. -* TOC +- TOC {:toc} ## SDK Integration @@ -60,20 +60,18 @@ If you are not familiar with the Swift Package Manager, please refer to the proj **Variant 1** - * Run CarthageBuild.sh script from Cartfile folder. The path should be: + - Run CarthageBuild.sh script from Cartfile folder. The path should be: `.../Carthage/Checkouts/prebid-mobile-ios/scripts/CarthageBuild.sh` - - * Enter Schema name (PrebidMobile or PrebidMobileCore) - * If you run CarthageBuild.sh and see Permission denied use: + - Enter Schema name (PrebidMobile or PrebidMobileCore) + - If you run CarthageBuild.sh and see Permission denied use: `chmod +x ` **Variant 2** - * Open `PrebidMobile.xcodeproj` at `.../Carthage/Checkouts/prebid-mobile-ios/PrebidMobile.xcodeproj` using Xcode - - * Manage Schemes -> Check Shared checkbox for a necessary schema + - Open `PrebidMobile.xcodeproj` at `.../Carthage/Checkouts/prebid-mobile-ios/PrebidMobile.xcodeproj` using Xcode + - Manage Schemes -> Check Shared checkbox for a necessary schema + - run `carthage build prebid-mobile-ios` - * run `carthage build prebid-mobile-ios` 5. Integrate the binary into your project You can find the schema name in the build PrebidSDK framework inside Info.plist with `PrebidMobileName` key @@ -88,9 +86,9 @@ scripts/buildPrebidMobile.sh This will output the PrebidMobile.framework. -## Add SDK +## Add the Prebid SDK -### Set Prebid Server +### Point to a Prebid Server Once you have a [Prebid Server](/prebid-mobile/prebid-mobile-getting-started.html), you will add 'account' info to the Prebid Mobile. For example, if you're using the AppNexus Prebid Server: @@ -99,14 +97,26 @@ Prebid.shared.prebidServerAccountId = YOUR_ACCOUNT_ID Prebid.shared.prebidServerHost = .Appnexus ``` -If you have opted to host your own Prebid Server solution, you will need to store the URL to the server in your app. Make sure that your URL points to the [/openrtb2/auction](https://docs.prebid.org/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html) endpoint. +If you have opted to host your own Prebid Server solution, you will need to store the URL to the server in your app. Make sure that your URL points to the [/openrtb2/auction](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html) endpoint. ```swift -try! Prebid.shared.setCustomPrebidServer(url: PREBID_SERVER_AUCTION_ENDPOINT) +try! Prebid.shared.setCustomPrebidServer(url: "https://prebidserver.example.com/openrtb2/auction") ``` This method throws an exception if the provided URL is invalid. +#### Account Settings ID + +Each mobile app may have its own "account settings ID". This is used to look up data in Prebid Server like timeout, targeting, and price granularity. + +By default the Account Settings ID is set to be the same as the Account ID. i.e. the Prebid.shared.prebidServerAccountId property will set both values. +If you want to define a different Account Settings ID as determined in conjunction with +your Prebid Server team, use the [arbitrary OpenRTB](/prebid-mobile/pbm-api/android/pbm-targeting-params-android.html#arbitrary-openrtb) method like this: + +```swift +adUnitConfig.setOrtbConfig = "{\"ext\":{\"prebid\":{\"storedrequest\": {\"id\":\"account-settings-id\"}}}}" +``` + ### Initialize SDK Once you set the account ID and the Prebid Server host, you should initialize the Prebid SDK. There are several options for how to do it. @@ -171,11 +181,15 @@ Prebid.shared.customStatusEndpoint = PREBID_SERVER_STATUS_ENDPOINT If something goes wrong with the request, the status of the initialization callback will be `.serverStatusWarning`. It doesn't affect an SDK flow and just informs you about the health check result. -## Set Targeting Parameters +## Set Global Parameters + +There are several types of parameters app developers should consider providing to Prebid SDK: -Targeting parameters enable you to define the target audience for the bid request. Prebid Mobile supports the following global targeting parameters. These targeting parameters are set only once and apply to all Prebid Mobile ad units. They do not change for a given user session. +- Values that control Prebid SDK behavior (timeout, etc) +- Privacy consent settings (TCF, GPP, COPPA, etc). +- First Party Data to help bidders understand the context and/or user better. -View the full list of [targeting parameters](/prebid-mobile/pbm-api/ios/pbm-targeting-ios.html). +See the [global parameters page](/prebid-mobile/pbm-api/ios/pbm-targeting-ios.html) for details. ## Setup SDK @@ -217,8 +231,8 @@ public static let severe = LogLevel(stringValue: "[🔥]", rawValue: 5) `addStoredBidResponse`: Function containing two properties: -* `bidder`: Bidder name as defined by Prebid Server bid adapter of type string. -* `responseId`: Configuration ID used in the Prebid Server Database to store static bid responses. +- `bidder`: Bidder name as defined by Prebid Server bid adapter of type string. +- `responseId`: Configuration ID used in the Prebid Server Database to store static bid responses. Stored Bid Responses are similar to Stored Auction Responses in that they signal to Prebid Server to respond with a static pre-defined response, except Stored Bid Responses is done at the bidder level, with bid requests sent out for any bidders not specified in the bidder parameter. For more information on how stored auction responses work, refer to the written [description on github issue 133](https://github.com/prebid/prebid-mobile-android/issues/133). @@ -251,8 +265,8 @@ You can pass some SDK configuration properties from PBS to the SDK using the `ex For now Prebid SDK supports the following configuration properties: -* `cftbanner` - see the `Prebid.creativeFactoryTimeout` -* `cftprerender` - see the `Prebid.creativeFactoryTimeoutPreRenderContent` +- `cftbanner` - see the `Prebid.creativeFactoryTimeout` +- `cftprerender` - see the `Prebid.creativeFactoryTimeoutPreRenderContent` An example of a stored request: @@ -327,11 +341,11 @@ Prebid.shared.addStoredBidResponse(bidder: "rubicon", responseId: "221155") Follow the corresponding guide to integrate Prebid Mobile: -* [GAM using Original API](code-integration-ios.html) -* [No Ad Server](../../modules/rendering/ios-sdk-integration-pb.html) -* [GAM using Rendering API](../../modules/rendering/ios-sdk-integration-gam.html) -* [AdMob](../../modules/rendering/ios-sdk-integration-gam.html) -* [AppLovin MAX](../../modules/rendering/ios-sdk-integration-max.html) +- [GAM using Original API](code-integration-ios.html) +- [No Ad Server](/prebid-mobile/modules/rendering/ios-sdk-integration-pb.html) +- [GAM using Rendering API](/prebid-mobile/modules/rendering/ios-sdk-integration-gam.html) +- [AdMob](/prebid-mobile/modules/rendering/ios-sdk-integration-gam.html) +- [AppLovin MAX](/prebid-mobile/modules/rendering/ios-sdk-integration-max.html) ### Test configs diff --git a/prebid-mobile/pbm-api/ios/ios-sdk-integration-gam-original-api.md b/prebid-mobile/pbm-api/ios/ios-sdk-integration-gam-original-api.md index 0a33e55029..cb22ee381c 100644 --- a/prebid-mobile/pbm-api/ios/ios-sdk-integration-gam-original-api.md +++ b/prebid-mobile/pbm-api/ios/ios-sdk-integration-gam-original-api.md @@ -12,7 +12,7 @@ sidebarType: 2 Prebid Mobile is an open-source library that provides an end-to-end header bidding solution for mobile app publishers. -* TOC +- TOC {:toc} ## Overview @@ -78,8 +78,8 @@ func bannerViewDidReceiveAd(_ bannerView: GADBannerView) { Initialize the `BannerAdUnit` with the following properties: -* `configId` - an ID of the Stored Impression on the Prebid Server -* `adSize` - the size of the ad unit which will be used in the bid request. +- `configId` - an ID of the Stored Impression on the Prebid Server +- `adSize` - the size of the ad unit which will be used in the bid request. #### Step 2: Configure banner parameters {:.no_toc} @@ -88,10 +88,10 @@ Using the `BannerParameters` you can customize the bid request for the BannerAdU The `api` property is dedicated to adding values for API Frameworks to bid response according to the OpenRTB [2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) spec. The supported values for GMA SDK integration are: -* `3` or `Signals.Api.MRAID_1` : MRAID-1 support signal -* `5` or `Signals.Api.MRAID_2` : MRAID-2 support signal -* `6` or `Signals.Api.MRAID_3` : MRAID-3 support signal -* `7` or `Signals.Api.OMID_1` : signals OMSDK support +- `3` or `Signals.Api.MRAID_1` : MRAID-1 support signal +- `5` or `Signals.Api.MRAID_2` : MRAID-2 support signal +- `6` or `Signals.Api.MRAID_3` : MRAID-3 support signal +- `7` or `Signals.Api.OMID_1` : signals OMSDK support {: .alert.alert-warning :} Starting from PrebidMobile `2.1.0` the `parameters` property is deprecated. Use `bannerParameters` instead. @@ -164,8 +164,8 @@ Starting from PrebidMobile `2.1.0` the `VideoAdUnit` class is deprecated. Use `B Initialize the `BannerAdUnit` with the following properties: -* `configId` - an ID of the Stored Impression on the Prebid Server -* `adSize` - the size of the ad unit which will be used in the bid request. +- `configId` - an ID of the Stored Impression on the Prebid Server +- `adSize` - the size of the ad unit which will be used in the bid request. #### Step 2: Set ad format {:.no_toc} @@ -184,22 +184,22 @@ Using the `VideoParameters` you can customize the bid request for video ads. In the context of a VideoInterstitialAdUnit, rewarded video ads are typically labeled as interstitial. As such, Prebid SDK will default to value 5 if no placement value is supplied. -* `2` or `InBanner` : In-Banner placement exists within a web banner that leverages the banner space to deliver a video experience as opposed to another static or rich media format. The format relies on the existence of display ad inventory on the page for its delivery. -* `3` or `InArticle` : In-Article placement loads and plays dynamically between paragraphs of editorial content; existing as a standalone branded message. -* `4` or `InFeed` : In-Feed placement is found in content, social, or product feeds. -* `5` or `Slider`, `Floating` or `Interstitial` : Open RTB supports one of three values for option 5 as either Slider, Floating or Interstitial. If an enum value is supplied in placement, bidders will receive value 5 for placement type and assume to be interstitial with the instl flag set to 1. +- `2` or `InBanner` : In-Banner placement exists within a web banner that leverages the banner space to deliver a video experience as opposed to another static or rich media format. The format relies on the existence of display ad inventory on the page for its delivery. +- `3` or `InArticle` : In-Article placement loads and plays dynamically between paragraphs of editorial content; existing as a standalone branded message. +- `4` or `InFeed` : In-Feed placement is found in content, social, or product feeds. +- `5` or `Slider`, `Floating` or `Interstitial` : Open RTB supports one of three values for option 5 as either Slider, Floating or Interstitial. If an enum value is supplied in placement, bidders will receive value 5 for placement type and assume to be interstitial with the instl flag set to 1. #### api {:.no_toc} The `api` property is dedicated to adding values for API Frameworks to bid response according to the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) spec. The supported values for GMA SDK integration are: -* `1` or `Signals.Api.VPAID_1` : VPAID 1.0 -* `2` or `Signals.Api.VPAID_2` : VPAID 2.0 -* `3` or `Signals.Api.MRAID_1` : MRAID-1 support signal -* `5` or `Signals.Api.MRAID_2` : MRAID-2 support signal -* `6` or `Signals.Api.MRAID_3` : MRAID-3 support signal -* `7` or `Signals.Api.OMID_1` : signals OMSDK support +- `1` or `Signals.Api.VPAID_1` : VPAID 1.0 +- `2` or `Signals.Api.VPAID_2` : VPAID 2.0 +- `3` or `Signals.Api.MRAID_1` : MRAID-1 support signal +- `5` or `Signals.Api.MRAID_2` : MRAID-2 support signal +- `6` or `Signals.Api.MRAID_3` : MRAID-3 support signal +- `7` or `Signals.Api.OMID_1` : signals OMSDK support #### maxBitrate {:.no_toc} @@ -232,26 +232,26 @@ Required property. Array of OpenRTB 2.5 playback methods. If none are specified, any method may be used. Only one method is typically used in practice. It is strongly advised to use only the first element of the array. -* `1` or `Signals.PlaybackMethod.AutoPlaySoundOn` : Initiates on Page Load with Sound On -* `2` or `Signals.PlaybackMethod.AutoPlaySoundOff` : Initiates on Page Load with Sound Off by Default -* `3` or `Signals.PlaybackMethod.ClickToPlay` : Initiates on Click with Sound On -* `4` or `Signals.PlaybackMethod.MouseOver` : Initiates on Mouse-Over with Sound On -* `5` or `Signals.PlaybackMethod.EnterSoundOn` : Initiates on Entering Viewport with Sound On -* `6` or `Signals.PlaybackMethod.EnterSoundOff`: Initiates on Entering Viewport with Sound Off by Default +- `1` or `Signals.PlaybackMethod.AutoPlaySoundOn` : Initiates on Page Load with Sound On +- `2` or `Signals.PlaybackMethod.AutoPlaySoundOff` : Initiates on Page Load with Sound Off by Default +- `3` or `Signals.PlaybackMethod.ClickToPlay` : Initiates on Click with Sound On +- `4` or `Signals.PlaybackMethod.MouseOver` : Initiates on Mouse-Over with Sound On +- `5` or `Signals.PlaybackMethod.EnterSoundOn` : Initiates on Entering Viewport with Sound On +- `6` or `Signals.PlaybackMethod.EnterSoundOff`: Initiates on Entering Viewport with Sound Off by Default #### protocols {:.no_toc} Array or enum of OpenRTB 2.5 supported Protocols. Values can be one of: -* `1` or `Signals.Protocols.VAST_1_0` : VAST 1.0 -* `2` or `Signals.Protocols.VAST_2_0` : VAST 2.0 -* `3` or `Signals.Protocols.VAST_3_0` : VAST 3.0 -* `4` or `Signals.Protocols.VAST_1_0_Wrapper` : VAST 1.0 Wrapper -* `5` or `Signals.Protocols.VAST_2_0_Wrapper` : VAST 2.0 Wrapper -* `6` or `Signals.Protocols.VAST_3_0_Wrapper` : VAST 3.0 Wrapper -* `7` or `Signals.Protocols.VAST_4_0` : VAST 4.0 -* `8` or `Signals.Protocols.VAST_4_0_Wrapper` : VAST 4.0 Wrapper +- `1` or `Signals.Protocols.VAST_1_0` : VAST 1.0 +- `2` or `Signals.Protocols.VAST_2_0` : VAST 2.0 +- `3` or `Signals.Protocols.VAST_3_0` : VAST 3.0 +- `4` or `Signals.Protocols.VAST_1_0_Wrapper` : VAST 1.0 Wrapper +- `5` or `Signals.Protocols.VAST_2_0_Wrapper` : VAST 2.0 Wrapper +- `6` or `Signals.Protocols.VAST_3_0_Wrapper` : VAST 3.0 Wrapper +- `7` or `Signals.Protocols.VAST_4_0` : VAST 4.0 +- `8` or `Signals.Protocols.VAST_4_0_Wrapper` : VAST 4.0 Wrapper #### Step 4: Create a GAMBannerView {:.no_toc} @@ -333,8 +333,8 @@ func bannerViewDidReceiveAd(_ bannerView: GADBannerView) { Initialize the `BannerAdUnit` with the following properties: -* `configId` - an ID of the Stored Impression on the Prebid Server -* `adSize` - the size of the ad unit which will be used in the bid request. +- `configId` - an ID of the Stored Impression on the Prebid Server +- `adSize` - the size of the ad unit which will be used in the bid request. #### Step 2: Set ad formats {:.no_toc} @@ -410,9 +410,9 @@ adUnit.fetchDemand(adObject: gamRequest) { [weak self] resultCode in Initialize the InterstitialAdUnit with the following properties: -* `configId` - an ID of Stored Impression on the Prebid Server -* `minWidthPerc`: Optional parameter to specify the minimum width percent an ad may occupy of a device's real estate. Support in SDK version 1.2+ -* `minHeightPrec`: Optional parameter to specify the minimum height percent an ad may occupy of a device's real estate. Support in SDK version 1.2+ +- `configId` - an ID of Stored Impression on the Prebid Server +- `minWidthPerc`: Optional parameter to specify the minimum width percent an ad may occupy of a device's real estate. Support in SDK version 1.2+ +- `minHeightPrec`: Optional parameter to specify the minimum height percent an ad may occupy of a device's real estate. Support in SDK version 1.2+ > **NOTE:** As of version 1.2+, Prebid SDK has extended the functionality of Interstitial ad monetization by using a smart ad size selection process to monetize sizes smaller than full screen ads. App developers can specify a minimum width and minimum height percentage an ad can occupy of a devices real state, with Prebid Server (PBS) deriving a limited set of ad sizes (max 10) as eligible for the auction. > @@ -485,7 +485,7 @@ Starting from PrebidMobile `2.1.0` the `VideoInterstitialAdUnit` class is deprec Initialize the Interstitial Video Ad Unit with properties: -* `configId` - an ID of Stored Impression on the Prebid Server +- `configId` - an ID of Stored Impression on the Prebid Server #### Step 2: Set ad format {:.no_toc} @@ -556,9 +556,9 @@ adUnit.fetchDemand(adObject: gamRequest) { [weak self] resultCode in Initialize the InterstitialAdUnit with the following properties: -* `configId` - an ID of Stored Impression on the Prebid Server -* `minWidthPerc`: Optional parameter to specify the minimum width percent an ad may occupy of a device's real estate. Support in SDK version 1.2+ -* `minHeightPrec`: Optional parameter to specify the minimum height percent an ad may occupy of a device's real estate. Support in SDK version 1.2+ +- `configId` - an ID of Stored Impression on the Prebid Server +- `minWidthPerc`: Optional parameter to specify the minimum width percent an ad may occupy of a device's real estate. Support in SDK version 1.2+ +- `minHeightPrec`: Optional parameter to specify the minimum height percent an ad may occupy of a device's real estate. Support in SDK version 1.2+ > **NOTE:** As of version 1.2+, Prebid SDK has extended the functionality of Interstitial ad monetization by using a smart ad size selection process to monetize sizes smaller than full screen ads. App developers can specify a minimum width and minimum height percentage an ad can occupy of a devices real state, with Prebid Server (PBS) deriving a limited set of ad sizes (max 10) as eligible for the auction. > @@ -634,7 +634,7 @@ adUnit.fetchDemand(adObject: gamRequest) { [weak self] resultCode in Initialize the Rewarded Video Ad Unit with properties: -* `configId` - an ID of Stored Impression on the Prebid Server +- `configId` - an ID of Stored Impression on the Prebid Server ### Step 2: Configure video parameters {:.no_toc} @@ -755,8 +755,8 @@ Starting from PrebidMobile `2.1.0` the `VideoAdUnit` class is deprecated. Use `I Initialize the Instream Video Ad Unit with properties: -* `configId` - an ID of Stored Impression on the Prebid Server -* `size` - Width and height of the video ad unit. +- `configId` - an ID of Stored Impression on the Prebid Server +- `size` - Width and height of the video ad unit. ### Step 2: Configure video parameters {:.no_toc} @@ -849,8 +849,8 @@ nativeUnit.fetchDemand(adObject: gamRequest) { [weak self] resultCode in Initialize the `NativeRequest` with properties: -* `configId` - an ID of the Stored Impression on the Prebid Server -* `assets` - the array of `NativeAsset` objects which describes your native ad. +- `configId` - an ID of the Stored Impression on the Prebid Server +- `assets` - the array of `NativeAsset` objects which describes your native ad. ##### NativeAssetImage {:.no_toc} @@ -1017,8 +1017,8 @@ func nativeAdNotValid() { Initialize the `NativeRequest` with properties: -* `configId` - an ID of the Stored Impression on the Prebid Server -* `assets` - the array of `NativeAsset` objects which describes your native ad. +- `configId` - an ID of the Stored Impression on the Prebid Server +- `assets` - the array of `NativeAsset` objects which describes your native ad. ##### Step 2: Make a bid request {:.no_toc} @@ -1037,7 +1037,7 @@ Be sure that you make the ad request with the same `GAMRequest` object that you ##### Step 4: Implement GADCustomNativeAdLoaderDelegate protocol {:.no_toc} -In order to capture the native ad response you need to implement [GADCustomNativeAdLoaderDelegate](GADCustomNativeAdLoaderDelegate) protocol. +In order to capture the native ad response you need to implement the GADCustomNativeAdLoaderDelegate protocol. In the method `-adLoader:didReceiveCustomNativeAd:` you should pass the following Prebid functions: @@ -1165,16 +1165,16 @@ func nativeAdLoaded(ad: NativeAd) { Initialize the `PrebidAdUnit` with the following properties: -* `configId` - an ID of the Stored Impression on the Prebid Server +- `configId` - an ID of the Stored Impression on the Prebid Server ### Step 2: Setup the parameters {:.no_toc} -For each intersted ad format you should creatae a respective configuration parameter: +For each interested ad format you should creatae a respective configuration parameter: -* [BannerParameters](#step-2-configure-banner-parameters) object. -* [VideoParameters](#step-3-configure-the-video-parameters) object. -* [NativeParameters](#nativeparameters) object +- [BannerParameters](#step-2-configure-banner-parameters) object. +- [VideoParameters](#step-3-configure-the-video-parameters) object. +- [NativeParameters](#nativeparameters) object #### NativeParameters {:.no_toc} @@ -1299,138 +1299,21 @@ Halts the auto-refresh behavior for a given Prebid Mobile ad unit. If no auto-re Allows to resume the stopped autorefresh for the ad unit with predefined autorefresh value. -### Context Keyword - -#### addContextKeyword -{:.no_toc} - -Ad Unit context keywords object is a free form list of comma separated keywords about the app as defined in app.keyword in OpenRTB 2.5. The `addContextKeyword` function adds a single keyword to the ad unit. - -``` swift -func addContextKeyword(_ newElement: String) -``` - -#### addContextKeywords -{:.no_toc} - -Ad Unit context keywords object is a free form list of comma separated keywords about the app as defined in app.keyword in OpenRTB 2.5. The `addContextKeywords` function adds a multiple keyword to the ad unit. - -``` swift -func addContextKeywords(_ newElements: Set) -``` - -#### removeContextKeyword -{:.no_toc} - -``` swift -func removeContextKeyword(_ element: String) -``` - -### clearContextKeywords -{:.no_toc} - -``` swift -func clearContextKeywords() -``` - -### App Content - -The `ContentObject` allows you to provide more details about content within the app. All properties provided to the `ContentObject` will be sent in the `app.content` field of the bid request. - -``` swift -func setAppContent(_ appContent: ContentObject) - -func getAppContent() -> ContentObject? - -func clearAppContent() -``` - -### App Content Data - -Using the following methods you can add `app.content.data` objects to the bid requests. - -``` swift -func addAppContentData(_ dataObjects: [ContentDataObject]) - -func removeAppContentData(_ dataObject: ContentDataObject) - -func clearAppContentData() -``` - ### GPID (requires SDK v2.1.6) +The Global Placement ID (GPID) is a key that uniquely identifies a specific instance of an adunit. Some bidders require this value. An important scenario is "infinite scroll" -- if your app creates instances +of an adunit dynamically as the user scrolls through content, the the GPID must be different for each by appending some kind of sequence or ID. e.g. "/newsfeed#7" + Using the following method, you can set the impression-level [GPID](https://docs.prebid.org/features/pbAdSlot.html#the-gpid) value to the bid request: ``` swift adUnit.setGPID("/36117602/hnp-sfgate.com/Homepage/AP300") ``` -### User Data - -Using the following methods you can add `user.data` objects to the bid requests. - -``` swift -func getUserData() -> [PBMORTBContentData]? - -func addUserData(_ userDataObjects: [PBMORTBContentData]) - -func removeUserData(_ userDataObject: PBMORTBContentData) - -func clearUserData() -``` - -### Data Object - -The Data object is free form data (also known as First Party Data) supplied by the publisher to provide additional targeting of the user or inventory context, used primarily for striking PMP (Private MarketPlace) deals with Advertisers. Data supplied in the data parameters are typically not sent to DSPs whereas information sent in non-data objects (i.e. `setYearOfBirth`, `setGender`, etc.) will be. Access to FPD can be limited to a supplied set of Prebid bidders via an access control list. - -Data is broken up into two different data types: - -* User - * Global in scope only -* Inventory (context) - * Global scope - * Ad Unit grain - -The first party inventory context below will apply to the specic ad unit the data object is applied to. For global user or inventory context level first party data, refer to [first party data section of the Targeting](/prebid-mobile/pbm-api/ios/pbm-targeting-ios.html#first-party-data) page. - -#### addContextData -{:.no_toc} - -``` swift -func addContextData(key: String, value: String) -``` - -**Parameters** -`key`: string containing the key for the specific data object -`value`: String containing the value for the supplied key - -#### updateContextData -{:.no_toc} - -``` swift -func updateContextData(key: String, value: Set) -``` - -**Parameters** -`key`: string containing the key for the specific data object -`value`: String containing the value for the supplied key - -#### removeContextData -{:.no_toc} - -``` swift -func removeContextData(forKey: String) -``` - -**Parameters** -`key`: string containing the key for the specific data object -`value`: String containing the value for the supplied key +## Further Reading -#### clearContextData -{:.no_toc} - -``` swift -func clearContextData() -``` +- [Prebid Mobile Overview](/prebid-mobile/prebid-mobile.html) +- [Prebid SDK iOS integration](/prebid-mobile/pbm-api/ios/code-integration-ios.html) +- [Prebid SDK Global Parameters - iOS](/prebid-mobile/pbm-api/ios/pbm-targeting-ios.html) diff --git a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md index 8319f7f67b..9316280485 100644 --- a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md +++ b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md @@ -1,140 +1,261 @@ --- layout: page_v2 -title: Global Targeting Parameters - iOS -description: Prebid Mobile API global targeting parameters for iOS +title: Global Parameters - iOS +description: Prebid Mobile API global parameters for iOS top_nav_section: prebid-mobile nav_section: prebid-mobile sidebarType: 2 --- - -# Request parameters +# Prebid SDK Global Parameters - iOS {:.no_toc} -The tables below list the methods and properties that the Prebid Rendering API uses for customization. -The more data about the user, app, and device that can be provided the more chances to win an impression. - -It is advised that you strictly follow the recommendations in the tables below. Any field marked with an ❗is required and recommended. - -* TOC +- TOC {:toc} -## GPDR API +## How to Read this Guide -Prebid Mobile supports the [IAB GDPR recommendations](https://www.iab.com/topics/consumer-privacy/gdpr/). For a general overview of Prebid Mobile support for GDPR, see [Prebid Mobile Guide to European Ad Inventory and Providing Notice, Transparency and Choice](/prebid-mobile/prebid-mobile-privacy-regulation.html) +This page documents various global parameters you can set on the Prebid SDK for iOS. It describes the properties and methods of the Prebid SDK that allow you to supply important parameters to the header bidding auction. -Prebid SDK doesn't modify values for IAB-defined keys in the `UserDefaults`. Instead, SDK will keep the provided value in the in-memory property. +Specifically, app developers should consider each of these general sections: -The values provided via targeting API will be included in the bid request according to the `TCF v2` framework. +- Prebid SDK class parameters: these cover behavior of the SDK. Some values are required like a Prebid Server. +- Privacy / Consent Management parameters: we recommend developing a clear plan for user privacy with your legal counsel. +- First Party Data: data about the app or user that helps bidders choose an appropriate ad. -{% capture warning_note %} +{: .alert.alert-info :} +Note that the SDK's Targeting class uses the term "Targeting" loosely. It's mostly about +passing data to bidders that would help improve auction results. But there are also fields and methods +in the Targeting class that convey privacy data, Open Measurement info, and other data used beyond actual +bid targeting. -Since the SDK API has priority over CMP values, using the API blocks the CMP signals. Use a single way to provide the TCF signals. +## Prebid Class Global Properties and Methods -If you need to use an API way, ensure that all the following properties are set in the app code. +The `Prebid` class is a singleton that enables you to apply certain global settings. -If you need to use a CMP way, ensure that you don't set any of the following API properties. +### Prebid Class Global Properties -{% endcapture %} -{% include /alerts/alert_warning.html content=warning_note %} - -### Subject To GPDR +All of these properties of the Prebid class can be set on the `shared` object like this: ```swift -public var subjectToGDPR:Bool? +Prebid.shared.prebidServerAccountId="12345" +Prebid.shared.customStatusEndpoint="https://pbs.example.com/v2/status" ``` -You can retrieve and set the subjectToGDPR for targeting: +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Purpose | Description | Example | +| --- | --- | --- | --- | --- | --- | +| prebidServerAccountId | either | string | init | Your Prebid Server team will tell you whether this is required or not and if so, the value. | "abc123" | +| prebidServerHost | optional | enum | init | This can take the values "Appnexus", "Rubicon", or "Custom". If "Custom", you need to use the setCustomPrebidServerUrl() method to set a URL. This is where the Prebid SDK will send the auction information. Your Prebid Server team will tell you which value to use. The default is "Custom". | "Custom" | +| customStatusEndpoint | optional | string | init | Use this URL to check the status of Prebid Server. The default status endpoint is the PBS URL appended with '/status'. | `https://prebidserver``.example``.com/custom``/status` | +| shareGeoLocation | optional | boolean | ORTB | If this flag is true AND the app collects the user’s geographical location data, Prebid Mobile will send the user’s lat/long geographical location data to the Prebid Server. The default is false. | `true` | +| locationUpdatesEnabled | optional | boolean | ORTB | If true, the SDK will periodically try to listen for location updates. Default is `false`. | `true` | +| logLevel | optional | enum | SDK control | This property controls the level of logging output to the console. The value can be .error, .info, .debug, .verbose, .warn, .severe, and .info. The default is `.debug`. | `.error` | +| debugLogFileEnabled | optional | boolean | SDK control | If set to true, the output of PrebidMobile's internal logger is written to a text file. Default is `false`. | `true` | +| timeoutMillis | optional | integer | init | (SDK v1.2+) The Prebid SDK timeout. When this number of milliseconds passes, the Prebid SDK returns control to the ad server SDK to fetch an ad without Prebid bids. | 1000 | +| creativeFactoryTimeout | optional | integer | SDK control | Controls how long a banner creative has to load before it is considered a failure. This value is in seconds. The default is 6 seconds. | 10 | +| creativeFactoryTimeoutPreRenderContent | optional | integer | SDK control | Controls how much time video and interstitial creatives have to load before it is considered a failure. This value is in seconds. The default is 30 seconds. | 60 | +| storedAuctionResponse | optional | string | ORTB | For testing and debugging. Get this value from your Prebid Server team. It signals Prebid Server to respond with a static response from the Prebid Server Database. See [more information on stored auction responses](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#stored-responses). | "abc123-sar-test-320x50" | +| pbsDebug | optional | boolean | ORTB | Adds the debug flag (`test`:1) on the outbound http call to the Prebid Server. The `test` flag signals to the Prebid Server to emit the full resolved request and the full Bid Request and Bid Response to and from each bidder. | true | +| shouldAssignNativeAssetID | optional | boolean | ORTB | Whether to automatically assign an assetID for a Native ad. Default is `false`. | true | +| useCacheForReportingWithRenderingAPI | optional | boolean | ORTB | Indicates whether PBS should cache the bid on the server side. If the value is `true` the Prebid SDK will make the cache request to retrieve the cached asset. Default is `false`. | true | +| useExternalClickthroughBrowser | optional | boolean | SDK control | Controls whether to use PrebidMobile's in-app browser or the Safari App for displaying ad clickthrough content. Default is false. | true | +| impClickbrowserType | optional | enum | ORTB | Indicates the type of browser opened upon clicking the creative in an app. This corresponds to the OpenRTB imp.clickbrowser field. Values are "embedded" and "native". Default is "native". | "native". | +| includeWinners | optional | boolean | ORTB | If `true`, Prebid sdk will add `includewinners` flag inside the targeting object described in [PBS Documentation](prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#targeting) . Default is `false`. | `true` | +| includeBidderKeys | optional | boolean | ORTB | If `true`, Prebid sdk will add `includebidderkeys` flag inside the targeting object described in [PBS Documentation](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#targeting) . Default is `false`. | `true` | + +### Prebid Class Global Methods + +#### setCustomPrebidServerUrl() + +Defines which Prebid Server to connect to. See the initialization page for [iOS](/prebid-mobile/pbm-api/ios/code-integration-ios.html). + +#### addStoredBidResponse() + +Stored Bid Responses are for testing and debugging similar to Stored Auction Responses (see the Global Properties above). They signal Prebid Server to respond with a static pre-defined response, except Stored Bid Responses actually exercise the bidder adapter. For more information on how stored bid responses work, refer to the [Prebid Server endpoint doc](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#stored-responses). Your Prebid Server team will help you determine how best to setup test and debug. + +Signature: ```swift -guard let subjectToGDPR = Targeting.shared.subjectToGDPR else { - print("There was an error retrieving subjectToGDPR) - return -} +func addStoredBidResponse(bidder: String, responseId: String) ``` +Parameters: + +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| bidder | required | string | Bidder name as defined by Prebid Server | "bidderA" | +| responseId | required | string | ID used in the Prebid Server Database. Get this value from your Prebid Server team. | "abc123-sbr-test-300x250" | + +#### clearStoredBidResponses() + +This method clears any stored bid responses. It doesn’t take any parameters. + +Signature: + ```swift -Targeting.shared.subjectToGDPR = false +func clearStoredBidResponses() ``` - -### GDPR Consent String + +Parameters: none. + +#### addCustomHeader() + +This method enables you to customize the HTTP call to Prebid Server. + +Signature: ```swift -public var gdprConsentString? +func addCustomHeader(name: String, value: String) ``` -You can retrieve and set the subjectToGDPR for targeting: +Parameters: + +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Description | Example | +| --- | --- | --- | --- | --- | +| name | required | string | Name of the custom header | "X-mycustomheader" | +| value | required | string | Value for the custom header | "customvalue" | + +#### clearCustomHeaders() + +Allows you to clear any custom headers you have previously set. + +Signature: ```swift -guard let gdprConsentString = Targeting.shared.gdprConsentString else { - print("There was an error retrieving gdprConsentString") - return -} +func clearCustomHeaders() ``` +Parameters: none + +--- + +## Consent Management Parameters + +This section describes how app developers can provide info on user consent to the Prebid SDK and how SDK behaves under different kinds of restrictions. + +### iOS App Tracking Transparency + +You should follow Apple's Guidelines on implementing [App Tracking Transparency](https://developer.apple.com/documentation/apptrackingtransparency). The Prebid SDK automatically sends ATT signals, so no Prebid-specific work is required. + +### GDPR / TCF-EU + +Prebid Mobile supports [IAB TCF](https://iabeurope.eu/transparency-consent-framework/). For a general overview of Prebid Mobile support for GDPR, see the [Prebid Mobile Guide to Privacy Regulation](/prebid-mobile/prebid-mobile-privacy-regulation.html). + +There are two ways to provide information on user consent to the Prebid SDK: + +- Explicitly via Prebid SDK API: publishers can provide TCF data via Prebid SDK’s 'Targeting' class. +- Implicitly set through the Consent Management Platform (CMP): Prebid SDK reads the TCF data stored in `UserDefaults`. This is the preferred approach. + +{: .alert.alert-warning :} +The Prebid SDK prioritizes values set explicitly through the API over those stored by the CMP. If the publisher provides TCF data both ways, the values set through the API will be sent to the PBS, and values stored by the CMP will be ignored. + +#### Setting TCF-EU Values with the API + +Prebid SDK provides three properties to set TCF consent values explicitly, though this method is not preferred. Ideally, the Consent Management Platform will set these values – see the next section. + +If you need to set the values directly, here's how to indicate that the user is subject to GDPR: + +Swift: + ```swift -Targeting.shared.gdprConsentString = "A String" +Targeting.shared.subjectToGDPR = false +Targeting.shared.setSubjectToGDPR(false) ``` -### Purpose Consent +To provide the consent string: + +Swift: ```swift -public var purposeConsents: String? +Targeting.shared.gdprConsentString = "BOMyQRvOMyQRvABABBAAABAAAAAAEA" ``` -You can retrieve and set the purposeConsents for targeting: +To set the purpose consent: + +Swift: ```swift Targeting.shared.purposeConsents = "100000000000000000000000" ``` -## Targeting properties +See also the API references for getSubjectToGDPR(), getDeviceAccessConsent(), getDeviceAccessConsentObjc, getPurposeConsent(), isAllowedAccessDeviceData(). -{: .table .table-bordered .table-striped } +#### Getting Consent Values from the CMP + +Prebid SDK reads the values for the following keys from the `UserDefaults` object: + +- **IABTCF_gdprApplies** - indicates whether the user is subject to GDPR +- **IABTCF_TCString** - full encoded TC string +- **IABTCF_PurposeConsents** - indicates the consent status for the purpose. + +For more detailed information, read the [In-App Details section](https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20CMP%20API%20v2.md#in-app-details) of the TCF. + +{: .alert.alert-warning :} +Publishers shouldn’t explicitly assign values for these keys unless they have a custom-developed Consent Management Platform (CMP). If the publisher wants to provide this data to the Prebid SDK, they should use the explicit APIs described above. + +Here's how Prebid SDK processes CMP values: + +- It reads CMP values during the initialization and on each bid request, so the latest value is always used. +- It doesn’t verify or validate CMP values in any way + +### CCPA / US Privacy + +The California Consumer Protection Act prompted the IAB to implement the "US Privacy" protocol. + +Prebid SDK reads and sends USP/CCPA signals according to the [US Privacy User Signal Mechanism](https://github.com/InteractiveAdvertisingBureau/USPrivacy/blob/master/CCPA/USP%20API.md) and [OpenRTB extension](https://github.com/InteractiveAdvertisingBureau/USPrivacy/blob/7f4f1b2931cca03bd4d91373bbf440071823f257/CCPA/OpenRTB%20Extension%20for%20USPrivacy.md). + +Prebid SDK reads the value for the `IABUSPrivacy_String` key from the `UserDefaults` and sends it in the `regs.ext.us_privacy` object of the OpenRTB request. + +### COPPA + +The Children's Online Privacy Protection Act of the United States is a way for content producers to declare that their content is aimed at children, which invokes additional privacy protections. + +Prebid SDK follows the OpenRTB 2.6 spec and provides an API to indicate whether the current content falls under COPPA regulation. Publishers can set the respective flag using the targeting API: -| **Variable** | **Description** | **Required?** | -| -------------------- | ---------------- | ------------------------------------------------------------ | ------------------------ | -| `storeURL` | Stores URL for the mobile application. For example: `"https://itunes.apple.com/us/app/your-app/id123456789"` | ❗ Required | -|`contentUrl` | This is the deep-link URL for the app screen that is displaying the ad. This can be an iOS universal link. | ❗ Highly Recommended | -|`publisherName`| App's publisher's name. | ❗ Highly Recommended | -| `yearOfBirth` | For example: `1987` | ❗ Highly Recommended | -| `coppa` or `subjectToCOPPA` | Flag indicating if this request is subject to the COPPA regulations established by the USA FTC, where 0 = no, 1 = yes | ❗ Highly Recommended | -| `userGender` | User's gender (Male, Female, Other, Unknown). For example: `.female` | ❗ Highly Recommended | -|`userGenderDescription`| String representation of the user's gender, where “M” = male, “F” = female, “O” = known to be other (i.e., omitted is unknown) | | -| `userID` | ID of the user within the app. For example: `"24601"` | ❗ Highly Recommended | -| `buyerUID` | Buyer-specific ID for the user as mapped by the exchange for the buyer. | ❗ Highly Recommended | -| `keywords` | Comma separated list of keywords, interests, or intent | Optional | -| `userCustomData`| Optional feature to pass bidder the data that was set in the exchange’s cookie. The string must be in base85 cookie safe characters and be in any format. Proper JSON encoding must be used to include “escaped” quotation marks. | Optional | -|`userExt`| Placeholder for exchange-specific extensions to OpenRTB. | Optional | -|`domain`|Retrieve and set the domain of your app|Optional| -|`itunesID`|Retrieve and set the domain of your iTunes ID with the below command. This field will be transmitted to buyers as the bundle ID as recommended in OpenRTB 2.5. Failure to supply this value can have a negative monetary impact.|Optional| - -The code sample: +Swift: ```swift -let targeting = Targeting.shared - -targeting.userGender = .male -targeting.yearOfBirth = 1987 -targeting.userID = "X345Y678Z890" +Targeting.shared.subjectToCOPPA = true ``` +Prebid SDK passes this flag in the `regs.coppa` object of the bid requests. + +If you're app developer setting this COPPA flag, we recommend you also: + +- set the `shareGeoLocation` property to false +- avoid passing any sensitive first party data + +### Global Privacy Platform (GPP) + +A Consent Management Platform (CMP) utilizing [IAB's Global Privacy Protocol](https://iabtechlab.com/gpp/) is a comprehensive way for apps to manage user consent across multiple regulatory environments. + +Since version 2.0.6, Prebid SDK reads and sends GPP signals: + +- The GPP string is read from IABGPP_HDR_GppString in `UserDefaults`. It is sent to Prebid Server on `regs.gpp`. +- The GPP Section ID is likewise read from IABGPP_GppSID. It is sent to Prebid Server on `regs.gpp_sid`. + +--- + ## Open Measurement SDK (OMSDK) API -> **NOTE**: these properties are relevant only for the original Prebid integration into GAM monetization. In this case the creative is rendered by GMA SDK and publishers should provide OMID description in the bid re qest. If you use Prebid SDK as a rendering engine you shouldn't use these properties. Prebid SDK sends them automaticaly according to the current OMID setup. +{: .alert.alert-info :} +Defining OMSDK values is only relevant for the 'Bidding-Only' Prebid integration with GAM. In this case the creative is rendered by GMA SDK and publishers should provide OMID description in the bid request. If you use Prebid SDK as a rendering engine you shouldn’t use these properties -- it sends them automaticaly according to the current OMID setup. -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 eligible for OMSDK support. Original API of 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. +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 that the impression is eligible 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: +There are three components to signaling support for OMSDK: -* Partner Name -* Partner Version -* API code +- Partner Name +- Partner Version +- Banner API code ### Partner Name {:.no_toc} -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 +The [IAB OMSDK compliant partner name](https://complianceomsdkapi.iabtechlab.com/compliance/latest) responsible for integrating with the OMSDK spec. ```swift Targeting.shared.omidPartnerName = "Google" @@ -143,43 +264,39 @@ Targeting.shared.omidPartnerName = "Google" ### Partner Version {:.no_toc} -The OMSDK version number the partner integrated with. See below for configuration and examples. +The OMSDK version number for the integration partner. ```swift Targeting.shared.omidPartnerVersion = "1.0" ``` -## Targeting methods +### Banner API Code -{: .table .table-bordered .table-striped } - -### 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. Prebid provides following functions to manage context keywords: +The following code lets bidders know that Open Measurement is being used for this adunit: ```swift -func addContextKeyword(_ newElement: String) +let parameters = BannerParameters() +parameters.api = [Signals.Api.OMID_1] +``` -func addContextKeywords(_ newElements: Set) +This translates in OpenRTB to `imp[].banner.api=7`. -func removeContextKeyword(_ element: String) +--- -func clearContextKeywords() -``` +## First Party Data -Example: +First Party Data (FPD) is information about the app or user known by the developer that may be of interest to advertisers. -```swift -Targeting.shared.addContextKeyword("globalContextKeywordValue1") -Targeting.shared.addContextKeyword("globalContextKeywordValue2") -Targeting.shared.addContextKeyword("globalContextKeywordValue3") -``` +- User FPD includes details about a specific user like "frequent user" or "job title". This data if often subject to regulatory control, so needs to be specified as user-specific data. Note that some attributes like health status are limited in some regions. App developers are strongly advised to speak with their legal counsel before passing User FPD. +- Inventory or Contextual FPD includes details about the particular part of the app where the ad will displayed like "sports/basketball" or "editor 5-star rating". -### First Party User Data +### User FPD -Prebid provides following functions to manage First Party User Data: +Prebid SDK provides a number of properties in the [Targeting class](/prebid-mobile/pbm-api/ios/pbm-targeting-ios.html#targeting-class-properties-and-methods) for setting user-oriented First Party Data. ```swift +func setLatitude(latitude: Double, longitude: Double) + func addUserData(key: String, value: String) func updateUserData(key: String, value: Set) @@ -187,133 +304,126 @@ func updateUserData(key: String, value: Set) func removeUserData(forKey: String) func clearUserData() -``` - -Example: - -```swift -Targeting.shared.addUserData(key: "globalUserDataKey1", value: "globalUserDataValue1") -``` -### First Party Inventory (Context) Data +func addUserKeyword(_ newElement: String) -Prebid provides following functions to manage First Party Inventory Data: +func addUserKeywords(_ newElements: Set) -```swift -func addContextData(key: String, value: String) - -func updateContextData(key: String, value: Set) +func removeUserKeyword(_ element: String) -func removeContextData(forKey: String) +func clearUserKeywords() -func clearContextData() +func getUserKeywords() ``` Example: ```swift -Targeting.shared.addContextData(key: "globalContextDataKey1", value: "globalContextDataValue1") +Targeting.shared.addUserData(key: "globalUserDataKey1", value: "globalUserDataValue1") ``` -### Access Control +{: .alert.alert-info :} +Note: The 'UserData' functions end up putting data into the OpenRTB user.ext.data object while the 'UserKeywords' functions +put data into user.keywords. -The First Party Data Access Control List provides a methods to restrict access to first party data to a supplied list of bidders. +See also the API reference for setYearOfBirth(), getYearOfBirth() and clearYearOfBirth(). -```swift -func addBidderToAccessControlList(_ bidderName: String) +### Inventory FPD -func removeBidderFromAccessControlList(_ bidderName: String) +Prebid SDK provides a number of methods and properties in the [Targeting class](/prebid-mobile/pbm-api/ios/pbm-targeting-ios.html#targeting-class-properties-and-methods) for setting content-oriented First Party Data. -func clearAccessControlList() -``` +```swift +func addAppExtData(key: String, value: String) -Example: +func updateAppExtData(key: String, value: Set) -```swift -Targeting.shared.addBidderToAccessControlList(Prebid.bidderNameRubiconProject) -``` +func removeAppExtData(for key: String) -### Custom Params +func clearAppExtData() -The methods that add or change the custom parameters. The name will be auto-prepended with `c.` to avoid collisions. +func getAppExtData() -```swift -public func addCustomParam(_ value: String, withName: String?) +func addAppKeyword(_ newElement: String) -public func setCustomParams(_ params: [String : String]?) -``` +func addAppKeywords(_ newElements: Set) -### Parameter +func removeAppKeyword(_ element: String) -Adds a new param by name and sets its value. +func clearAppKeywords() -```swift -public func addParam(_ value: String, withName: String?) +func getAppKeywords() ``` -### Latitude Longitude - -Store location in the user's section +Example: ```swift -public func setLatitude(_ latitude: Double, longitude: Double) +Targeting.shared.addAppExtData((key: "globalContextDataKey1", value: "globalContextDataValue1") ``` -### ORTBConfig +### Controlling Bidder Access to FPD -(requires SDK v2.2.1) +Prebid Server will let you control which bidders are allowed access to First Party Data. Prebid SDK collects this an Access Control List with the following methods: -Provides a way for app publishers to customize most ORTB fields in the partial bid request that Prebid Mobile sends to the Prebid Server. The customization comes in the form of the setOrtbConfig() method that takes a JSON String as input. The JSON string must follow the [ORTB guidelines](https://github.com/InteractiveAdvertisingBureau/openrtb2.x/blob/develop/2.6.md#321---object-bidrequest-) as it will be merged with the current JSON of the bid request. If you choose to input extra data using the setOrtbConfig() method, please extensively test your requests sent to Prebid Server. +```swift +func addBidderToAccessControlList(_ bidderName: String) -There are certain protected fields such as regs, device, geo, ext.gdpr, ext.us_privacy, and ext.consent which cannot be changed. +func removeBidderFromAccessControlList(_ bidderName: String) -```swift -//global invocation -adUnitConfig.setOrtbConfig("{"ext":{"prebid":{"debug":1,"trace":"verbose"}}}") +func clearAccessControlList() ``` +Example: + ```swift -//ad unit / impression-level -adUnit.setOrtbConfig("{"ext":{"gpid":"abc123"}}") +Targeting.shared.addBidderToAccessControlList(Prebid.bidderNameRubiconProject) ``` -## User Identity API +--- + +## User Identity -Prebid SDK supports two interfaces to pass / maintain User IDs and ID vendor details: +Mobile apps traditionally rely on IDFA-type device IDs for advertising, but there are other User ID systems available to app developers and more will be made available in the future. Prebid SDK supports two ways to maintain User ID details: -* Real-time in Prebid SDK's API field externalUserIdArray -* Store User Id(s) in local storage +- A global property - in this approach, the app developer sets the IDs while initializing the Prebid SDK. This data persists only for the user session. +- Local storage - the developer can choose to store the IDs persistently in local storage and Prebid SDK will utilize them on each bid request. -Any identity vendor's details in local storage will be sent over to Prebid Server as is, unadulterated. If data is sent in the API and entered into local storage, the API detail will prevail. +Any identity vendor's details in local storage will be sent to Prebid Server unadulterated. If user IDs are set both in the property and entered into local storage, the property data will prevail. -### Prebid SDK API Access +{: .alert.alert-info :} +Note that the phrase "EID" stands for "Extended IDs" in [OpenRTB 2.6](https://github.com/InteractiveAdvertisingBureau/openrtb2.x/blob/main/2.6.md), but for historic reasons, Prebid SDK methods use the word "external" rather than "extended". Please consider the phrase "external ID" a synonym for "extended ID". -Prebid SDK supports passing an array of UserID(s) at auction time in the field externalUserIdArray, that is globably scopped. It is sufficient enough to set the externalUserIdArray object once per user session, as these values would be used in all consecutive ad auctions in the same session. +### Storing IDs in a Property + +Prebid SDK supports passing an array of EIDs at auction time in the Prebid global field `externalUserIdArray`. Setting the `externalUserIdArray` object once per user session is sufficient unless one of the values changes. ```swift public var externalUserIdArray = [ExternalUserId]() ``` -**Exmaples** +**Examples** ```swift // User Id from External Third Party Sources var externalUserIdArray = [ExternalUserId]() externalUserIdArray.append(ExternalUserId(source: "adserver.org", identifier: "111111111111", ext: ["rtiPartner" : "TDID"])) -externalUserIdArray.append(ExternalUserId(source: "netid.de", identifier: "999888777")) -externalUserIdArray.append(ExternalUserId(source: "criteo.com", identifier: "_fl7bV96WjZsbiUyQnJlQ3g4ckh5a1N")) +externalUserIdArray.append(ExternalUserId(source: "netid.de", identifier: "999888777")) +externalUserIdArray.append(ExternalUserId(source: "criteo.com", identifier: "_fl7bV96WjZsbiUyQnJlQ3g4ckh5a1N")) externalUserIdArray.append(ExternalUserId(source: "liveramp.com", identifier: "AjfowMv4ZHZQJFM8TpiUnYEyA81Vdgg")) -externalUserIdArray.append(ExternalUserId(source: "sharedid.org", identifier: "111111111111", atype: 1, ext: ["third" : "01ERJWE5FS4RAZKG6SKQ3ZYSKV"])) +externalUserIdArray.append(ExternalUserId(source: "sharedid.org", identifier: "111111111111", atype: 1)) Prebid.shared.externalUserIdArray = externalUserIdArray ``` -### Local Storage +```kotlin +setExternalUserIds(List externalUserIds) +``` + +### Storing IDs in Local Storage -Prebid SDK provides a local storage interface to set, retrieve or update an array of user IDs with associated identity vendor details. Prebid SDK will retrieve and pass User IDs and ID vendor details to PBS if values are present in local storage. The main difference between the Prebid API interface and the local storage interface is the persistence of storage of data. Local Storage data will persist across user sessions whereas the Prebid API interface (externalUserIdArray) persists only for the user session. If a vendor's details are passed both in local storage and the Prebid API at the same time, the Prebid API data (externalUserIdArray) will prevail. +Prebid SDK provides a local storage interface to set, retrieve, or update an array of user IDs with associated identity vendor details. It will then retrieve and pass these User IDs to Prebid Server on each auction, even on the next user session. -Prebid SDK Provides five functions to handle User ID details: +Prebid SDK Provides several functions to handle User ID details within the local storage: ```swift public func storeExternalUserId(_ externalUserId: ExternalUserId) @@ -331,7 +441,7 @@ public func removeStoredExternalUserIds() ```swift //Set External User ID -Targeting.shared.storeExternalUserId(ExternalUserId(source: "sharedid.org", identifier: "111111111111", atype: 1, ext: ["third" : "01ERJWE5FS4RAZKG6SKQ3ZYSKV"])) +Targeting.shared.storeExternalUserId(ExternalUserId(source: "sharedid.org", identifier: "111111111111", atype: 1)) //Get External User ID let externalUserIdSharedId = Targeting.shared.fetchStoredExternalUserId("sharedid.org") @@ -345,3 +455,64 @@ Targeting.shared.removeStoredExternalUserId("sharedid.org") //Remove All External UserID Targeting.shared.removeStoredExternalUserIds() ``` + +--- + +## Targeting Class Properties and Methods + +There are several other fields app developers may want to set to give bidders additional information about the auction. + +### Targeting Class Properties + +Note that several of the properties noted here are also mentioned above for other use cases, e.g. `subjectToCOPPA`. All properties of the 'Targeting' class are listed here. + +{: .table .table-bordered .table-striped } +| Parameter | Scope | Type | Platform | Description | Example | +| --- | --- | --- | --- | --- | --- | +| storeURL | recommended | string | both | App store URL for an installed app; for Inventory Quality Guidelines 2.1 compliance. Translates to OpenRTB app.storeurl | `https://apps.apple.com/app/id111111111` | +| contentUrl | recommended | string | both | This is the deep-link URL for the app screen that is displaying the ad. This can be an iOS universal link. | | +| publisherName | recommended | string | both | OpenRTB app.publisher.name | "Example, Co." | +| itunesID | recommended | string | both | Translates to OpenRTB app.bundle | "11111111" | +| coppa | optional | integer | objC | Defines whether this content is meant for children. 0=false, 1=true. Defaults to false. | 1 | +| subjectToCOPPA | optional | boolean | swift | Defines whether this content is meant for children. Defaults to false. | `true` | +| sourceapp | optional | string | both | Translates to OpenRTB app.name | "Example App" | +| domain | optional | string | both | Translates to OpenRTB app.domain | "example.com" | +| omidPartnerName | optional | string | both | The [IAB OMSDK compliant partner name](https://complianceomsdkapi.iabtechlab.com/compliance/latest) responsible for integrating with the OMSDK spec. | "Google" | +| omidPartnerVersion | optional | string | both | The OMSDK version number for the integration partner. | "1.0" | +| userGender | optional | enum | both | "M" = male, "F" = female, "O" = known to be other (i.e., omitted is unknown) | "F" | +| userExt | optional | array of key-value pairs | both | This is a dictionary of key-value pairs that forms the user.ext object. Prebid requires user-first party data in user.ext.data, so this should be a dictionary that contains a 'data' key whose value is another dictionary. | { data: { key1: val1, key2: val2 }}| +| subjectToGDPR | discouraged | boolean | ? | Defines whether this request is in-scope for European privacy regulations. See [above](/prebid-mobile/pbm-api/ios/pbm-targeting-ios#gdpr--tcf-eu) for more information. | `true` | +| gdprConsentString | discouraged | string | both | See the [GDPR settings](/prebid-mobile/pbm-api/ios/pbm-targeting-ios#gdpr--tcf-eu) section above. | | +| purposeConsents | discouraged | string | both | See the [GDPR settings](/prebid-mobile/pbm-api/ios/pbm-targeting-ios#gdpr--tcf-eu) section above. | | + +### Targeting Class Methods + +All of the targeting class methods have been mentioned above in the context of First Party Data and are linked to +the API reference. + +--- + +## Arbitrary OpenRTB + +(requires SDK v2.2.1) + +While there are many specific methods for adding data to the request detailed in +this document, OpenRTB is big and it moves quickly. To cover scenarios not already covered by an existing method, +Prebid SDK Provides a way for app publishers to customize most ORTB fields in the partial bid request that Prebid Mobile sends to the Prebid Server. The customization comes in the form of the ortbConfig parameter that takes a JSON String as input. The JSON string must follow the [OpenRTB structure](https://github.com/InteractiveAdvertisingBureau/openrtb2.x/blob/main/2.6.md) -- it will be merged with the current JSON of the bid request. If you choose to input extra data using the ortbConfig parameter, please extensively test your requests sent to Prebid Server. + +There are certain protected fields such as regs, device, geo, ext.gdpr, ext.us_privacy, and ext.consent which cannot be changed. + +```swift +//global invocation +adUnitConfig.setOrtbConfig("{\"ext\":{\"prebid\":{\"debug\":1,\"trace\":\"verbose\"}}}") +``` + +```swift +//ad unit / impression-level +adUnit.setOrtbConfig("{\"ext\":{\"gpid\":\"abc123"}}\") +``` + +## Further Reading + +- [Prebid Mobile Overview](/prebid-mobile/prebid-mobile.html) +- [Prebid SDK iOS integration](/prebid-mobile/pbm-api/ios/code-integration-ios.html) diff --git a/prebid-mobile/prebid-mobile-getting-started.md b/prebid-mobile/prebid-mobile-getting-started.md index 85f0e453f7..b615514bc4 100644 --- a/prebid-mobile/prebid-mobile-getting-started.md +++ b/prebid-mobile/prebid-mobile-getting-started.md @@ -5,9 +5,7 @@ description: Getting Started with Prebid Mobile sidebarType: 2 --- - # Getting Started with Prebid Mobile - {:.no_toc} This page gives an overview of steps you need to take, either as an ad ops user or as a developer, to start using Prebid Mobile. @@ -34,40 +32,77 @@ Prebid Server is an open source project. This allows you to host your own implem See the [Prebid Server documentation](/prebid-server/overview/prebid-server-overview.html) for more information on [setting up your own server host](/prebid-server/hosting/pbs-hosting.html). -### A note on Accounts +### Accounts and Account Settings + +Several pages and examples in the mobile documentation refer to entering a "Prebid Server Account ID". -Several pages and examples in the mobile documentation refer to entering your "Prebid Server Account ID". +There are actually two important concepts: -In actuality, an `account ID` is just the name of the “top-level” stored request as described on the [Prebid Server Stored Request page](/prebid-server/features/pbs-storedreqs.html). +- The Prebid Server "account id" is given by your Prebid Server provider. If you're an app developer running your own Prebid Server, you may not have an account ID at all. +- Each mobile app may have its own "account settings ID". This is used to look up data in Prebid Server like timeout, targeting, and price granularity. It's possible for the "account id" and the "auction settings id" to be the same thing, but this is not always the case. -By convention, most Prebid Server host companies define the top level stored request ID as the account ID they assign to the publisher. -This is a convenient convention since publishers generally set the same timeout and price granularity across all apps. -But it may not be the case for your Prebid Server host company, so please check with them. -If you’re hosting your own Prebid Server, this value can be whatever value you wish, not necessarily an account ID. +Work with your Prebid Server team to determine which scenario to implement: + +- keep "account ID" and "account settings ID" the same. +- establish separate "account ID" and "account settings ID" + +See the "integration" pages for each platform for details on how to set up both scenarios. ## Configure Prebid Server -After you've registered with your chosen Prebid Server host, you need to create at least one Prebid Server bidder configuration in a [stored request](/prebid-server/features/pbs-storedreqs.html). Each stored request configuration contains a list of bidders and their parameters. The configuration will be in the form of a JSON structure, similar to this: +### Auction Setting IDs / Top-Level Stored Requests + +Working with your Prebid Server host, you will need to create at least one "account settings" block. Prebid Server calls this a [top-level stored request](/prebid-server/features/pbs-storedreqs.html). Each top-level stored request contains parameters that are global to the entire auction, not just +one adunit. The configuration will be in the form of a JSON structure that will be merged into the OpenRTB. Something like this: + +```json +{ + "cur": [ + "EUR" + ], + "ext": { + "prebid": { + "cache": { + "bids": {} + }, + "targeting": { + "pricegranularity": "dense", + "includewinners": true, + "includebidderkeys": true, + "includeformat": true + } + } + } +} +``` + +Your Prebid Server team should be able to help you decide which parameters are needed and how to get them into Prebid Server. + +### Config IDs / Impression-Level Stored Requests + +Again, working with your Prebid Server host, there are likely to be many adunit configurations. Prebid Mobile calls this thing a "Config ID", while Prebid Server calls it an [impression-level stored request](/prebid-server/features/pbs-storedreqs.html). Each stored request configuration contains a list of bidders and their parameters. The configuration will be in the form of a JSON structure that will be merged into the OpenRTB `imp` element. Something like this: ```json -[ - { - "bidder": "appnexus", +{ + "ext": { + "prebid": { + "bidder": "bidderA", "params": { - "placementId": 13144370 + "placementId": 1111111111 } } -] + } +} ``` -The preceding is an example "impression-level stored request" using AppNexus as the bidder. The parameters you need to set differ for each bidder. See [Bidder Parameters](/prebid-server/developers/add-new-bidder-go.html) for a full list of parameters for available Prebid Server bidders. - -Each block of JSON like this is called a "stored request" and gets an ID called a "stored request ID". This ID is then programmed into an adslot using the iOS or Android SDKs. Doing it this way allows the publisher to change bidders and parameters without +Each block of JSON like this is called a "stored request" and gets an ID called a "stored request ID". This ID is then linked to an adslot using the iOS or Android SDKs, which refer to it as a "Config ID". Doing it this way allows the publisher to change bidders and parameters without having to change the app. -### Testing with stored configurations +In general, the recommendation is to create different imp-level stored request for each adunit in your app so that you can manage the bidders and their inventory parameters separately. + +### Testing with stored responses -If you want to verify the SDK integration with test placements, you can add some [Stored Responses](https://docs.prebid.org/troubleshooting/pbs-troubleshooting.html#stored-responses) to your Prebid Server: +If you want to verify the SDK integration with test placements, you can add some [Stored Responses](/troubleshooting/pbs-troubleshooting.html#stored-responses) to your Prebid Server: 1. Work with your Prebid Server provider to install the [Mobile Test Stored Requests](https://github.com/prebid/prebid-mobile-ios/tree/master/Example/PrebidDemo/stored-configs/stored-impressions) and [Mobile Test Stored Responses](https://github.com/prebid/prebid-mobile-ios/tree/master/Example/PrebidDemo/stored-configs/stored-responses). (Note: stored "impressions" are a special case of stored "requests" - your Prebid Server provider will know what to do.) 1. Confirm that the bid prices in the stored responses reflects what you want to test. If you're using an ad server, you'll need line items set up that reflect the test bid CPMs and your price granularity setup. @@ -83,33 +118,20 @@ If you want to verify the SDK integration with test placements, you can add some Ad ops users configure the primary ad server with Prebid Mobile line items targeted to key/values. - [Set Up Line Items for Google Ad Manager](/adops/step-by-step.html) +- [Price Granularity](/adops/price-granularity.html) Additional details to help you ensure your line items are set up to target bid prices at an appropriate level of granularity. ## Developers - Using the SDK To begin using Prebid Mobile follow the instructions for the respective platforms and integration approach: -- [iOS Code Integration]({{site.github.url}}/prebid-mobile/pbm-api/ios/code-integration-ios.html) -- [Android Code Integration]({{site.github.url}}/prebid-mobile/pbm-api/android/code-integration-android.html) +- [iOS Code Integration](/prebid-mobile/pbm-api/ios/code-integration-ios.html) +- [Android Code Integration](/prebid-mobile/pbm-api/android/code-integration-android.html) ## Additional Information The following resources are available for further information on working with Prebid Mobile: -### Ad Ops - -- [Price Granularity](/adops/price-granularity.html) Additional details to help you ensure your line items are set up to target bid prices at an appropriate level of granularity. - -### Mobile Developers - -#### Targeting Parameters - -Learn about the parameters available in the Prebid SDK - -- [iOS Targeting Parameters](/prebid-mobile/pbm-api/ios/pbm-targeting-ios.html) Learn about the parameters available in the iOS Prebid Mobile SDK. -- [Android Targeting Parameters](/prebid-mobile/pbm-api/android/pbm-targeting-params-android.html) Learn about the parameters available in the Android Prebid Mobile SDK. - -#### GDPR - -Prebid Mobile provides APIs for app publishers in support of the [IAB Europe Transparency & Consent Framework](https://www.iab.com/topics/consumer-privacy/gdpr/). +## Futher Reading -For general information on these APIs see [Prebid Mobile Guide to Privacy Regulation]({{site.baseurl}}/prebid-mobile/prebid-mobile-privacy-regulation.html). +- [How Prebid Server works with Prebid SDK](/prebid-server/use-cases/pbs-sdk.html) +- [Prebid Mobile FAQ](https://docs.prebid.org/faq/prebid-mobile-faq.html) diff --git a/prebid-mobile/prebid-mobile-privacy-regulation.md b/prebid-mobile/prebid-mobile-privacy-regulation.md index 025f1b4dc5..878bc6cfe9 100644 --- a/prebid-mobile/prebid-mobile-privacy-regulation.md +++ b/prebid-mobile/prebid-mobile-privacy-regulation.md @@ -72,27 +72,8 @@ To ensure proper monetization and relevant targeting, the SDK should be enabled ### Code Samples -#### iOS - -```swift -Targeting.shared.subjectToGDPR = false; - -Targeting.shared.gdprConsentString = "BOMyQRvOMyQRvABABBAAABAAAAAAEA"; - -Targeting.shared.purposeConsents = "100000000000000000000000"; - -let deviceAccessConsent = Targeting.shared.getDeviceAccessConsent(); -``` - -#### Android - -```swift -TargetingParams.setSubjectToGDPR(context, true); - -TargetingParams.setGDPRConsentString("BOMyQRvOMyQRvABABBAAABAAAAAAEA"); - -TargetingParams.setPurposeConsents("101010001"); -``` +- See [iOS Global Parameters](/prebid-mobile/pbm-api/ios/pbm-targeting-ios.html) +- See [Android Global Parameters](/prebid-mobile/pbm-api/android/pbm-targeting-android.html) ## California Consumer Privacy Act (CCPA) @@ -114,7 +95,7 @@ Prebid mobile supports the [IAB US Privacy signal](https://iabtechlab.com/standa - Translate notice and opt-out signals into [IAB US Privacy String format](https://iabtechlab.com/standards/ccpa/) - Store IAB US Privacy signal in `UserDefaults` for iOS or `SharedPreferences` for Android for persistent storage allowing access for vendors per IAB recommendations -The job of the Prebid SDK will: +Prebid SDK will: - Read from `UserDefaults` (iOS) or `SharedPreferences` (Android) for US Privacy signal - Prebid SDK will look for the key `IABUSPrivacy_String`, all other key names or spellings will be ignored @@ -123,3 +104,8 @@ The job of the Prebid SDK will: - 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. + +## Further Reading + +- [Prebid Privacy Resources](/support/privacy-resources.html) +- Global parameters [iOS](/prebid-mobile/pbm-api/ios/pbm-targeting-ios.html), [Android](/prebid-mobile/pbm-api/android/pbm-targeting-android.html) diff --git a/prebid-mobile/prebid-mobile.md b/prebid-mobile/prebid-mobile.md index 42ca24320d..b7553ea47f 100644 --- a/prebid-mobile/prebid-mobile.md +++ b/prebid-mobile/prebid-mobile.md @@ -101,7 +101,7 @@ Supported Ad Servers: GAM. 1. Prebid Server constructs an OpenRTB bid request and passes it to the demand partners. Each demand partner returns a bid response to Prebid Server. The bid response includes the bid price and the creative content. 1. Prebid Server sends the bid responses to Prebid Mobile. 1. Prebid Mobile sets key/value targeting for each ad slot through the primary ad server mobile SDK. -1. The primary ad server SDK sends the ad request enriched with targeting keywords of the wiining bid. +1. The primary ad server SDK sends the ad request enriched with targeting keywords of the wining bid. 1. The primary ad server responds with an ad. If the line item associated with the Prebid Mobile bid wins, the primary ad server returns the Prebid Universal Creative (PUC) to the ad server's SDK. 1. The primary ad server SDK starts the rendering recived ad markup. 1. The PUC fetches creative content of the winning bid from the Previd Cache and renders it. @@ -137,7 +137,7 @@ Supported Ad Servers: AdMob, MAX. 1. The primary ad server responds with a mediation chain. 1. The Primary Ad Server SDK runs the Waterfall. 1. If the mediation item contains the name Prebid Adatper it instantiates the respoctive class. -1. [OPTIONAL] adaters checks the wheather the Line Item's targeting keywors match the bid targeting keywords +1. [OPTIONAL] adaters checks the wheather the Line Item's targeting keywords match the bid targeting keywords. 1. Adapter renders a wiining bid cached in the SDK. Note: passing the targeting keywords to the ad server depends on the server's ability to target line items. If the server doesn't provide such a feature, Prebid SDK doesn't enrich an ad request with targeting info. But activation of a line item with the proper price still works. The implementation details of such selection you can find in the respective integration guide. @@ -146,46 +146,45 @@ Note: passing the targeting keywords to the ad server depends on the server's ab ### Prebid Server -You must have a Prebid Server account in order to use Prebid Mobile. Prebid Server is a server-based host that communicates bid requests and responses between Prebid Mobile and demand partners. +You must have a Prebid Server available in order to use Prebid Mobile. Prebid Server is a server-based host that communicates bid requests and responses between Prebid Mobile and demand partners. -To set up your Prebid Server account for Prebid Mobile, refer to [Getting Started with Prebid Mobile]({{site.github.url}}/prebid-mobile/prebid-mobile-getting-started.html). +To set up your Prebid Server account for Prebid Mobile, refer to [Getting Started with Prebid Mobile](/prebid-mobile/prebid-mobile-getting-started.html). ### Android Follow these steps to integrate the Prebid SDK: -1. If integrating into an ad server, create line items specific for rendering (line items for rendering API are unique and do not coincide with the standard Prebid SDK line items): - - [GAM Original API](../adops/step-by-step.html) - - [GAM Rendering API](../adops/mobile-rendering-gam-line-item-setup.html) - - [AdMob](../adops/mobile-rendering-admob-line-item-setup.html) - - [MAX](../adops/mobile-rendering-max-line-item-setup.html) 1. [Integrate Prebid SDK](pbm-api/android/code-integration-android.html) into your project. -1. Add prebid's ad units to your app respectively to the monetization scenario: +1. Define [global integration and targeting properties](/prebid-mobile/pbm-api/android/pbm-targeting-params-android.html). +1. Add Prebid's ad units to your app respectively to the monetization scenario: - [GAM Original API](pbm-api/android/android-sdk-integration-gam-original-api.html) - [Custom in-app bidding](modules/rendering/android-sdk-integration-pb.html) integration without primary ad server. - [GAM Rendering API](modules/rendering/android-sdk-integration-gam.html) as a primary ad server - [AdMob](modules/rendering/android-sdk-integration-admob) as a primary ad server. - [AppLovin MAX](modules/rendering/android-sdk-integration-max.html) as a primary ad server. - -1. Actualize the [integration and targeting](pbm-api/android/pbm-targeting-params-android.html) properties. +1. If integrating into an ad server, create line items specific for rendering (line items for rendering API are unique and do not coincide with the standard Prebid SDK line items): + - [GAM Original API](../adops/step-by-step.html) + - [GAM Rendering API](../adops/mobile-rendering-gam-line-item-setup.html) + - [AdMob](../adops/mobile-rendering-admob-line-item-setup.html) + - [MAX](../adops/mobile-rendering-max-line-item-setup.html) ### iOS Follow these steps to integrate the rendering API: -1. If integrating into an ad server, create line items specific for rendering (line items are uniqe for the Rendering Module and do not cooicide with the standard Prebid SDK line items): - - [GAM Original API](../adops/step-by-step.html) - - [GAM](../adops/mobile-rendering-gam-line-item-setup.html) - - [AdMob](../adops/mobile-rendering-admob-line-item-setup.html) - - [MAX](../adops/mobile-rendering-max-line-item-setup.html) 1. [Integrate Prebid SDK](pbm-api/ios/code-integration-ios.html). +1. Define [global integration and targeting properties](/prebid-mobile/pbm-api/ios/pbm-targeting-ios.html). 1. Add prebid's ad units to your app respectively to the monetization scenario: - [GAM Original API](pbm-api/ios/code-integration-ios.html) - [Custom in-app bidding](modules/rendering/ios-sdk-integration-pb.html) integration without a primary ad server. - [GAM Rendering API](modules/rendering/ios-sdk-integration-gam.html) as a primary ad server. - [AdMob](modules/rendering/ios-sdk-integration-gam.html) as a primary ad server. - [AppLovin MAX](modules/rendering/ios-sdk-integration-max.html) as a primary ad server. -1. Actualize the [integration and targeting](pbm-api/ios/pbm-targeting-params-ios.html) properties. +1. If integrating into an ad server, create line items specific for rendering (line items are uniqe for the Rendering Module and do not cooicide with the standard Prebid SDK line items): + - [GAM Original API](../adops/step-by-step.html) + - [GAM](../adops/mobile-rendering-gam-line-item-setup.html) + - [AdMob](../adops/mobile-rendering-admob-line-item-setup.html) + - [MAX](../adops/mobile-rendering-max-line-item-setup.html) ## Additional References @@ -198,3 +197,8 @@ Currently Prebid Mobile SDK doesn't offer direct analytics capabilities. While w - Generate analytics from the ad server, as key metrics are available there if the line items are broken out by bidder. - Integrate an analytics package directly into the app. You may have one already that can accomodate header bidding metrics. +- Utilize a server-side [analytics module for Prebid Server](/prebid-server/developers/pbs-build-an-analytics-adapter.html). + +## Further Reading + +- [Getting started with Prebid Mobile](/prebid-mobile/prebid-mobile-getting-started.html) diff --git a/prebid-server/developers/add-a-module-go.md b/prebid-server/developers/add-a-module-go.md index 293b478d42..88bd17d86e 100644 --- a/prebid-server/developers/add-a-module-go.md +++ b/prebid-server/developers/add-a-module-go.md @@ -6,7 +6,7 @@ title: Prebid Server | Developers | Adding a Go Module --- # Prebid Server - Adding a Go Module -{: .no_toc} +{:.no_toc} - TOC {:toc } @@ -18,7 +18,7 @@ This document details how to make a module for PBS-Go. You will want to be familiar with the following background information: - the [module overview](/prebid-server/developers/add-a-module.html) -- the [PBS-Go Modularity Tech Spec](https://docs.google.com/document/d/1CmamniQpwcI3p0_rHe2F17zV4sEhzpOdrqU7zuZVZ_I/edit?usp=sharing) +- the [PBS-Go Modularity Tech Spec](https://docs.google.com/document/d/1cr1CJfkJqXVtNrlHulmg_R-9TJCDYjsb/edit#heading=h.gjdgxs) ### Contributing @@ -286,7 +286,7 @@ Unit tests are required. Each implemented hook must be at least 90% covered by u ### How to build and install a module -Read about the module building in the [building section](https://docs.google.com/document/d/1CmamniQpwcI3p0_rHe2F17zV4sEhzpOdrqU7zuZVZ_I/edit#heading=h.o8dv0neoq4xm) of the technical specification. +Read about the module building in the [building section](https://docs.google.com/document/d/1cr1CJfkJqXVtNrlHulmg_R-9TJCDYjsb/edit#heading=h.gjdgxs) of the technical specification. ## Analytics Adapters and Modules diff --git a/prebid-server/pbs-modules/index.md b/prebid-server/pbs-modules/index.md index 15888fdf0b..f821b5a9ce 100644 --- a/prebid-server/pbs-modules/index.md +++ b/prebid-server/pbs-modules/index.md @@ -29,7 +29,7 @@ The full list of modules: |---------------------+--------------+------+--------+----------| | [**ORTB2 Blocking**](/prebid-server/pbs-modules/ortb2-blocking.html) | Support bidders that aren't full-service SSPs. | general | check | check | | [**Confiant Ad Quality**](/prebid-server/pbs-modules/confiant-ad-quality.html) | Scans bid responses for security and quality issues. | general | | check | -| [**US Gen Privacy**](/prebid-server/features/pbs-usgen.html) | Links with the [Activity Controls](/prebid-server/pbs-activitycontrols.html) to process GPP strings to determine whether an activity should be allowed. | privacy | | check | +| [**US Gen Privacy**](/prebid-server/features/pbs-usgen.html) | Links with the [Activity Controls](/prebid-server/features/pbs-activitycontrols.html) to process GPP strings to determine whether an activity should be allowed. | privacy | | check | | [**US Custom Logic Privacy**](/prebid-server/features/pbs-uscustomlogic.html) | Similar to the `US Gen Privacy` module, but publishers define their own interpretation of the GPP string. | privacy | | check | | [**Richmedia Filter**](/prebid-server/pbs-modules/richmedia.html) | Can filter MRAID creatives from the bid stream. | validation | | check | From 9b87e6eeec4e4356cca06dfca3708e825553fd1e Mon Sep 17 00:00:00 2001 From: bretg Date: Wed, 29 May 2024 11:58:57 -0400 Subject: [PATCH 08/46] the api reference is likely to be significantly delayed (#5357) --- .../android/pbm-targeting-params-android.md | 14 +++++++------- prebid-mobile/pbm-api/ios/pbm-targeting-ios.md | 7 +++---- 2 files changed, 10 insertions(+), 11 deletions(-) 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 3478a86e57..e470e326d3 100755 --- a/prebid-mobile/pbm-api/android/pbm-targeting-params-android.md +++ b/prebid-mobile/pbm-api/android/pbm-targeting-params-android.md @@ -343,7 +343,7 @@ To set the purpose consent: TargetingParams.setPurposeConsents("100000000000000000000000") ``` -See also the API references for isSubjectToGDPR(), getGDPRConsentString(), getPurposeConsent(int index), getPurposeConsents(), getDeviceAccessConsent() +Related functions: isSubjectToGDPR(), getGDPRConsentString(), getPurposeConsent(int index), getPurposeConsents(), getDeviceAccessConsent() #### Getting Consent Values from the CMP @@ -611,7 +611,7 @@ Parameters: | --- | --- | --- | --- | --- | | bundleName | required | string | App bundle name. Sets ORTB `app.bundle`. | "com.example" | -See also the API reference for getBundleName(). +Related function: getBundleName(). ### setDomain() @@ -630,7 +630,7 @@ Parameters: | --- | --- | --- | --- | --- | | domain | required | string | Domain. Sets `app.domain`. | "example.com" | -See also the API reference for getDomain(). +Related function: getDomain(). ### setPublisherName() @@ -649,7 +649,7 @@ Parameters: | --- | --- | --- | --- | --- | | publisherName | required | string | Publisher name. Sets `app.publisher.name`. | "publisher 1" | -See also the API reference for getPublisherName(). +Related function: getPublisherName(). ### setStoreUrl() @@ -668,7 +668,7 @@ Parameters: | --- | --- | --- | --- | --- | | storeUrl | required | string | App store URL. Sets `app.storeurl` | `https://play.google.com/store/apps/details?id=1234` | -See also the API reference for getStoreUrl(). +Related function: getStoreUrl(). ### setOmidPartnerName() @@ -687,7 +687,7 @@ Parameters: | --- | --- | --- | --- | --- | | omidPartnerName | required | string | Open Measurement Partner name. | "MyIntegrationPartner" | -See also the API reference for getOmidPartnerName(). +Related function: getOmidPartnerName(). ### setOmidPartnerVersion() @@ -706,7 +706,7 @@ Parameters: | --- | --- | --- | --- | --- | | omidPartnerVerson | required | string | Open Measurement Partner version | "7.1" | -See also the API reference for getOmidPartnerVersion(). +Related function: getOmidPartnerVersion(). ### setUserLatLng() diff --git a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md index 9316280485..2556415d82 100644 --- a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md +++ b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md @@ -181,7 +181,7 @@ Swift: Targeting.shared.purposeConsents = "100000000000000000000000" ``` -See also the API references for getSubjectToGDPR(), getDeviceAccessConsent(), getDeviceAccessConsentObjc, getPurposeConsent(), isAllowedAccessDeviceData(). +Related functions: getSubjectToGDPR(), getDeviceAccessConsent(), getDeviceAccessConsentObjc, getPurposeConsent(), isAllowedAccessDeviceData(). #### Getting Consent Values from the CMP @@ -326,7 +326,7 @@ Targeting.shared.addUserData(key: "globalUserDataKey1", value: "globalUserDataVa Note: The 'UserData' functions end up putting data into the OpenRTB user.ext.data object while the 'UserKeywords' functions put data into user.keywords. -See also the API reference for setYearOfBirth(), getYearOfBirth() and clearYearOfBirth(). +Related functions: setYearOfBirth(), getYearOfBirth() and clearYearOfBirth(). ### Inventory FPD @@ -487,8 +487,7 @@ Note that several of the properties noted here are also mentioned above for othe ### Targeting Class Methods -All of the targeting class methods have been mentioned above in the context of First Party Data and are linked to -the API reference. +All of the targeting class methods have been mentioned above in the context of First Party Data section above. --- From a7a7f3531b5f72f140c3857ac3b10f68fc585982 Mon Sep 17 00:00:00 2001 From: Saar Amrani Date: Wed, 29 May 2024 19:33:31 +0300 Subject: [PATCH 09/46] Twist digital bid adapter remove unneeded bid params. (#5334) --- dev-docs/bidders/twistDigital.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/dev-docs/bidders/twistDigital.md b/dev-docs/bidders/twistDigital.md index e5e648fce2..672233164c 100644 --- a/dev-docs/bidders/twistDigital.md +++ b/dev-docs/bidders/twistDigital.md @@ -25,6 +25,4 @@ sidebarType: 1 | Name | Scope | Description | Example | Type | |------------|----------|------------------------------------------------------------------------------------------|------------------------------|----------| | `cId` | required | The connection ID from Twist Digital. | `'562524b21b1c1f08117fc7f9'` | `string` | -| `pId` | required | The publisher ID from Twist Digital. | `'59ac17c192832d0011283fe3'` | `string` | | `bidFloor` | optional | The minimum bid value desired. Twist Digital will not respond with bids lower than this value. | `0.90` | `float` | -| `subDomain`| optional | Sets the server subdomain, default: 'prebid'. | `'prebid'` | `string` | From f2896f1d6a918ab25c4ea8b1c78253b5797a5801 Mon Sep 17 00:00:00 2001 From: Dubyk Danylo <45672370+CTMBNara@users.noreply.github.com> Date: Wed, 29 May 2024 19:50:36 +0300 Subject: [PATCH 10/46] Add documentation about interaction with `ActivityInfrastructure` for modules (#5335) Co-authored-by: ddubyk --- prebid-server/developers/add-a-module-java.md | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/prebid-server/developers/add-a-module-java.md b/prebid-server/developers/add-a-module-java.md index c9f474e84c..90aaa31aa7 100644 --- a/prebid-server/developers/add-a-module-java.md +++ b/prebid-server/developers/add-a-module-java.md @@ -205,6 +205,43 @@ To support modules that need to obtain information about the local CPU environme cpuLoadAverageStats.getCpuLoadAverage(); // returns a float ``` +#### Interaction with Activity Infrastructure + +For modules that need to check whether certain activity is allowed, follow the next example: + +```java +public class MyHook implements Hook { + + private final UserFpdActivityMask userFpdActivityMask; // inject this bean using Spring if needed + + // ... + + @Override + public Future> call(PAYLOAD payload, CONTEXT invocationContext) { + // ... + + final AuctionContext auctionContext = invocationContext.auctionContext(); + final ActivityInfrastructure activityInfrastructure = auctionContext.getActivityInfrastructure(); + + final ActivityInvocationPayload activityInvocationPayload = BidRequestActivityInvocationPayload.of( + ActivityInvocationPayloadImpl.of( + ComponentType.GENERAL_MODULE, // or ComponentType.RTD_MODULE + "MODULE NAME"), + auctionContext.getBidRequest()); + + final boolean isTransmitUfpdAllowed = activityInfrastructure.isAllowed( + Activity.TRANSMIT_UFPD, // You can check for any activity that interest you + activityInvocationPayload); + + // Then you can use activity masks for Device and User if needed + final User maskedUser = userFpdActivityMask.maskUser(user, !isTransmitUfpdAllowed, false); + final Device maskedDevice = userFpdActivityMask.maskDevice(device, !isTransmitUfpdAllowed, false); + + // ... + } +} +``` + ### Configuration It's possible to define default module configuration which can be read by the module at PBS startup. Please see the [Configuration](https://docs.google.com/document/d/1VP_pi7L5Iy3ikHMbtC2_rD5RZTVSc3OkTWKvtRS5x5Y/edit#heading=h.mh3urph3k1mk) section of the technical specification. From 09d0f4342e6eb2be71f35907748a5c99cf51567f Mon Sep 17 00:00:00 2001 From: AvivOpenWeb Date: Wed, 29 May 2024 21:31:13 +0300 Subject: [PATCH 11/46] Openweb bid adapter: Make placementId parameter mandatory (#5347) Co-authored-by: Zdravko Kosanovic --- dev-docs/bidders/openweb.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev-docs/bidders/openweb.md b/dev-docs/bidders/openweb.md index fd07aeb675..59c7e50ab1 100644 --- a/dev-docs/bidders/openweb.md +++ b/dev-docs/bidders/openweb.md @@ -33,8 +33,8 @@ The OpenWeb adapter requires setup and approval. Please reach out to
**WARNING:**
Misuse of this parameter can impact revenue | 2.00 -| `placementId` | optional | String | A unique placement identifier | "12345678" | `testMode` | optional | Boolean | This activates the test mode | false ## Example @@ -54,8 +54,8 @@ var adUnits = [{ bidder: 'openweb', params: { org: '1234567890abcdef12345678', // Required + placementId: '12345678', // Required floorPrice: 0.05, // Optional - placementId: '12345678', // Optional testMode: false // Optional } }] @@ -77,8 +77,8 @@ var adUnits = [{ bidder: 'openweb', params: { org: '1234567890abcdef12345678', // Required + placementId: '12345678', // Required floorPrice: 5.00, // Optional - placementId: '12345678', // Optional testMode: false // Optional } }] From 6d50605f1b5588cf81c30fd2be02d0e5ab14bf30 Mon Sep 17 00:00:00 2001 From: Bugxyb Date: Thu, 30 May 2024 02:57:50 +0800 Subject: [PATCH 12/46] alogrix update bidder doc (#5354) Co-authored-by: Bugxyb --- dev-docs/bidders/algorix.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev-docs/bidders/algorix.md b/dev-docs/bidders/algorix.md index 705586e6c0..83265c579e 100644 --- a/dev-docs/bidders/algorix.md +++ b/dev-docs/bidders/algorix.md @@ -2,9 +2,9 @@ layout: bidder title: AlgoriX description: Prebid AlgoriX Bidder Adapter +gvl_id: 1176 biddercode: algorix tcfeu_supported: true -gvl_id: usp_supported: true coppa_supported: true schain_supported: true @@ -14,6 +14,7 @@ pbs: true pbs_app_supported: true prebid_member: true sidebarType: 1 +userIds: all --- ### Note From 13209cd0c8ddfa7e6cd8363b6ecb621f3ea19def Mon Sep 17 00:00:00 2001 From: bretg Date: Thu, 30 May 2024 10:40:12 -0400 Subject: [PATCH 13/46] GA Analytics: Add deprecation warning (#5365) --- overview/ga-analytics.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/overview/ga-analytics.md b/overview/ga-analytics.md index 1abd33862f..afc831822b 100644 --- a/overview/ga-analytics.md +++ b/overview/ga-analytics.md @@ -8,13 +8,11 @@ nav_section: analytics sidebarType: 1 --- - - # Prebid Analytics with GA - {:.no_toc} -> Are my header bidding demand partners generating more revenue for me? If not, is it because of latency or is it due to low bid CPM? How about discrepancies? +{: .alert.alert-warning :} +Since Prebid.js 8.0, there's no longer a Google Analytics module. Please consider one of the [many other analytics adapters](/overview/analytics.html). - TOC {:toc} @@ -27,8 +25,6 @@ It includes: - Bid latency by bidder, geo, and domain. - Seamless integration with your Google Analytics account and scheduled reports delivered to your mailbox. -
- ## Example reports by Prebid Analytics The day starts from making sure the bidders are not generating less revenue: From 74825dfd7002e9d1e3ae285cac71b6998b14f467 Mon Sep 17 00:00:00 2001 From: bretg Date: Thu, 30 May 2024 11:11:15 -0400 Subject: [PATCH 14/46] removing GA analytics (#5367) --- _data/dropdown_v2.yml | 16 ++--- _data/sidebar.yml | 33 +++------ overview/ga-analytics.md | 148 --------------------------------------- 3 files changed, 16 insertions(+), 181 deletions(-) delete mode 100644 overview/ga-analytics.md diff --git a/_data/dropdown_v2.yml b/_data/dropdown_v2.yml index b8c2f365e7..8fb1b03039 100644 --- a/_data/dropdown_v2.yml +++ b/_data/dropdown_v2.yml @@ -61,8 +61,8 @@ - subsectionId: 0 sectionId: 1 sectionName: Product - title: Analytics - link: /overview/analytics.html + title: Modules + link: /dev-docs/modules/index.html needsDivider: 0 isHeader: 0 isSubHeader: 0 @@ -71,8 +71,8 @@ - subsectionId: 0 sectionId: 1 sectionName: Product - title: Modules - link: /dev-docs/modules/index.html + title: Publisher API + link: /dev-docs/publisher-api-reference.html needsDivider: 0 isHeader: 0 isSubHeader: 0 @@ -81,8 +81,8 @@ - subsectionId: 0 sectionId: 1 sectionName: Product - title: Publisher API - link: /dev-docs/publisher-api-reference.html + title: Bidder Params + link: /dev-docs/bidders.html needsDivider: 0 isHeader: 0 isSubHeader: 0 @@ -91,8 +91,8 @@ - subsectionId: 0 sectionId: 1 sectionName: Product - title: Bidder Params - link: /dev-docs/bidders.html + title: Analytics + link: /overview/analytics.html needsDivider: 0 isHeader: 0 isSubHeader: 0 diff --git a/_data/sidebar.yml b/_data/sidebar.yml index ae817d8622..892a9936d1 100644 --- a/_data/sidebar.yml +++ b/_data/sidebar.yml @@ -184,6 +184,14 @@ sectionTitle: subgroup: 0 +- sbSecId: 1 + title: Analytics For Prebid + link: /overview/analytics.html + isHeader: 0 + isSectionHeader: 0 + sectionTitle: + subgroup: 0 + - sbSecId: 1 title: Consent Management Best Practices link: /dev-docs/cmp-best-practices.html @@ -507,31 +515,6 @@ sectionTitle: subgroup: 6 -- sbSecId: 1 - title: Analytics - link: - isHeader: 1 - headerId: analytics - isSectionHeader: 0 - sectionTitle: - subgroup: 7 - -- sbSecId: 1 - title: Analytics For Prebid - link: /overview/analytics.html - isHeader: 0 - isSectionHeader: 0 - sectionTitle: - subgroup: 7 - -- sbSecId: 1 - title: Prebid Analytics for GA - link: /overview/ga-analytics.html - isHeader: 0 - isSectionHeader: 0 - sectionTitle: - subgroup: 7 - - sbSecId: 1 title: Features link: diff --git a/overview/ga-analytics.md b/overview/ga-analytics.md deleted file mode 100644 index afc831822b..0000000000 --- a/overview/ga-analytics.md +++ /dev/null @@ -1,148 +0,0 @@ ---- -layout: page_v2 -title: Prebid Analytics with GA -description: Prebid.js Analytics with GA for Header Bidding -pid: 10 -top_nav_section: overview -nav_section: analytics -sidebarType: 1 ---- - -# Prebid Analytics with GA -{:.no_toc} - -{: .alert.alert-warning :} -Since Prebid.js 8.0, there's no longer a Google Analytics module. Please consider one of the [many other analytics adapters](/overview/analytics.html). - -- TOC -{:toc} - -## Prebid Analytics helps you better manage your header bidding partners - -It includes: - -- Bidder bid/win price analysis by geo, domain, with price range distribution. -- Bid latency by bidder, geo, and domain. -- Seamless integration with your Google Analytics account and scheduled reports delivered to your mailbox. - -## Example reports by Prebid Analytics - -The day starts from making sure the bidders are not generating less revenue: - -![Blocking Ad Calls 1]({{ site.baseurl }}/assets/images/overview/analytics/revenue-by-date.png) - -Something is not right here - total revenue from yesterday dropped quite a bit. This could be caused by certain bidders were down or experienced technical issues. Let's take a look at the bidder timeout rate: - -![Blocking Ad Calls 1]({{ site.baseurl }}/assets/images/overview/analytics/timeout-by-date.png) - -Bidder timeout seems okay. The problem might then be caused by bidders' lower bid rate: - -![Blocking Ad Calls 1]({{ site.baseurl }}/assets/images/overview/analytics/bidrate-by-date.png) - -Here we go. Bidder 1 and 4 bid much less than usual. You may want to drill down even further - Prebid.js Analytics also provides: - -- More metrics such as: bid load time, avg bid CPM, bid rate, avg win CPM, win rate. -- Ability to filter the above metrics further by geo, domain, and OS - -> **Explore an example dashboard here** - -
- -## Histogram analysis of latency and CPM distribution - -To understand exactly how much time per bidder spent, the Analytics Platform allows you to make the below query: - -- For country X, what are bidders' bid load time, for mobile traffic on Android only? - -
- -![Blocking Ad Calls 1]({{ site.baseurl }}/assets/images/overview/analytics/loadtime-histogram.png) - -You might derive: - -- Bidder 1 is really fast, because 1/3 of its bids are in red, which is in the 200 - 300ms response time range. -- Bidder 5 is really slow, as 1/3 of its bids are in 800 - 1000ms. - -
- -Similar query for bidders' bid CPM: - -
- -![Blocking Ad Calls 1]({{ site.baseurl }}/assets/images/overview/analytics/cpm-histogram.png) - -> **Try out the product and explore the demo dashboard here!** This will be the base of your dashboard! - -
- -## How does it work? - -Prebid.js has a seamless integration with Google Analytics and Google Spreadsheet, as well as [several other Analytics providers](/overview/analytics.html). - -1. Prebid.js has a module for Google Analytics. -2. All data are sent as Events to Google Analytics. You can build reports and dashboards there just as you do today with web traffic data. -3. We've also built dashboards and data visualization in Spreadsheet (where all the above diagrams come from). You can copy our demo dashboard and link it to your Google Analytics account in a few minutes! -4. The Spreadsheet dashboard can be scheduled to run every morning (or in other intervals). You can get 7 day revenue lookback, latency/CPM distribution analysis and more every morning! - -### Building the Prebid.js Package with GA - -You can build the Google Analytics module into your Prebid package in two ways: - -1. The "Easy Button" - use the handy web-based [Prebid.js Download](/download.html) tool, and check the Google Analytics adapter box along with the other modules and adapters desired. -2. From the command line - -```bash -gulp build --modules=googleAnalyticsAdapter, OTHER_MODULES, OTHER_ADAPTERS, ... -``` - -### Enabling the GA Adapter in Your Page - -1. First, make sure GA is on your page as directed by Google. Get the 'tracking code' from the GA interface. It will look something like: - - ```htmk - - - - ``` - -2. Enable the Prebid.js GA module: - - ```javascript - pbjs.que.push(function() { - pbjs.enableAnalytics({ - provider: 'ga', - options: { - sampling: 0.1, - cpmDistribution: myBucketFunction - } - }); - }); - - // takes a CPM value and returns a string price bucket - var myBucketFunction = function(cpm) { - return cpm <= 1 ? '<= 1$' : '> 1$'; - } - ``` - -Here are the options available. None of them are required. - -{: .table .table-bordered .table-striped } -| Option | Type | Example | Notes | -|---+---+---+---| -|global | string | ga | Name of the global analytics object. Default is `ga` | -|trackerName | string | "mytracker" | Use another tracker for prebid events. Default is the default tracker. | -|sampling | float | 0.1 | Choose a value from `0` to `1`, where `0` means 0% and `1` means 100% tracked. | -|enableDistribution | boolean | true | Enables additional events that track load time and cpm distribution by creating buckets for load time and cpm. Default is false. | -|cpmDistribution | function | see example | A function that customizes the buckets for cpm distribution. | -|sendFloors | boolean | true | if set, will include floor data in the eventCategory field and include ad unit code in eventAction field. Defaults to false. | - -## Further Reading - -- [Analytics for Prebid](/overview/analytics.html) (Overview and list of analytics providers) -- [Integrate with the Prebid Analytics API](/dev-docs/integrate-with-the-prebid-analytics-api.html) (For developers) From 587de227d2bba77ef59b366223d08b9d845c154b Mon Sep 17 00:00:00 2001 From: nouchy <33549554+nouchy@users.noreply.github.com> Date: Thu, 30 May 2024 17:14:46 +0200 Subject: [PATCH 15/46] Sirdata RTD Module : update module presentation (#5328) * update module presentation add new features avoidPostContent & avoidPostEids * fix Table column count * new param authorizedEids --- dev-docs/modules/sirdataRtdProvider.md | 74 +++++++++++--------------- 1 file changed, 30 insertions(+), 44 deletions(-) diff --git a/dev-docs/modules/sirdataRtdProvider.md b/dev-docs/modules/sirdataRtdProvider.md index 860e5952e3..27f652d197 100644 --- a/dev-docs/modules/sirdataRtdProvider.md +++ b/dev-docs/modules/sirdataRtdProvider.md @@ -1,8 +1,8 @@ --- layout: page_v2 title: Sirdata Real Time Data Provider -display_name: Sirdata Real-time Segmentation Module -description: Sirdata Real-time Segmentation Module +display_name: Sirdata Real-time SDA Module +description: Sirdata Real-time Seller Defined Audience based Module page_type: module module_type: rtd module_code : sirdataRtdProvider @@ -18,17 +18,17 @@ sidebarType : 1 * TOC {:toc} -Sirdata provides a disruptive API that allows publishers and curating SSPs to leverage its cutting-edge contextualization technology and its audience segments based on cookies and consent or without cookies nor consent, even in Europe! +Sirdata provides a disruptive API that allows publishers and SDA compliant SSPs/DSPs to leverage its cutting-edge contextualization technology and its audience segments! -User-based segments and page-level automatic contextual categories will be attached to bid request objects sent to different SSPs in order to optimize targeting. +User-based segments and page-level automatic contextual categories will be attached to bid request objects sent to different bidders in order to optimize targeting. -Automatic or custom integration with Google Ad Manager and major bidders like Xandr/Appnexus, Smartadserver, Index Exchange, Proxistore, Magnite/Rubicon or Triplelift ! +Automatic or custom integration with Google Ad Manager and major bidders like Xandr's, Equativ's, Index Exchange's, Proxistore's, Magnite's or Triplelift's ! User's country and choice management are included in the module, so it's 100% compliant with local and regional laws like GDPR and CCPA/CPRA. ORTB2 compliant and FPD support for Prebid versions < 4.29 -Now supports Seller Defined Audience ! +Fully supports Seller Defined Audience ! Please find the full SDA taxonomy ids list here. Please contact for more information. @@ -42,13 +42,13 @@ Compile the Sirdata RTD module into your Prebid build: Add the Sirdata RTD provider to your Prebid config. -`actualUrl` MUST be set with actual location of parent page if prebid.js is loaded in an iframe (eg. postbid). It can be left blank ('') or removed otherwize. +`actualUrl` MUST be set with actual location of parent page if prebid.js is loaded in an iframe (e.g. hosted). It can be left blank ('') or removed otherwise. `partnerId` and `key` should be provided by your partnering SSP or get one and your dedicated taxonomy from Sirdata (). Segments ids (user-centric) and category ids (page-centric) will be provided salted and hashed : you can use them with a dedicated and private matching table. -Should you want to allow a SSP or a partner to curate your media and operate cross-publishers campaigns with our data, please ask Sirdata () to whitelist him it in your account. +Should you want to allow any SSP or a partner to curate your media and operate cross-publishers campaigns with our data, please ask Sirdata () to whitelist him it in your account. -#### Minimal configuration +#### Typical configuration ```javascript pbjs.setConfig({ @@ -86,21 +86,7 @@ pbjs.setConfig({ key: 1, setGptKeyValues: true, contextualMinRelevancyScore: 50, //Min score to filter contextual category globally (0-100 scale) - actualUrl: '', //top location url, for contextual categories - bidders: [{ - bidder: 'appnexus', - adUnitCodes: ['adUnit-1','adUnit-2'], - customFunction: overrideAppnexus, - curationId: '111', - },{ - bidder: 'ix', - sizeLimit: 1200 //specific to Index Exchange, - contextualMinRelevancyScore: 50, //Min score to filter contextual category for curation in the bidder (0-100 scale) - },{ - bidder: 'smartadserver' - },{ - bidder: 'proxistore' - }] + actualUrl: '' //top location url, for contextual categories } } ] @@ -111,26 +97,27 @@ pbjs.setConfig({ ### Parameter Descriptions for the Sirdata Configuration Section -| Name |Type | Description | Notes | -| :------------ | :------------ | :------------ |:------------ | -| name | String | Real time data module name | Mandatory. Always 'SirdataRTDModule' | -| waitForIt | Boolean | Mandatory. Required to ensure that the auction is delayed until prefetch is complete | Optional. Defaults to false but recommended to true | -| params | Object | | Optional | -| params.partnerId | Integer | Partner ID, required to get results and provided by Sirdata. Use 1 for tests and get one running at | Mandatory. Defaults 1. | -| params.key | Integer | Key linked to Partner ID, required to get results and provided by Sirdata. Use 1 for tests and get one running at | Mandatory. Defaults 1. | -| params.setGptKeyValues | Boolean | This parameter Sirdata to set Targeting for GPT/GAM | Optional. Defaults to true. | -| params.contextualMinRelevancyScore | Integer | Min score to keep filter category in the bidders (0-100 scale). Optional. Defaults to 30. | -| params.bidders | Object | Dictionary of bidders you would like to supply Sirdata data for. | Optional. In case no bidder is specified Sirdata will atend to ad data custom and ortb2 to all bidders, adUnits & Globalconfig | +| Name | Type | Description | Notes | +|:-----------------------------------|:----------------|:----------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------| +| name | String | Real time data module name | Mandatory. Always 'SirdataRTDModule' | +| waitForIt | Boolean | Required to ensure that the auction is delayed until prefetch is complete | Optional. Default to false but recommended to true | +| params | Object | Settings | Optional | +| params.partnerId | Integer | Partner ID, required to get results and provided by Sirdata. Use 1 for tests and request your Id at | Mandatory. Default 1 | +| params.key | Integer | Key linked to Partner ID, required to get results and provided by Sirdata. Use 1 for tests and request your key at | Mandatory. Default 1 | +| params.setGptKeyValues | Boolean | Sets Targeting for GPT/GAM | Optional. Default to true | +| params.authorizedEids | Array of String | List of authorised Eids for graph. Set [] to prevent all Eids usage | Optional. Default to : ID5, pubProvidedId and sharedId | +| params.avoidPostContent | Boolean | Block contextual data POST from user's device (a crawler is use instead) | Optional. Default to false, and setting it to true results in your content downloaded by Sirdata crawler | +| params.contextualMinRelevancyScore | Integer | Min relevancy score to filter categories sent to the bidders (0-100 scale). | Optional. Defaults to 30 | +| params.bidders | Array of Object | Bidders you want to supply your own data to (works only with your private data bought to Sirdata) | Optional | Bidders can receive common setting : -| Name |Type | Description | Notes | -| :------------ | :------------ | :------------ |:------------ | -| bidder | String | Bidder name | Mandatory if params.bidders are specified | -| adUnitCodes | Array of String | Use if you want to limit data injection to specified adUnits for the bidder | Optional. Default is false and data shared with the bidder isn't filtered | -| customFunction | Function | Use it to override the way data is shared with a bidder | Optional. Default is false | -| curationId | String | Specify the curation ID of the bidder. Provided by Sirdata, request it at | Optional. Default curation ids are specified for main bidders | -| contextualMinRelevancyScore | Integer | Min score to filter contextual categories for curation in the bidder (0-100 scale). Optional. Defaults to 30 or global params.contextualMinRelevancyScore if exits. | -| sizeLimit | Integer | used only for bidder 'ix' to limit the size of the get parameter in Index Exchange ad call | Optional. Default is 1000 | + +| Name | Type | Description | Notes | +|:---------------|:----------------|:-----------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------| +| bidder | String | Bidder name | Mandatory if params.bidders are specified | +| adUnitCodes | Array of String | Use if you want to limit data injection to specified adUnits for the bidder | Optional. Default is false and data shared with the bidder isn't filtered | +| customFunction | Function | Use it to override the way data is shared with a bidder | Optional. Default is false | +| curationId | String | Specify the curation ID of the bidder. Provided by Sirdata, request it at | Optional. Default curation ids are specified for main bidders | ### Overriding data sharing function @@ -221,7 +208,6 @@ pbjs.setConfig({ curationId: '111' },{ bidder: 'ix', - sizeLimit: 1200, //specific to Index Exchange customFunction: function(adUnit, segmentsArray, dataObject, bid) { bid.params.contextual.push(dataObject.contextual_categories); }, @@ -229,7 +215,7 @@ pbjs.setConfig({ } } ] - } + }, ... }); ``` From fca839fccaafa020b2fe1e9ba59eb24567d7f18b Mon Sep 17 00:00:00 2001 From: Denis Logachov Date: Thu, 30 May 2024 18:29:44 +0300 Subject: [PATCH 16/46] Create hyperbrainz.md (#5337) --- dev-docs/bidders/hyperbrainz.md | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 dev-docs/bidders/hyperbrainz.md diff --git a/dev-docs/bidders/hyperbrainz.md b/dev-docs/bidders/hyperbrainz.md new file mode 100644 index 0000000000..c1cc738088 --- /dev/null +++ b/dev-docs/bidders/hyperbrainz.md @@ -0,0 +1,36 @@ +--- +layout: bidder +title: HyperBrainz +description: HyperBrainz Adaptor +biddercode: hyperbrainz +pbjs: true +pbs: false +media_types: banner, native, video +gvl_id: 14 (adkernel) +tcfeu_supported: true +gpp_sids: tcfeu, usp +usp_supported: true +coppa_supported: true +pbs_app_supported: false +schain_supported: true +userIds: all +fpd_supported: true +prebid_member: false +ortb_blocking_supported: true +multiformat_supported: will-bid-on-one +floors_supported: true +aliasCode: adkernel +sidebarType: 1 +--- + +### Note + +The HyperBrainz bidding adapter requires setup and approval before implementation. Please reach out to for more details. + +### Bid Params + +{: .table .table-bordered .table-striped } +| Name | Scope | Description | Example | Type | +|----------|----------|-----------------------|---------------------------|----------| +| `host` | required | RTB host | `'cpm.hb.hyperbrainz.com'` | `string` | +| `zoneId` | required | Zone Id | 30164 | `integer` | From bdfc5859ec2db00b45fbbed46cfd19c9cc725b86 Mon Sep 17 00:00:00 2001 From: IQZoneAdx <88879712+IQZoneAdx@users.noreply.github.com> Date: Thu, 30 May 2024 18:30:03 +0300 Subject: [PATCH 17/46] IQzone: Adapter update (#5344) * add IQZone adapter doc * add new bid param * fix * updates * add endpointId param * updated adapter * removed redundant symbol --- dev-docs/bidders/iqzone.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/dev-docs/bidders/iqzone.md b/dev-docs/bidders/iqzone.md index 57ff266f39..8a3278dc03 100644 --- a/dev-docs/bidders/iqzone.md +++ b/dev-docs/bidders/iqzone.md @@ -3,23 +3,32 @@ layout: bidder title: IQzone description: Prebid IQzone Bidder Adapter biddercode: iqzone -usp_supported: true +gpp_sids: usstate_all tcfeu_supported: false +usp_supported: true +coppa_supported: true schain_supported: true +deals_supported: false +floors_supported: true +fpd_supported: false +ortb_blocking_supported: false media_types: banner, video, native +multiformat_supported: will-bid-on-one +userIds: all pbjs: true pbs: true pbs_app_supported: true +safeframes_ok: true sidebarType: 1 --- ### Prebid.js Bid Params {: .table .table-bordered .table-striped } -| Name | Scope | Description | Example | Type | -|---------------|----------|-----------------------|-----------|-----------| -| `placementId` | optional | Placement Id | `'0'` | `'string'` | -| `endpointId` | optional | Endpoint Id | `'0'` | `'string'` | +| Name | Scope | Description | Example | Type | +|---------------|----------|-----------------------|-----------|------------| +| `placementId` | optional | Placement Id | `'0'` | `'string'` | +| `endpointId` | optional | Endpoint Id | `'0'` | `'string'` | ### Note From 4ce49b1aa3747f31feff7030344f03246ccb7036 Mon Sep 17 00:00:00 2001 From: Aymeric Le Corre Date: Thu, 30 May 2024 17:30:22 +0200 Subject: [PATCH 18/46] Update Lucead & Adlive Plus adapters (#5362) --- dev-docs/bidders/adliveplus.md | 44 ++++++++++++++++++++++------------ dev-docs/bidders/lucead.md | 44 ++++++++++++++++++++++------------ 2 files changed, 58 insertions(+), 30 deletions(-) diff --git a/dev-docs/bidders/adliveplus.md b/dev-docs/bidders/adliveplus.md index 242e3931e7..0aed77bd0a 100644 --- a/dev-docs/bidders/adliveplus.md +++ b/dev-docs/bidders/adliveplus.md @@ -4,11 +4,11 @@ title: Adlive Plus description: Adlive Plus adapter biddercode: adliveplus aliasCode: lucead -tcfeu_supported: false -gvl_id: none +tcfeu_supported: true +gvl_id: 1309 usp_supported: false coppa_supported: false -schain_supported: false +schain_supported: true dchain_supported: false media_types: banner safeframes_ok: true @@ -17,37 +17,51 @@ floors_supported: true fpd_supported: true pbjs: true pbs: false -prebid_member: true/false +prebid_member: false ortb_blocking_supported: false privacy_sandbox: paapi sidebarType: 1 --- ### Note -The Adlive Plus adapter requires setup before beginning. Please contact us at [support@adlive.io](mailto:support@adlive.io). +This adapter requires setup before beginning. Please contact us at [support@adlive.io](mailto:support@adlive.io). ### Bid Params {: .table .table-bordered .table-striped } -| Name | Scope | Description | Example | Type | -|---------------|----------|-----------------------|-----------|-----------| -| `placementId` | required | Placement id | `'11111'` | `string` | +| Name | Scope | Description | Example | Type | +|---------------|----------|---------------------------------|--------------------|-----------| +| `placementId` | required | Placement ID | `'1'` | `string` | +| `loader` | required | Site specific async loader code | `new Promise(...)` | `Promise` | +| `region` | optional | Endpoint region | `'ap'` | `string` | -### Test Parameters +### Params type definition + +```typescript +type Params = { + placementId: string; + loader: Promise; + region?: 'eu' | 'us' | 'ap'; +}; +``` + +### Test Params ```javascript const adUnits = [ - { - code: 'test-div', - sizes: [[300, 250]], - bids: [ + { + code: 'test-div', + sizes: [[300, 250]], + bids: [ { bidder: 'adliveplus', params: { - placementId: '1', + placementId: '1', // required + loader: new Promise(/* ... */), // required + region: 'ap', // optional 'eu', 'us', 'ap' } } ] } - ]; +]; ``` diff --git a/dev-docs/bidders/lucead.md b/dev-docs/bidders/lucead.md index 5d6aa90cbd..1715e7d260 100644 --- a/dev-docs/bidders/lucead.md +++ b/dev-docs/bidders/lucead.md @@ -3,11 +3,11 @@ layout: bidder title: Lucead description: Prebid Lucead Bidder Adapter biddercode: lucead -tcfeu_supported: false -gvl_id: none +tcfeu_supported: true +gvl_id: 1309 usp_supported: false coppa_supported: false -schain_supported: false +schain_supported: true dchain_supported: false media_types: banner safeframes_ok: true @@ -16,37 +16,51 @@ floors_supported: true fpd_supported: true pbjs: true pbs: false -prebid_member: true/false +prebid_member: false ortb_blocking_supported: false privacy_sandbox: paapi sidebarType: 1 --- ### Note -The Lucead Bidding adapter requires setup before beginning. Please contact us at [prebid@lucead.com](mailto:prebid@lucead.com). +This adapter requires setup before beginning. Please contact us at [prebid@lucead.com](mailto:prebid@lucead.com). ### Bid Params {: .table .table-bordered .table-striped } -| Name | Scope | Description | Example | Type | -|---------------|----------|-----------------------|-----------|-----------| -| `placementId` | required | Placement id | `'11111'` | `string` | +| Name | Scope | Description | Example | Type | +|---------------|----------|---------------------------------|--------------------|-----------| +| `placementId` | required | Placement ID | `'1'` | `string` | +| `loader` | required | Site specific async loader code | `new Promise(...)` | `Promise` | +| `region` | optional | Endpoint region | `'us'` | `string` | -### Test Parameters +### Params type definition + +```typescript +type Params = { + placementId: string; + loader: Promise; + region?: 'eu' | 'us' | 'ap'; +}; +``` + +### Test Params ```javascript const adUnits = [ - { - code: 'test-div', - sizes: [[300, 250]], - bids: [ + { + code: 'test-div', + sizes: [[300, 250]], + bids: [ { bidder: 'lucead', params: { - placementId: '1', + placementId: '1', // required + loader: new Promise(/* ... */), // required + region: 'us', // optional 'eu', 'us', 'ap' } } ] } - ]; +]; ``` From 982483da629af1b077495965a8911d4eb24b57a8 Mon Sep 17 00:00:00 2001 From: Warren Fernandes <150777430+warrrrren@users.noreply.github.com> Date: Thu, 30 May 2024 23:57:07 +0530 Subject: [PATCH 19/46] medianet Paapi support (#5316) * Added PAAPI docs to medianet.md * Formatting tweaks to medianet.md * Markdown style changes medianet.md --- dev-docs/bidders/medianet.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/dev-docs/bidders/medianet.md b/dev-docs/bidders/medianet.md index 81b317b744..8b402d6818 100644 --- a/dev-docs/bidders/medianet.md +++ b/dev-docs/bidders/medianet.md @@ -42,7 +42,7 @@ sidebarType: 1 |h|integer|(Recommended) Specifies the height of the video player, in pixels. Required if playerSize not present in `mediaTypes.video`|480| |startdelay|integer |(Recommended) Specifies the start delay of the video ad|0| |battr|array of integers|Specifies the video creative attributes to block. Refer to section 5.3 of the IAB specification for a list of attributes.| [ 13, 14 ]| -playbackmethod|array of integers|Specifies the allowed playback methods. If not specified, all are assumed to be allowed. Currently supported values are: `1: Autoplay, sound on`; `2: Autoplay, sound off`; `3: Click to play`; `4: Mouse over to play`|[1, 3]| +|playbackmethod|array of integers|Specifies the allowed playback methods. If not specified, all are assumed to be allowed. Currently supported values are: `1: Autoplay, sound on`; `2: Autoplay, sound off`; `3: Click to play`; `4: Mouse over to play`|[1, 3]| |api| array of integers|Specifies the supported API frameworks for this impression. If an API is not explicitly listed, it is assumed not to be supported. Currently supported values are: `1: VPAID 1.0`; `2: VPAID 2.0`; `3: MRAID-1`; `4: ORMMA`; `5: MRAID-2`|[1, 2]| |protocols|array of integers|Array of supported video protocols. Currently supported values are: `1: VAST 1.0`; `2: VAST 2.0`; `3: VAST 3.0`; `4: VAST 1.0 Wrapper`; `5: VAST 2.0 Wrapper`; `6: VAST 3.0 Wrapper`; `7: VAST 4.0`|[1, 2]| |placement|integer|Placement type for the impression. Possible options: `1: In-Stream`; `2: In-banner`; `3: Outstream/In-article`; `4: In-feed`; `5: Interstitial/Slider/Floating`; `6: Long-Form`;|1| @@ -143,3 +143,25 @@ var adUnits = [{ }] }]; ``` + +# Protected Audience API (FLEDGE) + +To enable PAAPI auctions follow the instructions below: + +1. Add the `fledgeForGpt` and `paapi` modules to your prebid bundle. +2. Add the following configuration for the module + +```javascript +pbjs.que.push(function() { + pbjs.setConfig({ + fledgeForGpt: { + enabled: true, + bidders: ['medianet'], + defaultForSlots: 1 + } + }); +}); +``` + +For a detailed guide to enabling PAAPI auctions follow Prebid's documentation +on [`fledgeForGpt`](https://docs.prebid.org/dev-docs/modules/fledgeForGpt.html) From 67ebdce2c6e76c986230073c683ec82c9cb68f9e Mon Sep 17 00:00:00 2001 From: sebastienrufiange <131205907+sebastienrufiange@users.noreply.github.com> Date: Thu, 30 May 2024 14:28:11 -0400 Subject: [PATCH 20/46] Contxtful RTD Provider - Updated Documentation (#5322) * ContxtfulRtdModule: update doc for upcoming PR * ContxtfulRtdProvider: fix table rows * contxtfulRtdProvider: update documentation for hostname * contxtfulRtdProvider: update documentation for "adServerTargeting" * contxtfulRtdProvider: update documentation for "bidders" * contxtfulRtdProvider: add Injection in ortb2 for bidders * contxtfulRtdProvider: fix header style * contxtfulRtdProvider: improve header style * contxtfulRtdProvider: fix 'no-bare-urls' * contxtfulRtdProvider: improve sentences * contxtfulRtdProvider: fix multi-line row in .md file --------- Co-authored-by: Sebastien Boisvert --- dev-docs/modules/contxtfulRtdProvider.md | 52 +++++++++++++++++------- 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/dev-docs/modules/contxtfulRtdProvider.md b/dev-docs/modules/contxtfulRtdProvider.md index 07fc6418a0..b5523da656 100644 --- a/dev-docs/modules/contxtfulRtdProvider.md +++ b/dev-docs/modules/contxtfulRtdProvider.md @@ -24,14 +24,14 @@ The Contxtful RTD module enhances ad units by adding a Receptivity score to the To incorporate this module into your `prebid.js`, compile the module using the following command: ```sh -gulp build --modules=contxtfulRtdProvider, +gulp build --modules=rtdModule,contxtfulRtdProvider, ``` -### Configuration +## Configuration Configure the `contxtfulRtdProvider` by passing the required settings through the `setConfig` function in `prebid.js`. -```js +```javascript import pbjs from 'prebid.js'; pbjs.setConfig({ @@ -42,8 +42,11 @@ pbjs.setConfig({ "name": "contxtful", "waitForIt": true, "params": { - "version": "", - "customer": "" + "version": "Contact contact@contxtful.com for the API version", + "customer": "Contact contact@contxtful.com for the customer ID", + "hostname": "api.receptivity.io", // Optional, default: "api.receptivity.io" + "bidders": ["bidderCode1", "bidderCode", "..."], // list of bidders + "adServerTargeting": true, // Optional, default: true } } ] @@ -51,35 +54,46 @@ pbjs.setConfig({ }); ``` -#### Parameters +## Parameters {: .table .table-bordered .table-striped } -| Name | Type | Scope | Description | -|------------|----------|----------|-------------------------------------------| -| `version` | `string` | Required | Specifies the API version of Contxtful. | -| `customer` | `string` | Required | Your unique customer identifier. | +| Name | Type | Scope | Description | +|---------------------|----------|----------|--------------------------------------------| +| `version` | `String` | Required | Specifies the version of the Contxtful Receptivity API. | +| `customer` | `String` | Required | Your unique customer identifier. | +| `hostname` | `String` | Optional | Target URL for CONTXTFUL external JavaScript file. Default is "api.receptivity.io". Changing default behaviour is not recommended. Please reach out to [contact@contxtful.com](mailto:contact@contxtful.com) if you experience issues. | +| `adServerTargeting` | `Boolean`| Optional | Enables the `getTargetingData` to inject targeting value in ad units. Setting to true enables the feature, false disables the feature. Default is true | +| `bidders` | `Array` | Optional | Setting this array enables Receptivity in the `ortb2` object through `getBidRequestData` for all the listed `bidders`. Default is `[]` (an empty array). RECOMMENDED : Add all the bidders active like this `["bidderCode1", "bidderCode", "..."]` | -## Usage +## Usage: Injection in Ad Servers The `contxtfulRtdProvider` module loads an external JavaScript file and authenticates with Contxtful APIs. The `getTargetingData` function then adds a `ReceptivityState` to each ad slot, which can have one of two values: `Receptive` or `NonReceptive`. ```json { "adUnitCode1": { "ReceptivityState": "Receptive" }, - "adUnitCode2": { "ReceptivityState": "NonReceptive" } + "adUnitCode2": { "ReceptivityState": "Receptive" } } ``` This module also integrates seamlessly with Google Ad Manager, ensuring that the `ReceptivityState` is available as early as possible in the ad serving process. -### Example +## Usage: Injection in ortb2 for bidders + +Setting the `bidders` field in the configuration parameters enables Receptivity in the `ortb2` object through `getBidRequestData` for all the listed bidders. +On a Bid Request Event, all bidders in the configuration will inherit the Receptivity data through `ortb2` +Default is `[]` (an empty array) + +RECOMMENDED : Add all the bidders active like this `["bidderCode1", "bidderCode", "..."]` + +## Example To view an integration example: 1. In your CLI run: ```bash - gulp serve --modules=appnexusBidAdapter,contxtfulRtdProvider + gulp serve --modules=rtdModule,appnexusBidAdapter,rubiconBidAdapter,sharethroughBidAdapter,contxtfulRtdProvider ``` 2. In your browser, navigate to: @@ -90,4 +104,12 @@ To view an integration example: ## Support -To utilize this module, you need to register for an account with [Contxtful](https://contxtful.com). For inquiries, please contact [prebid@contxtful.com](mailto:prebid@contxtful.com). +To utilize this module, you need to register for an account with [Contxtful](https://contxtful.com). For inquiries, please contact [contact@contxtful.com](mailto:contact@contxtful.com). + +## Links + +- [Basic Prebid.js Example](https://docs.prebid.org/dev-docs/examples/basic-example.html) +- [How Bid Adapters Should Read First Party Data](https://docs.prebid.org/features/firstPartyData.html#how-bid-adapters-should-read-first-party-data) +- [getBidRequestData](https://docs.prebid.org/dev-docs/add-rtd-submodule.html#getbidrequestdata) +- [getTargetingData](https://docs.prebid.org/dev-docs/add-rtd-submodule.html#gettargetingdata) +- [Contxtful Documentation](https://documentation.contxtful.com/) From a5705e24a98e7c57e7ad2950ab819aed998d1bc6 Mon Sep 17 00:00:00 2001 From: John Salis Date: Thu, 30 May 2024 14:30:13 -0400 Subject: [PATCH 21/46] Update Beachfront doc for plcmt (#5340) * update beachfront doc for plcmt * add placement to doc --------- Co-authored-by: John Salis --- dev-docs/bidders/beachfront.md | 1 + 1 file changed, 1 insertion(+) diff --git a/dev-docs/bidders/beachfront.md b/dev-docs/bidders/beachfront.md index afd897fdfd..9e9f73c946 100644 --- a/dev-docs/bidders/beachfront.md +++ b/dev-docs/bidders/beachfront.md @@ -52,6 +52,7 @@ For further information, please contact . | `playbackmethod` | optional | Playback method supported by the publisher.
`1`: Auto-play sound on
`2`: Auto-play sound off
`3`: Click-to-play
`4`: Mouse-over | `1` | `integer` | | `maxduration` | optional | Maximum video ad duration in seconds. | `30` | `integer` | | `placement` | optional | Placement type for the impression.
`1`: In-Stream
`2`: In-Banner
`3`: In-Article
`4`: In-Feed
`5`: Interstitial/Slider/Floating | `1` | `integer` | +| `plcmt` | optional | Placement type for the impression. See [AdCOM v1 spec](https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/develop/AdCOM%20v1.0%20FINAL.md#list_plcmtsubtypesvideo) | `1` | `integer` | | `skip` | optional | Indicates if the player will allow the video to be skipped. | `1` | `integer` | | `skipmin` | optional | Videos of total duration greater than this number of seconds can be skippable. | `15` | `integer` | | `skipafter` | optional | Number of seconds a video must play before skipping is enabled. | `5` | `integer` | From 75fb754838833b6a37cc537affeb9d293dc4176e Mon Sep 17 00:00:00 2001 From: Olivier Date: Thu, 30 May 2024 20:35:37 +0200 Subject: [PATCH 22/46] Adagio Rtd Provider: add doc (#5351) * Add Adagio Rtd Provider doc * removing TOC Don't believe this is long enough to warrant a Table of Contents. --------- Co-authored-by: bretg --- dev-docs/modules/adagioRtdProvider.md | 65 +++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 dev-docs/modules/adagioRtdProvider.md diff --git a/dev-docs/modules/adagioRtdProvider.md b/dev-docs/modules/adagioRtdProvider.md new file mode 100644 index 0000000000..2078f4cc30 --- /dev/null +++ b/dev-docs/modules/adagioRtdProvider.md @@ -0,0 +1,65 @@ +--- +layout: page_v2 +title: Adagio Rtd Module +display_name: Adagio Rtd Module +description: The Adagio Rtd module computes and collects data required to leverage Adagio viewability and attention prediction engine. +page_type: module +module_type: rtd +module_code : adagioRtdProvider +enable_download : true +vendor_specific: true +sidebarType : 1 +--- + +# Adagio Real Time Data Module + +## Overview + +This module can be used in combination with [Adagio Bid Adapter](/dev-docs/bidders/adagioBidAdapter.md) (SSP) and/or with Adagio prebid server endpoint. +It computes and collects data required to leverage Adagio viewability and attention prediction engine. + +Please contact [contact@adagio.io](contact@adagio.io) for more information. + +{% include dev-docs/loads-external-javascript.md %} + +## Configuration + +This module is configured as part of the `realTimeData.dataProviders` object. + +```javascript +pbjs.setConfig({ + realTimeData: { + dataProviders:[{ + name: 'adagio', + params: { + organizationId: '1000', // Required. Provided by Adagio + site: "my-site" // Required. Provided by Adagio + } + }] + } +}); +``` + +Syntax details: + +{: .table .table-bordered .table-striped } +| Name | Scope | Description | Example | Type | +|-------------------------|----------|-----------------------------------------------|-------------|----------| +| `name` | required | Real time data module name: Always `'adagio'` | `'adagio'` | `string` | +| `params` | required | | | `Object` | +| `params.organizationId` | required | Account id provided by Adagio. | `'1000'` | `string` | +| `params.site` | required | Account site name provided by Adagio. | `'my-site'` | `string` | + +## Installation + +To install the module, follow these instructions: + +* Contact Adagio to get an account + +* Build the prebid.js file + + * Option 1: Use Prebid [Download](/download.html) page to build the prebid package. Ensure that you do check *Adagio* in Bidder Adapters and *Adagio Rtd Module* in Vendor-Specific Modules + + * Option 2: From the command line, run `gulp build --modules=adagioBidAdapter,rtdModule,adagioRtdProvider,...` + +* Enable Adagio Real Time Module using `pbjs.setConfig`. Example is provided in Configuration section. From 828d7e77dffd19217514fe8886f395dfdf56b95a Mon Sep 17 00:00:00 2001 From: mdusmanalvi <72804728+mdusmanalvi@users.noreply.github.com> Date: Fri, 31 May 2024 00:06:26 +0530 Subject: [PATCH 23/46] updating docs for tercept analytics module (#5353) * updating docs for analytics module * fixed some md linting * fixed some md linting * set enabled_download to true * updated the email id --- dev-docs/analytics/tercept.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/dev-docs/analytics/tercept.md b/dev-docs/analytics/tercept.md index 009d640164..1fdfaeaefc 100644 --- a/dev-docs/analytics/tercept.md +++ b/dev-docs/analytics/tercept.md @@ -3,8 +3,25 @@ layout: analytics title: Tercept description: Tercept Analytics Adapter modulecode: tercept +enable_download: true --- - #### Registration +To start using Prebid Analytics, please, email us at to provide us with your billing info and get your personal publisher ID & Key along with other details which are used in the prebid config on your site/s. +Add the following code to your prebid.js config to activate Prebid Analytics: +#### Example Configuration + +```text +pbjs.que.push(function() { + pbjs.enableAnalytics({ + provider: 'tercept', + options: { + pubId: , + pubKey: , + host: + pathName: + } +}); +}); +``` -Please visit [www.tercept.com](https://www.tercept.com/) for more information. +Please visit for more information. From 9c1afbec109e372cdc66b400bb7ce822aa099dc4 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Thu, 30 May 2024 14:41:29 -0400 Subject: [PATCH 24/46] Update sirdataRtdProvider.md (#5366) * Update sirdataRtdProvider.md * Update sirdataRtdProvider.md * added alert formatting --------- Co-authored-by: bretg --- dev-docs/modules/sirdataRtdProvider.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dev-docs/modules/sirdataRtdProvider.md b/dev-docs/modules/sirdataRtdProvider.md index 27f652d197..724a036dac 100644 --- a/dev-docs/modules/sirdataRtdProvider.md +++ b/dev-docs/modules/sirdataRtdProvider.md @@ -12,7 +12,6 @@ sidebarType : 1 --- # Sirdata RTD/SDA Module - {:.no_toc} * TOC @@ -32,6 +31,9 @@ Fully supports Seller Defined Audience ! Please find the full SDA taxonomy ids l Please contact for more information. +{: .alert.alert-warning :} +Disclosure: This module harvests all page content, even for logged in users, and some EIDs, including the SharedId + ## Publisher Usage ### Configure Prebid.js From 051e9305586cec191cf8e14f97b0d856430cc6f1 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Thu, 30 May 2024 14:42:15 -0400 Subject: [PATCH 25/46] Update id5.md (#5369) --- dev-docs/modules/userid-submodules/id5.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-docs/modules/userid-submodules/id5.md b/dev-docs/modules/userid-submodules/id5.md index ac2d6455d2..e6f65a7bfd 100644 --- a/dev-docs/modules/userid-submodules/id5.md +++ b/dev-docs/modules/userid-submodules/id5.md @@ -29,7 +29,7 @@ The following configuration parameters are available: | name | Required | String | The name of this module: `"id5Id"` | `"id5Id"` | | params | Required | Object | Details for the ID5 ID. | | | params.partner | Required | Number | This is the ID5 Partner Number obtained from registering with ID5. | `173` | -| params.externalModuleUrl | Optional | String | URL to the external ID5 module. Highly recommended for the best integration possible. | `https://cdn.id5-sync.com/api/1.0/id5PrebidModule.js` | +| params.externalModuleUrl | Optional | String | URL to the external ID5 module. Highly recommended for the best integration possible. This is additional javascript unreviewed by the prebid.js community | `https://cdn.id5-sync.com/api/1.0/id5PrebidModule.js` | | params.pd | Optional | String | Partner-supplied data used for linking ID5 IDs across domains. See [our documentation](https://wiki.id5.io/en/identitycloud/retrieve-id5-ids/passing-partner-data-to-id5) for details on generating the string. Omit the parameter or leave as an empty string if no data to supply | `"MT1iNTBjY..."` | | params.abTesting | Optional | Object | Allows publishers to easily run an A/B Test. If enabled and the user is in the Control Group, the ID5 ID will NOT be exposed to bid adapters for that request | Disabled by default | | params.abTesting.enabled | Optional | Boolean | Set this to `true` to turn on this feature | `true` or `false` | From 4c25f39336ea116032bcd438c4b24b948338869b Mon Sep 17 00:00:00 2001 From: rimaburder-index <55195208+rimaburder-index@users.noreply.github.com> Date: Thu, 30 May 2024 14:43:56 -0400 Subject: [PATCH 26/46] Update ix.md (#5371) * Update ix.md Updated list of user IDS, updated the example for native, and updated the example for instream video * Update ix.md updated native example --- dev-docs/bidders/ix.md | 134 +++++++++++++++++++++++++---------------- 1 file changed, 83 insertions(+), 51 deletions(-) diff --git a/dev-docs/bidders/ix.md b/dev-docs/bidders/ix.md index 0edc681474..9c9190e7ca 100644 --- a/dev-docs/bidders/ix.md +++ b/dev-docs/bidders/ix.md @@ -5,7 +5,7 @@ description: Prebid Index Exchange Bidder Adapter biddercode: ix pbjs: true pbs: false -userIds: idl, netId, fabrickId, zeotapIdPlus, uid2, TDID, id5Id, lotamePanoramaId, publinkId, hadronId, pubcid, utiq, criteoID, euid, imuid, 33acrossId, nonID, pairid, MRKL +userIds: amazonAdvertisingID, fabrickId, zeotapIdPlus, TDID, tpid, id5Id, lotamePanoramaId, publinkId, hadronId, pubcid, trustpid, utiqMtpId, criteoID, euid, imuid, 33acrossId, nonID, pairId, M1ID, RampID, connectId pbs_app_supported: true schain_supported: true coppa_supported: true @@ -318,30 +318,46 @@ pbjs.addAdUnits({ code: slot.code, mediaTypes: { native: { - image: { - required: true, - sizes: [150, 50] - }, - title: { - required: true, - len: 80 - }, - sponsoredBy: { - required: true - }, - clickUrl: { - required: true - }, - privacyLink: { - required: false - }, - body: { - required: true - len: 90 - }, - icon: { - required: true, - sizes: [50, 50] + ortb: { + assets: [{ + id: 1, + required: 1, + img: { + type: 3, + w: 150, + h: 50, + } + }, + { + id: 2, + required: 1, + title: { + len: 80 + } + }, + { + id: 3, + required: 1, + data: { + type: 1 + } + }, + { + id: 4, + required: 1, + data: { + type: 2 + } + }, + { + id: 6, + required: 1, + img: { + type: 1, + w: 50, + h: 50, + } + }] } } }, @@ -582,7 +598,6 @@ var adUnits = [{ mediaTypes: { video: { // Preferred location as of version 4.43 - video obj context: 'instream', playerSize: [300, 250], api: [2], @@ -590,7 +605,8 @@ var adUnits = [{ minduration: 5, maxduration: 30, mimes: ['video/mp4', 'application/javascript'], - placement: 3 + placement: 3, + plcmt: 1 } }, bids: [{ @@ -649,30 +665,46 @@ pbjs.addAdUnits({ code: slot.code, mediaTypes: { native: { - image: { - required: true, - sizes: [150, 50] - }, - title: { - required: true, - len: 80 - }, - sponsoredBy: { - required: true - }, - clickUrl: { - required: true - }, - privacyLink: { - required: false - }, - body: { - required: true - len: 90 - }, - icon: { - required: true, - sizes: [50, 50] + ortb: { + assets: [{ + id: 1, + required: 1, + img: { + type: 3, + w: 150, + h: 50, + } + }, + { + id: 2, + required: 1, + title: { + len: 80 + } + }, + { + id: 3, + required: 1, + data: { + type: 1 + } + }, + { + id: 4, + required: 1, + data: { + type: 2 + } + }, + { + id: 6, + required: 1, + img: { + type: 1, + w: 50, + h: 50, + } + }] } } }, From d111d299dddc1e1c7d0c81296b56889309a45824 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Thu, 30 May 2024 14:44:47 -0400 Subject: [PATCH 27/46] Update ftrack.md disclosures (#5370) * Update ftrack.md disclosures * add alert formatting --------- Co-authored-by: bretg --- dev-docs/modules/userid-submodules/ftrack.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dev-docs/modules/userid-submodules/ftrack.md b/dev-docs/modules/userid-submodules/ftrack.md index 89b636c898..2363defd83 100644 --- a/dev-docs/modules/userid-submodules/ftrack.md +++ b/dev-docs/modules/userid-submodules/ftrack.md @@ -5,9 +5,11 @@ description: FTrack ID from Flashtalking By Mediaocean User ID sub-module useridmodule: ftrackIdSystem --- - The FTrack Identity Framework (["FTrack"](https://www.flashtalking.com/identity-framework#FTrack)) User ID Module allows publishers to take advantage of Flashtalking's FTrack ID during the bidding process. +{: .alert.alert-warning :} +Disclosure: This module loads javascript unreviewed by the prebid.js community. + Flashtalking’s cookieless tracking technology uses probabilistic device recognition to derive a privacy-friendly persistent ID for each device. Questions? Comments? Bugs? Praise? Please contact FlashTalking's Prebid Support at [prebid-support@flashtalking.com](mailto:prebid-support@flashtalking.com) From 43d6ca5acf0d5a4892aee83a859c90370f0df45e Mon Sep 17 00:00:00 2001 From: driftpixelai <166716541+driftpixelai@users.noreply.github.com> Date: Thu, 30 May 2024 19:47:00 +0100 Subject: [PATCH 28/46] add driftpixel Adapter (#5302) * add driftpixel Adapter * Update driftpixel.md: pbs support added * Update driftpixel.md: blank line removed * lint --------- Co-authored-by: Chucky-choo Co-authored-by: bretg --- dev-docs/bidders/driftpixel.md | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 dev-docs/bidders/driftpixel.md diff --git a/dev-docs/bidders/driftpixel.md b/dev-docs/bidders/driftpixel.md new file mode 100644 index 0000000000..2c8cda4d51 --- /dev/null +++ b/dev-docs/bidders/driftpixel.md @@ -0,0 +1,35 @@ +--- +layout: bidder +title: driftpixel +description: driftpixel Bidder Adapter +biddercode: driftpixel +media_types: banner, video +coppa_supported: true +tcfeu_supported: false +usp_supported: true +prebid_member: false +pbjs: true +pbs: true +schain_supported: true +floors_supported: true +multiformat_supported: will-bid-on-any +sidebarType: 1 +safeframes_ok: true +--- + +### Prebid.js Bid params + +{: .table .table-bordered .table-striped } +| Name | Scope | Description | Example | Type | +|-------------|----------|-----------------------------|---------------|-----------| +| `pid` | required | Placement ID | `test-banner` | `string` | +| `env` | required | Environment name | `driftpixel` | `string` | +| `ext` | optional | Specific integration config | `{}` | `object` | + +### Prebid Server Bid params + +{: .table .table-bordered .table-striped } +| Name | Scope | Description | Example | Type | +|-------------|----------|-----------------------------|---------------|-----------| +| `pid` | required | Unique placement ID | `pid1` | `string` | +| `env` | optional | Driftpixel environment | `test` | `string` | From 383dd228a7cb6f8853b63c1b4f9199a3dbc1ec8a Mon Sep 17 00:00:00 2001 From: Shubham <127132399+shubhamc-ins@users.noreply.github.com> Date: Fri, 31 May 2024 00:17:38 +0530 Subject: [PATCH 29/46] Insticator Bid Adaptor: update docs for bidfloor (#5307) * update docs for bidfloor * add usd floor in description --- dev-docs/bidders/insticator.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dev-docs/bidders/insticator.md b/dev-docs/bidders/insticator.md index ec3b8565f7..87880a2ba6 100644 --- a/dev-docs/bidders/insticator.md +++ b/dev-docs/bidders/insticator.md @@ -10,6 +10,7 @@ usp_supported: true coppa_supported: true gdpr_supported: true schain_supported: true +floors_supported: true media_types: banner, video multiformat_supported: will-bid-on-any pbjs: true @@ -27,7 +28,9 @@ sidebarType: 1 | `gender` | optional | Gender | `'M'` | `string` | | `instl` | optional | 1 = the ad is interstitial or full screen, 0 = not interstitial. | `1` | `number` | | `pos` | optional | ad position as per IAB standards | `1` | `number` | -| `bid_endpoint_request_url` | optional | Url string representing the endpoint Insticator adaptor should make the request bids to. | `https://ex.ingage.com/v1/openrtb` | `string` | +| `bid_endpoint_request_url` | optional | Url string representing the endpoint Insticator adaptor should make the request bids to.| `https://ex.ingage.com/v1/openrtb` | `string` | +| `floor` | optional | Sets a floor for bidder. | `0.50` | `float` | +| `bidfloorcur` | optional | Currency of the floor. (Insticator only supports USD floors) | `USD` | `string` | ### Banner Params From 61a63a7edab0c4f954d46bf33b07e9255d8a0e5a Mon Sep 17 00:00:00 2001 From: bretg Date: Thu, 30 May 2024 15:38:07 -0400 Subject: [PATCH 30/46] mobile training videos (#5372) * mobile training videos * lint --- overview/all-videos.md | 2 + .../prebid-mobile-getting-started.md | 24 +++- prebid-mobile/prebid-mobile-video-flow.md | 100 +++++++++++++++++ prebid-mobile/prebid-mobile-video-planning.md | 105 ++++++++++++++++++ 4 files changed, 227 insertions(+), 4 deletions(-) create mode 100644 prebid-mobile/prebid-mobile-video-flow.md create mode 100644 prebid-mobile/prebid-mobile-video-planning.md diff --git a/overview/all-videos.md b/overview/all-videos.md index bf43d4652a..0f1aace48c 100644 --- a/overview/all-videos.md +++ b/overview/all-videos.md @@ -21,3 +21,5 @@ Multimedia overviews covering various aspect of Header Bidding and Prebid. 1. [Prebid.js and The Video Ad Format](/prebid-video/video-overview-video.html) - An introduction to how video works with Prebid.js. 1. [Prebid and Ad Operations](/adops/adops-overview-video.html) - An overview of the process of planning a Prebid integration for ad operations. 1. [Floors in Prebid.js and Prebid Server](/dev-docs/floors-video-overview.html) - An overview of the Prebid.js and Prebid Server price floor features. +1. [Prebid Mobile Impression Flow](/prebid-mobile/prebid-mobile-video-flow.html) - A step-by-step walkthrough of a typical Prebid Mobile auction. +1. [Prebid Mobile Planning Guide](/prebid-mobile/prebid-mobile-video-planning.html) - A video guide to planning your first Prebid Mobile integration. diff --git a/prebid-mobile/prebid-mobile-getting-started.md b/prebid-mobile/prebid-mobile-getting-started.md index b615514bc4..4fd9c353fc 100644 --- a/prebid-mobile/prebid-mobile-getting-started.md +++ b/prebid-mobile/prebid-mobile-getting-started.md @@ -10,15 +10,31 @@ sidebarType: 2 This page gives an overview of steps you need to take, either as an ad ops user or as a developer, to start using Prebid Mobile. -{% capture alertNote %} +{: .alert.alert-info :} If this is your first time working with header bidding, we recommend that you read [What is Prebid?](/overview/intro.html) before diving into Prebid Mobile. -{% endcapture %} - -{% include alerts/alert_note.html content=alertNote %} - TOC {:toc} +## Video Overviews + +{% include vimeo-iframe.html id="945961210" title="Prebid Mobile Impression Flow" %} + +Further Content: + +- [Transcript of this video](/prebid-mobile/prebid-mobile-video-flow.html) +- [Getting Started with Prebid Mobile](/prebid-mobile/prebid-mobile-getting-started.html) +- [All videos](/overview/all-videos.html) + +{% include vimeo-iframe.html id="948475423" title="Prebid Mobile Planning Guide" %} + +Further Content: + +- [Transcript of this video](/prebid-mobile/prebid-mobile-video-planning.html) +- [Getting Started with Prebid Mobile](/prebid-mobile/prebid-mobile-getting-started.html) +- [Prebid Managed Services](https://prebid.org/product-suite/managed-services/) +- [All videos](/overview/all-videos.html) + ## Set Up Prebid Server 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: diff --git a/prebid-mobile/prebid-mobile-video-flow.md b/prebid-mobile/prebid-mobile-video-flow.md new file mode 100644 index 0000000000..dc80e705b9 --- /dev/null +++ b/prebid-mobile/prebid-mobile-video-flow.md @@ -0,0 +1,100 @@ +--- +layout: page_v2 +title: Video overview of how Prebid Mobile works +description: Video overview of how Prebid Mobile works +sidebarType: 0 +--- + +# Video overview of how Prebid Mobile works + +A step-by-step walkthrough of a typical Prebid Mobile auction. + +{% include vimeo-iframe.html id="945961210" title="Prebid Mobile Impression Flow" %} + +Further Content: + +- [Getting Started with Prebid Mobile](/prebid-mobile/prebid-mobile-getting-started.html) +- [All videos](/overview/all-videos.html) + +Related Videos: + +- [Introduction to Prebid Mobile](/prebid-mobile/prebid-mobile-video.html) +- [Prebid.js Impression Flow](/prebid/prebidjs-flow-video.html) +- [Prebid Mobile Planning Guide](/prebid-mobile/prebid-mobile-video-planning.html) + +## Transcript + +### Introduction + +This video explains how Prebid Mobile works by walking through a typical Prebid Mobile Auction. + +Prebid Mobile is Prebid’s solution for header bidding in the mobile app environment. + +For a high level introduction to the Prebid Mobile product and the benefits it offers app developers, check out our Introduction to Prebid Mobile video. For context on Prebid conventions and terminology, we also recommend watching the Prebid.js Impression Flow video, which walks through a standard Prebid.js auction for websites. The links to these videos are in the notes below. + +Prebid Mobile allows app developers to access demand from multiple programmatic advertising marketplaces simultaneously. It can serve ads with or without a primary ad server and is compatible with every major mobile app ad serving solution. + +### Prebid Mobile Architecture + +Let’s start by covering the basic structure of the Prebid Mobile solution. + +The Prebid Mobile solution consists of two components that work closely together: the Prebid SDK and Prebid Server. SDK stands for “Software Development Kit”, which is a type of module that can be installed into an app and has specific functionality. The Prebid SDK is responsible for communicating between the app, Prebid Server, and the primary ad server, if one exists. It also helps to render ads from Prebid Mobile demand sources. + +Prebid Server is responsible for running the auction among demand partners. It allows multiple demand partners to bid simultaneously on each ad opportunity, and it’s where inventory and auction controls are set. + +Prebid Server is open source code. To use it, you’ll need to set up your own hosting server or find a partner to manage the hosting server for you. + +For more information on this process, check out our other video on planning a Prebid Mobile integration. + +### Impression Flow + +With the basics in place, let’s now walk through a Prebid Mobile auction step-by-step. +Like in any Prebid Server auction, the process can be broken down into three stages: Pre-Auction, Auction, and Post-Auction. + +#### Pre-Auction + +As always, we start with Pre-Auction + +In the Pre Auction Phase, the Prebid SDK is initialized. When the development team installs the SDK, they include an auction settings ID, which identifies the entire Prebid Mobile instance. They will also tag each ad slot with a config ID, which allows Prebid Server to look up information about the ad unit and run an auction. + +When an app screen loads that contains ad slots, the SDK will prepare a request for ads. It gathers the auction settings ID and config IDs for each of the page’s ad slots, along with other client-side data like app and device identifiers, first party data, and privacy consent data such as a consent string. + +The SDK then calls Prebid Server with an ad request. When Prebid Server receives the request, it uses the auction settings ID and config IDs to look up data. + +Prebid Mobile stores ad unit data like media type parameters and bidder configurations in a database on the server side. Prebid Mobile’s server-side architecture makes it easy for the monetization team to change auction settings without needing to update the app. + +In the Prebid Server documentation, the auction settings ID is sometimes called the “top-level stored request ID”, while config IDs are called “impression-level stored request IDs”. + +As noted a moment ago, PBS uses these IDs to look up data. Specifically, the account ID (or auction settings ID) is used to look up settings like price granularity, the auction timeout, and ad server targeting settings. + +The config IDs are used to gather information about the ad unit, such as the ad format and the list of bidders enabled to bid on the ad unit. + +During this pre-auction stage, Prebid Server also looks up other data like the device location and applies any location-specific privacy controls. It’s also able to perform extra optional tasks like establishing a price floor to govern the auction. + +Prebid Mobile stores ad unit data like media type parameters and bidder configurations in a database on the server side. Prebid Mobile’s server-side architecture makes it easy for the monetization team to change auction settings without needing to update the app. In the Prebid Server documentation, the auction settings ID is sometimes called the “top-level stored request ID”, while config IDs are called “impression-level stored request IDs”. + +When an app screen loads that contains ad slots, the SDK will prepare a request for ads. It gathers the auction settings ID and config IDs for each of the page’s ad slots, along with other client-side data like app and device identifiers, first party data, and privacy consent data such as a consent string. + +#### Auction + +With the Pre-Auction data-gathering complete, Prebid Server begins the Auction stage. +It makes OpenRTB bid requests to bidders, who evaluate the impression opportunities and return bid responses. +#### Post-Auction + +When either all of the bidders have responded or the bid timeout period has elapsed, Prebid Server closes the auction, and the Post-Auction stage begins. + +Prebid Server parses the bid responses, and may perform validations such as enforcing price floors, if they exist. + +It will cache data including the ad creative for valid bids and prepare a response to the SDK. + +Prebid Server then responds to the Prebid SDK with an OpenRTB response that includes bid prices and ad server targeting key-value pairs. + +When the Prebid SDK receives the response from Prebid Server, it works with the ad serving or mediation stack to complete the ad decisioning process. The bids that Prebid Mobile has gathered will compete with other demand, such as ad networks or direct campaigns for the opportunity to serve. The details of how this process works depends on your ad serving and mediation setup. + +Some ad stacks construct a sequential waterfall of eligible demand sources, while others use auctions. In general, we recommend using an ad stack that allows Prebid demand to compete using real time bid prices instead of static estimates. Prebid’s ability to bid dynamically into the ad stack helps publishers and app developers maximize CPMs and fill rates. Prebid Mobile is flexible and works with all of the major mobile app ad serving and mediation solutions. + +Once the ad server or mediation solution has made a decision about whose ad should serve, it’s time to render the ad. The specific details of ad rendering also depend on your app and ad stack. + +Some solutions use the Prebid Universal Creative that is commonly used for web integrations, while others use ad rendering capabilities that are built into Prebid SDK, the ad server SDK, or an SDK from a demand partner or rich media vendor. Prebid Mobile is flexible enough to work with any common rendering solution. + +That’s how ads are served with Prebid Mobile. To learn more about Prebid Mobile, check out the links included in the notes below. diff --git a/prebid-mobile/prebid-mobile-video-planning.md b/prebid-mobile/prebid-mobile-video-planning.md new file mode 100644 index 0000000000..cc22f8c06b --- /dev/null +++ b/prebid-mobile/prebid-mobile-video-planning.md @@ -0,0 +1,105 @@ +--- +layout: page_v2 +title: A video guide to planning your first Prebid Mobile integration +description: A video guide to planning your first Prebid Mobile integration +sidebarType: 0 +--- + +# Planning a Prebid Mobile integration + +A video guide to planning your first Prebid Mobile integration. + +{% include vimeo-iframe.html id="948475423" title="Prebid Mobile Planning Guide" %} + +Further Content: + +- [Getting Started with Prebid Mobile](/prebid-mobile/prebid-mobile-getting-started.html) +- [Prebid Managed Services](https://prebid.org/product-suite/managed-services/) +- [All videos](/overview/all-videos.html) + +Related Videos: + +- [Introduction to Prebid Mobile](/prebid-mobile/prebid-mobile-video.html) +- [Prebid.js Impression Flow](/prebid/prebidjs-flow-video.html) +- [Prebid Mobile Impression Flow](/prebid-mobile/prebid-mobile-video-flow.html) + +## Transcript + +### Introduction + +This video is a guide to planning an integration of Prebid Mobile. It focuses on the decisions that monetization, ad ops, and development teams should make collaboratively before beginning the technical process of implementing Prebid Mobile. + +This video assumes you have a good grasp on what Prebid Mobile does and how it works. For a high-level introduction to the Prebid Mobile solution, we recommend the Introduction to Prebid Mobile. For a more detailed look at how Prebid Mobile monetizes mobile app ad slots, check out the Prebid Mobile Impression Flow video. You can find the links to these videos in the notes below. + +This video will talk about the planning required to set up the two main components of Prebid Mobile: the Prebid SDK and Prebid Server. + +To set up Prebid Mobile, you’ll need to build the Prebid SDK into your application and configure it with IDs that will define auction settings instances and ad slots. You’ll also need to set up Prebid Server to run on a hosting server and configure it to run auctions for requests that Prebid SDK will make from the mobile app. +### Prebid SDK Planning + +Let’s start with the Prebid SDK. The Prebid SDK acts as the interface between the app’s ad slots and Prebid Server. When an app screen loads, Prebid SDK will make a request to Prebid Server that contains data that Prebid Server and bidders will use. + +There are five key types of data transmitted in an ad request from Prebid SDK: an account ID, an auction settings ID, a config ID, first-party data, and consent data. + +Account ID is used to identify your requests to the Prebid Server instance that is responsible for running your auctions. If you work with a managed service provider to maintain your Prebid Server infrastructure, the ID will be used to separate your data from the provider’s other customers’ data. + +The auction settings ID is used by Prebid Server to determine auction-level settings like bid timeout and ad server targeting. + +Config IDs are ad-unit level parameters that control the settings for a specific ad slot, including the ad slot characteristics and bidder selection. + +First party data, also called targeting data, is free-form data that you can use to enrich your ad requests with additional data that is valuable to bidders. + +Consent data relates to privacy regulations that apply to users in many regions of the world. Prebid SDK is able to obtain consent data from your Consent Management Platform and transmit it to Prebid Server. On the Prebid Server side, you’ll be able to configure how the advertising auction reacts to consent data it receives. + +Prebid Mobile has powerful tools for managing privacy and consent. How you use those tools is up to you. It’s important to develop your own strategy concerning privacy and regulatory compliance. + +When you install the Prebid SDK into your app, you’ll assign an account ID, auction settings ID, and config IDs to the app and ad placements, and you’ll set up specific first party data to be passed. It’s important to think carefully about how you want to set this up, because you would need to update the app in order to change this information. Once the SDK is installed and passing IDs and first party data in requests, your day-to-day management of Prebid Mobile doesn’t require app modifications. This is because Prebid Mobile has a server-side architecture that houses the auction and ad unit-level configurations within Prebid Server. + +Next, we’ll examine each of the Auction Settings, and First Party Data in detail. + +### Auction Settings ID + +The auction settings ID links to an object inside Prebid Server called a top-level stored request, which contains configuration parameters that apply to the entire auction. These parameters include the bid timeout, price granularity, and ad server targeting settings. + +Each time Prebid Server receives a request from Prebid SDK, it expects that request to include one auction settings ID. Many app developers use a single auction settings ID for all of their mobile app inventory, while others break up the inventory more granularly. The primary reasons to use separate auction settings are to be able to customize the bid timeout or a user privacy settings for specific apps or app screens. This increased flexibility can be useful, but it comes at the cost of greater complexity in managing configurations. + +### Config ID + +Next let’s discuss the config ID. + +The config ID links to an object inside Prebid Server called an impression-level stored request, which contains ad-unit level data, which includes bidder configurations and can include details about supported ad formats. + +Bidder parameters are one of the most important parts of any Prebid Ad Unit. By including a bidder’s parameters in the ad unit, you’re making that bidder eligible to compete for the ad unit’s impressions. Further, each bidder requires a proprietary set of ad unit identifiers and other data. Bidder params are where this bidder-specific data lives. + +A separate config ID is used for each ad placement on the app screen, so Prebid Server will expect to receive one or more config IDs in ad requests from the Prebid SDK. You'll coordinate with your Prebid Server team to define these IDs. + +When you set up the Prebid SDK, you can use a streamlined setup that uses relatively few config IDs, or a very detailed one that uses many config IDs to differentiate ad placements by position, screen type, app, and other dimensions. Using many unique config IDs gives you more flexibility in reporting and yield optimization, but can be difficult to manage operationally. Using few config IDs is the opposite: reporting and configuration is simple, but the power and the flexibility of your setup is limited. For example, let’s say you want to add a particular bidder to just one highly specific ad placement. To do so, you’d need to give that placement its own config ID. + +For many app developers, it makes sense to create a Prebid Mobile config ID mapping that matches your ad server ad units. This way, you don’t need to keep track of multiple inventory segmentation schemes, and the ad server scheme usually strikes a healthy balance between flexibility and ease of use. + +Before you start implementing your config ID setup, it’s smart to talk to your header bidding partners. Many bidders also require ad slot identifiers in the the bidder parameters section of the impression-level stored request. These identifiers help bidders understand where the impression is coming from, and bidders may have preferences regarding ad slot identification. Similarly, some Prebid Managed Services include algorithmic yield management features that rely on config IDs to optimize parameters like bid timeout, bidder selection, and price floors. + +### First Party Data + +Requests to Prebid Server can also include first party data. First party data is a wide category that can include contextual information about the app or non-personally-identifiable user data like seller-defined audiences. Like with config IDs, a good starting point is to send to Prebid Server the first party data that you already send in requests to your primary ad server. You can then take things a step further by asking your bidder partners and managed service provider for advice on what first party data signals to pass. + +Once you’ve made decisions about how to set inventory identifiers and first party data, you’ll be ready to move forward with integrating the Prebid SDK. Visit docs.prebid.org for integration documentation for the major platforms and ad stacks. + +### Prebid Server Planning + +Now let’s move to the server side. We’ll explain how to plan a Prebid Server integration. + +As we’ve said, Prebid Server receives requests from the Prebid SDK that contains auction settings IDs and config IDs and runs an auction among bidders, then responds to the Prebid SDK with the auction results. + +Prebid Server is code that the Prebid community has developed to run advertising auctions in the cloud. Anybody is welcome to use it, but they must set up their own servers to run the solution. + +Running an instance of Prebid Server is much like operating an OpenRTB marketplace. The servers must be able to process large numbers of ad requests originating from devices around the globe and run auctions that capture as many bids from bidders as possible. The servers must be both powerful and efficient. Estimating traffic volumes and managing server capacity is critically important to make sure that every ad request can be processed without wasting resources. + +Additionally, Prebid Server setup will need tools for managing auction and ad unit configurations, which can change often as you fine tune your header bidding setup. For example, adding a new bidder means changing the ad unit configuration. + +If your organization has experience managing scaled ad serving infrastructure and is able to develop configuration interfaces, then running Prebid Server on servers that you manage directly could be a good choice. + +An alternative option is to hire a company that specializes in this work. The Prebid community includes several companies that have developed Prebid Managed Services that provide products and services that include Prebid Server hosting as well as configuration tools and analytics. For more information about Prebid Managed Services, visit the link in the description below. + +### Outro + +That’s all for this guide on Prebid Mobile planning. For more information on Prebid Mobile, check out the reference documentation and docs.prebid.org. From 1a17d93caea448b480eba9fda01f6c5647438a53 Mon Sep 17 00:00:00 2001 From: adtech-colombia Date: Fri, 31 May 2024 15:58:28 +0530 Subject: [PATCH 31/46] Feature/colombia bid adapter (#5312) * new Colombia bid Adapter documentation * new Colombia bid Adapter documentation * new Colombia bid Adapter documentation * new Colombia bid Adapter documentation * new Colombia bid Adapter documentation * new Colombia bid Adapter documentation * lint --------- Co-authored-by: subhashish.singh Co-authored-by: bretg --- dev-docs/bidders/colombia.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 dev-docs/bidders/colombia.md diff --git a/dev-docs/bidders/colombia.md b/dev-docs/bidders/colombia.md new file mode 100644 index 0000000000..7224b8be41 --- /dev/null +++ b/dev-docs/bidders/colombia.md @@ -0,0 +1,30 @@ +--- +layout: bidder +title: Colombia +description: Prebid Colombia Bidder Adaptor +biddercode: colombia +media_types: banner, video, native +prebid_member: true +pbjs: true +pbs: false +pbs_app_supported: false +fpd_supported: true +multiformat_supported: will-bid-on-one +--- + +### Note + +The Colombia bidding adapter requires setup and approval before implementation. Please reach out to for more details. + +### Prebid.js Bid Params + +{: .table .table-bordered .table-striped } +| Name | Scope | Description | Example | Type | +|----------------|----------|----------------------------------------------------------|------------|-----------| +| `adSlot` | Required | adSlot will be generated on colombia SSP Platform. | `'3849382'` | `string` | +| `keywords` | optional | Comma separated string. | `'India, India news, India news today'` | `string` | +| `category` | optional | Page Categorization. | `'Election, Sports, Entertainments'` | `string` | +| `pagetype` | optional | Type of page. | `'Listing, Show, Liveblog, Photostory'` | `string` | +| `incognito` | optional | 1, for incognito mode. | `'1'` | `string` | +| `dsmi` | optional | CCPA Compliance Flag. | `'0','1'` | `string` | +| `optout` | optional | GDPR Compliance Flag. | `'0','1'` | `string` | From 048e0b161912f01b43eb9238f2fc660af4854da9 Mon Sep 17 00:00:00 2001 From: James Rosewell Date: Fri, 31 May 2024 17:29:49 +0100 Subject: [PATCH 32/46] 51Degrees module documentation: initial commit (#5287) * 51Degrees RTD Provider documentation * 51Degrees RTD Provider documentation amendments * Fix markdown to comply with style rules. * Fix params table in 51DegreesRtdProvider.md * 51d: add a disclaimer on external script addressing review comment: https://github.com/prebid/Prebid.js/pull/11414#pullrequestreview-2053051332 * 51d: add section on GetHigheEntropyValues API addressing review comment: https://github.com/prebid/Prebid.js/pull/11414#pullrequestreview-2053051332 * 51d: slightly updated disclosure warning * 51d: fix minor omissions * 51d: slight disclosure wording improvement * 51d: remove hardcoded API limits, as they change --------- Co-authored-by: Bohdan V <25197509+BohdanVV@users.noreply.github.com> Co-authored-by: Eugene Dorfman --- dev-docs/modules/51DegreesRtdProvider.md | 163 +++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 dev-docs/modules/51DegreesRtdProvider.md diff --git a/dev-docs/modules/51DegreesRtdProvider.md b/dev-docs/modules/51DegreesRtdProvider.md new file mode 100644 index 0000000000..9d99c83ed2 --- /dev/null +++ b/dev-docs/modules/51DegreesRtdProvider.md @@ -0,0 +1,163 @@ +--- +layout: page_v2 +title: 51Degrees RTD Provider Module +display_name: 51Degrees RTD Module +description: 51Degrees Real Time Data Module +page_type: module +module_type: rtd +module_code : 51DegreesRtdProvider +enable_download : true +vendor_specific: true +sidebarType : 1 +--- + +{: .alert.alert-warning :} +This module loads a dynamically generated JavaScript from cloud.51degrees.com (or your self-hosted domain) based on the evidence (HTTP headers and API results) available. The external resource is used to handle constant platform and browser evolution without requiring frequent changes to the Prebid source code. + +# 51Degrees RTD Submodule + +{:.no_toc} + +* TOC +{:toc} + +## Description + +51Degrees module enriches an OpenRTB request with [51Degrees Device Data](https://51degrees.com/documentation/index.html). + +51Degrees module sets the following fields of the device object: `make`, `model`, `os`, `osv`, `h`, `w`, `ppi`, `pxratio` - interested bidder adapters may use these fields as needed. In addition the module sets `device.ext.fiftyonedegrees_deviceId` to a permanent device ID which can be rapidly looked up in on premise data exposing over 250 properties including the device age, chip set, codec support, and price, operating system and app/browser versions, age, and embedded features. + +The module supports on premise and cloud device detection services with free options for both. + +A free resource key for use with 51Degrees cloud service can be obtained from [51Degrees cloud configuration](https://configure.51degrees.com/tWrhNfY6). This is the simplest approach to trial the module. + +An interface compatible self hosted service can be used with .NET, Java, Node, PHP, and Python. See [51Degrees examples](https://51degrees.com/documentation/_examples__device_detection__getting_started__web__on_premise.html). + +Free cloud and on premise solutions can be expanded to support unlimited requests, additional properties, and automatic daily on premise data updates via a [subscription](https://51degrees.com/pricing). + +## Usage + +### Integration + +Compile the 51Degrees RTD Module with other modules and adapters into your Prebid.js build: + +```bash +gulp build --modules="rtdModule,51DegreesRtdProvider,appnexusBidAdapter,..." +``` + +> Note that the 51Degrees RTD module is dependent on the global real-time data module, `rtdModule`. + +### Prerequisites + +#### Resource Key + +In order to use the module please first obtain a Resource Key using the [Configurator tool](https://configure.51degrees.com/tWrhNfY6) - choose the following properties: + +* DeviceId +* DeviceType +* HardwareVendor +* HardwareName +* HardwareModel +* PlatformName +* PlatformVersion +* ScreenPixelsHeight +* ScreenPixelsWidth +* ScreenInchesHeight +* ScreenInchesWidth +* PixelRatio (optional) + +PixelRatio is desirable, but it's a paid property requiring a paid license. Free API service is limited. Please check [51Degrees pricing](https://51degrees.com/pricing) to choose a plan that suits your needs. + +#### User Agent Client Hint (UA-CH) Permissions + +Some UA-CH headers are not available to third parties. To allow 51Degrees cloud service to access these headers for more accurate detection and lower latency, it is highly recommended to set `Permissions-Policy` in one of two ways: + +In the HTML of the publisher's web page where Prebid.js wrapper is integrated: + +```html + +``` + +Or in the Response Headers of the publisher's web server: + +```http +Permissions-Policy: ch-ua-arch=(self "https://cloud.51degrees.com"), ch-ua-full-version=(self "https://cloud.51degrees.com"), ch-ua-full-version-list=(self "https://cloud.51degrees.com"), ch-ua-model=(self "https://cloud.51degrees.com"), ch-ua-platform=(self "https://cloud.51degrees.com"), ch-ua-platform-version=(self "https://cloud.51degrees.com") + +Accept-CH: sec-ch-ua-arch, sec-ch-ua-full-version, sec-ch-ua-full-version-list, sec-ch-ua-model, sec-ch-ua-platform, sec-ch-ua-platform-version +``` + +See the [51Degrees documentation](https://51degrees.com/documentation/_device_detection__features__u_a_c_h__overview.html) for more information concerning UA-CH and permissions. + +##### Why not use GetHighEntropyValues API instead? + +Thanks for asking. + +The script this module injects has a fall back to the GetHighEntropyValues API, but does not rely on it as a first (or only) choice route - please see the illustrative cases below. Albeit it seems easier, GHEV API is not supported by all browsers (so the decision to call it should be conditional) and also even in Chrome this API will likely be a subject to the Privacy Budget in the future. + +In summary we recommend using `Delegate-CH` http-equiv as the preferred method of obtaining the necessary evidence because it is the fastest and future proof method. + +##### Illustrative Cases + +* if the device is iPhone/iPad then there is no point checking for or calling GetHighEntropyValues at the moment because iOS does not support this API. However this might change in the future. Platforms like iOS require additional techniques to identify the model which are not covered via a single API call, and change from version to version of the operating system and browser rendering engine. **When used with iOS 51Degrees resolves the [iPhone/iPad model groups](https://51degrees.com/documentation/4.4/_device_detection__features__apple_device_table.html) using these techniques.** That is one of the benefits the module brings to the Prebid community as most solutions do not resolve iPhone/iPad model groups. More on Apple Device Detection [here](https://51degrees.com/documentation/4.4/_device_detection__features__apple_detection.html). + +* if the browser is Firefox on Android or desktop then there is similarly no point requesting GHEV as the API is not supported. + +* if the browser is Chrome then the `Delegate-CH` if enabled by the publisher would enable the browser to provide the necessary evidence. However if this is not implemented - then the dynamic script would fall back to GHEV which is slower. + +### Configuration + +This module is configured as part of the `realTimeData.dataProviders` + +```javascript +pbjs.setConfig({ + debug: true, // we recommend turning this on for testing as it adds more logging + realTimeData: { + auctionDelay: 1000, // should be set lower in production use + dataProviders: [ + { + name: '51Degrees', + waitForIt: true, // should be true, otherwise the auctionDelay will be ignored + params: { + // Get your resource key from https://configure.51degrees.com/tWrhNfY6 to connect to cloud.51degrees.com + resourceKey: '', + // alternatively, you can use the on-premise version of the 51Degrees service and connect to your chosen end point + // onPremiseJSUrl: 'https://localhost/51Degrees.core.js' + }, + }, + ], + }, +}); +``` + +### Parameters + +> Note that `resourceKey` and `onPremiseJSUrl` are mutually exclusive parameters. Use strictly one of them: either a `resourceKey` for cloud integration and `onPremiseJSUrl` for the on-premise self-hosted integration. + +| Name | Type | Description | Default | +|:----------------------|:--------|:-------------------------------------------------------------------------------------------------|:-------------------| +| name | String | Real time data module name | Always '51Degrees' | +| waitForIt | Boolean | Should be `true` if there's an `auctionDelay` defined (mandatory) | `false` | +| params | Object | | | +| params.resourceKey | String | Your 51Degrees Cloud Resource Key | | +| params.onPremiseJSUrl | String | Direct URL to your self-hosted on-premise JS file (e.g. `https://your.domain/51Degrees.core.js`) | | + +## Example + +> Note: you need to have a valid resource key to run the example.\ +> It should be set in the configuration instead of ``.\ +> It is located in the `integrationExamples/gpt/51DegreesRtdProvider_example.html` file. + +If you want to see an example of how the 51Degrees RTD module works,\ +run the following command: + +`gulp serve --modules=rtdModule,51DegreesRtdProvider,appnexusBidAdapter` + +and then open the following URL in your browser: + +`http://localhost:9999/integrationExamples/gpt/51DegreesRtdProvider_example.html` + +Open the browser console to see the logs. + +## Customer Notices + +When using the 51Degrees cloud service publishers need to reference the 51Degrees [client services privacy policy](https://51degrees.com/terms/client-services-privacy-policy) in their customer notices. From 042953d1cea92c45c064e7471ecb83aaef512edd Mon Sep 17 00:00:00 2001 From: bretg Date: Mon, 3 Jun 2024 10:07:00 -0400 Subject: [PATCH 33/46] pbs auction endpoint fixes (#5380) --- prebid-server/endpoints/openrtb2/pbs-endpoint-auction.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.md b/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.md index ecc266f5ee..17fe73c7f3 100644 --- a/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.md +++ b/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.md @@ -960,10 +960,10 @@ client can declare a given adunit as eligible for rewards by declaring `imp.ext. ##### Create Transaction ID -The request can contain the global `createtid` flag to control the `transmitTid` [Activity Control](/prebid-server/features/pbs-activitycontrols.html). +The request can contain the global `createtids` flag to control the `transmitTid` [Activity Control](/prebid-server/features/pbs-activitycontrols.html). ```text -ext.request.createtid: false +ext.request.createtids: false ``` If the value is `false`, the `transmitTid` activity is overridden to "denied", which means bid adapters will not get unique transaction IDs. If not specified, then the value of the transmitTid activity for the account is used. The overall default value it `true`, which translates to "allow" the generation of TIDs. @@ -1769,7 +1769,7 @@ The Prebid SDK version comes from: | ext.prebid.aliases | defines alternate names for bidders, see [bidder aliases](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#bidder-aliases). | object | no | | ext.prebid.aliasgvlids | defines the global vendor list IDs for aliases, see [bidder aliases](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#bidder-aliases). | object | no | | ext.prebid.bidadjustmentfactors | Adjust the CPM value of bidrequests, see [bid adjustments](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#bid-adjustments) | object | no | -| ext.prebid.bidderconfig | bidder-specific first party data, see [first party data](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#first-party-data-support). | object | no | +| ext.prebid.bidderconfig | bidder-specific first party data, see [first party data](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#first-party-data-support). | array of obj | no | | ext.prebid.bidderparams | Publishers can specify any adapter-specific cross-impression attributes, see [global bid parameters](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#global-bid-adapter-parameters) | object | no | | ext.prebid.cache | defines whether to put bid results in Prebid Cache, see [cache bids](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#cache-bids). | object | no | | ext.prebid.channel | Generally "pbjs", "amp", or "app". Passed through to events and analytics.
ex: `{name: "pbjs", version: "4.39"}` | object | yes | @@ -1789,7 +1789,6 @@ The Prebid SDK version comes from: | ext.prebid.nosale | turns off CCPA processing for the named bidder(s).
ex: `["bidderA"]`. A value of ["*"] is allowed. | array of strings | no | | ext.prebid.server | additional Prebid Server metadata | object | yes | | ext.prebid.floors | PBS floors data | object | no | -| ext.prebid.createtid | Ties to the transmitTid activity. If false, transmitTid is denied. | boolean | no | | ext.prebid.returnallbidstatus | If true, PBS returns [ext.seatnonbid](#seat-non-bid) with details about bidders that didn't bid. | boolean | no | | ext.prebid.analytics | Arguments that can be passed through to individual analytics adapters | object | no | | imp.ext.ae | If 1, signals bid adapters that Fledge auction config is accepted on the response. (ae stands for auction environment) | integer | yes | From 50c40cc32743fea4efcde506ccc9200d900489fc Mon Sep 17 00:00:00 2001 From: bretg Date: Mon, 3 Jun 2024 13:15:25 -0400 Subject: [PATCH 34/46] Update Gemfile for FFI version (#5384) --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 4d0186505c..752b337f20 100755 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ source 'https://rubygems.org' gem 'github-pages', '>= 228' - +gem 'ffi', '1.16.3' gem "webrick", "~> 1.7" From e7c55da2dd6b60d3f85dec7b153ec4e509f0e3a4 Mon Sep 17 00:00:00 2001 From: Jono Sligh <139150153+jsligh@users.noreply.github.com> Date: Mon, 3 Jun 2024 12:20:13 -0500 Subject: [PATCH 35/46] Fixed typo (c+p error) (#5385) --- prebid-mobile/modules/rendering/ios-sdk-integration-gam.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prebid-mobile/modules/rendering/ios-sdk-integration-gam.md b/prebid-mobile/modules/rendering/ios-sdk-integration-gam.md index 26cdd8eb3f..59bb7df5b8 100644 --- a/prebid-mobile/modules/rendering/ios-sdk-integration-gam.md +++ b/prebid-mobile/modules/rendering/ios-sdk-integration-gam.md @@ -34,7 +34,7 @@ If you do not have GMA SDK in the app yet, refer to the [Google Integration Docu Prebid SDK provides rendering integration into GAM setup thru [app events](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/banner#app_events) mechanism. To integrate Prebid Event Handlers into your app, add the following line to your Podfile: ```pod -pod 'PrebidMobileAdMobAdapters' +pod 'PrebidMobileGAMEventHandlers' ``` ## Event Handlers Initialization From a99f0671855884fc611ba5c45ab4582ed0706997 Mon Sep 17 00:00:00 2001 From: SmartHubSolutions <87376145+SmartHubSolutions@users.noreply.github.com> Date: Tue, 4 Jun 2024 17:12:58 +0300 Subject: [PATCH 36/46] add adapter Tredio (#5348) * add adapter Tredio * update due review * add aliasCode * end with a single newline character --------- Co-authored-by: Victor --- dev-docs/bidders/tredio.md | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 dev-docs/bidders/tredio.md diff --git a/dev-docs/bidders/tredio.md b/dev-docs/bidders/tredio.md new file mode 100644 index 0000000000..0b820465a0 --- /dev/null +++ b/dev-docs/bidders/tredio.md @@ -0,0 +1,39 @@ +--- +layout: bidder +title: Tredio +description: Tredio Bidder Adapter +biddercode: tredio +aliasCode : smarthub +usp_supported: true +coppa_supported: true +schain_supported: true +dchain_supported: true +media_types: banner, video, native +safeframes_ok: true +deals_supported: true +floors_supported: true +fpd_supported: false +pbjs: true +pbs: true +pbs_app_supported: true +multiformat_supported: true +--- + +### Prebid.js Bid Params + +{: .table .table-bordered .table-striped } +| Name | Scope | Description | Example | Type | +|---------------|----------|---------------------------------|-------------------------------------|-----------| +| `seat` | required | Seat value | `'9Q20EdGxzgWdfPYShScl'` | `string` | +| `token` | required | Token | `'eKmw6alpP3zWQhRCe3flOpz0wpuwRFjW'` | `string` | +| `iabCat` | optional | Array of IAB content categories that describe the content producer | `['IAB1-1', 'IAB3-1', 'IAB4-3']` | `Array(String)` | +| `minBidfloor` | optional | Minimal CPM value | `0.03` | `float` | +| `pos` | optional | The position of the placement on the page, see Open RTB spec v2.5. | `4` | `number` | + +### Prebid Server Bid Params + +{: .table .table-bordered .table-striped } +| Name | Scope | Description | Example | Type | +|---------------|----------|---------------------|--------------------------------------|----------| +| `seat` | required | Seat value | `'9Q20EdGxzgWdfPYShScl'` | `string` | +| `token` | required | Token | `'eKmw6alpP3zWQhRCe3flOpz0wpuwRFjW'` | `string` | From c7ace0cbf7fe13ce7073c75ab6678d1cb098e783 Mon Sep 17 00:00:00 2001 From: SmartHubSolutions <87376145+SmartHubSolutions@users.noreply.github.com> Date: Tue, 4 Jun 2024 17:14:41 +0300 Subject: [PATCH 37/46] add adapter JDPMedia (#5339) * add adapter JDPMedia * update docs due review * add aliasCode --------- Co-authored-by: Victor --- dev-docs/bidders/jdpmedia.md | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 dev-docs/bidders/jdpmedia.md diff --git a/dev-docs/bidders/jdpmedia.md b/dev-docs/bidders/jdpmedia.md new file mode 100644 index 0000000000..5b2367ed9a --- /dev/null +++ b/dev-docs/bidders/jdpmedia.md @@ -0,0 +1,39 @@ +--- +layout: bidder +title: JDPMedia +description: JDPMedia Bidder Adapter +biddercode: jdpmedia +aliasCode : smarthub +usp_supported: true +coppa_supported: true +schain_supported: true +dchain_supported: true +media_types: banner, video, native +safeframes_ok: true +deals_supported: true +floors_supported: true +fpd_supported: false +pbjs: true +pbs: true +pbs_app_supported: true +multiformat_supported: true +--- + +### Prebid.js Bid Params + +{: .table .table-bordered .table-striped } +| Name | Scope | Description | Example | Type | +|---------------|----------|---------------------------------|-------------------------------------|-----------| +| `seat` | required | Seat value | `'9Q20EdGxzgWdfPYShScl'` | `string` | +| `token` | required | Token | `'eKmw6alpP3zWQhRCe3flOpz0wpuwRFjW'` | `string` | +| `iabCat` | optional | Array of IAB content categories that describe the content producer | `['IAB1-1', 'IAB3-1', 'IAB4-3']` | `Array(String)` | +| `minBidfloor` | optional | Minimal CPM value | `0.03` | `float` | +| `pos` | optional | The position of the placement on the page, see Open RTB spec v2.5. | `4` | `number` | + +### Prebid Server Bid Params + +{: .table .table-bordered .table-striped } +| Name | Scope | Description | Example | Type | +|---------------|----------|---------------------|--------------------------------------|----------| +| `seat` | required | Seat value | `'9Q20EdGxzgWdfPYShScl'` | `string` | +| `token` | required | Token | `'eKmw6alpP3zWQhRCe3flOpz0wpuwRFjW'` | `string` | From 46b03bcf9541b6a709650f3bd016e16a507e3977 Mon Sep 17 00:00:00 2001 From: Patrick McCann Date: Tue, 4 Jun 2024 19:36:28 -0400 Subject: [PATCH 38/46] Update integrate-with-the-prebid-analytics-api.md (#5392) documents https://github.com/prebid/Prebid.js/pull/11682 --- dev-docs/integrate-with-the-prebid-analytics-api.md | 1 + 1 file changed, 1 insertion(+) diff --git a/dev-docs/integrate-with-the-prebid-analytics-api.md b/dev-docs/integrate-with-the-prebid-analytics-api.md index ba1a9dfb42..f7518828c3 100644 --- a/dev-docs/integrate-with-the-prebid-analytics-api.md +++ b/dev-docs/integrate-with-the-prebid-analytics-api.md @@ -150,6 +150,7 @@ There are two error events analytics modules may wish to listen for: auctionDebu * listen only to the events required * batch up calls to the backend for post-auction logging rather than calling immediately after each event. +* consider using the keepalive option on the ajax request to keep the priority low and the request queued after the pageview dies ### Step 3: Add unit tests From fe8201ee9fec88923d06a45667f4207be93f40d1 Mon Sep 17 00:00:00 2001 From: Jeff Mahoney Date: Thu, 6 Jun 2024 14:08:28 -0400 Subject: [PATCH 39/46] Update sharethrough.md (#5374) * Update sharethrough.md * Add some additional information to the bidder documentation. * Update sharethrough.md Lint fix * Update sharethrough.md Include language in code block. --- dev-docs/bidders/sharethrough.md | 73 ++++++++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 3 deletions(-) diff --git a/dev-docs/bidders/sharethrough.md b/dev-docs/bidders/sharethrough.md index f3673a5291..fa18d284fe 100644 --- a/dev-docs/bidders/sharethrough.md +++ b/dev-docs/bidders/sharethrough.md @@ -21,7 +21,7 @@ ortb_blocking_supported: partial sidebarType: 1 --- -### Note +### Before You Begin The Sharethrough bidder adapter requires additional setup and approval from the Sharethrough Integrations team. Please reach out to your account manager for more information to start using it. @@ -34,8 +34,47 @@ The Sharethrough bidder adapter requires additional setup and approval from the | `bcat` | optional | (deprecated) Array of blocked IAB Categories | `['IAB1-2', 'IAB1-3']` | `string[]` | | `badv` | optional | (deprecated) Array of blocked Advertisers by their domains | `['ford.com', 'pepsi.com']` | `string[]` | -Note: Providing `bcat` and `badv` via Bid Params is deprecated, the First Party Data method should be preferred (see below). -When both methods are provided, first party data values will be used and bid param values will be ignored. +**Note**: Providing `bcat` and `badv` via Bid Params is deprecated, the First Party Data method should be preferred (see below). +When both methods are provided (i.e. when `badv` and `bcat` are specified both as bid params and through the first party ortb2 method), first party data values will be used and bid param values will be ignored. + +#### Configuration + +Sample banner setup: + +```js + +``` #### First Party Data @@ -86,3 +125,31 @@ pbjs.setConfig({ } }); ``` + +### Additional Notes + +#### Request and Response Attributes + +- TTL is 360 for display and native, 3600 for video (in milliseconds). +- Safeframes are supported. +- Advertiser domains are available in bid responses at `meta.advertiserDomains` +- Bids are returned in **net** - that is, the bids returned reflect the bid amount with revenue sharing already taken into account. No adjustment is necessary. +- Sharethrough is GDPR and COPPA compliant. + +#### Supported Media Types + +- Banner +- Native +- Video (instream and outstream) + +#### Default Ad Server Key Value + +- `sharethrough` + +### Prebid Module Support + +For publishers using PBJS version 5 and above, current module support includes: + +- Price Floors +- Supply Chain Object +- User ID From f287fa09aada91cfcb89ef2ada4bc22703f03ff5 Mon Sep 17 00:00:00 2001 From: Carlos Felix Date: Thu, 6 Jun 2024 13:18:15 -0500 Subject: [PATCH 40/46] 33across - use video.plcmt instead of video.placement (#5375) --- dev-docs/bidders/33across.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev-docs/bidders/33across.md b/dev-docs/bidders/33across.md index 4076fae58b..c5dea1516c 100644 --- a/dev-docs/bidders/33across.md +++ b/dev-docs/bidders/33across.md @@ -68,7 +68,7 @@ var adUnits = [ context: 'outstream', // required mimes: ['video/mp4','video/x-flv'], // required protocols: [ 2, 3 ], // required, set at least 1 value in array - placement: 2, // optional, defaults to 2 when context = outstream + plcmt: 2, // optional, defaults to 2 when context = outstream api: [ 1, 2 ], // optional skip: 0, // optional minduration: 5, // optional @@ -104,7 +104,7 @@ var adUnits = [ context: 'instream', // required mimes: ['video/mp4','video/x-flv'], // required protocols: [ 2, 3 ], // required, set at least 1 value in array - placement: 1, // optional, defaults to 1 when context = instream + plcmt: 1, // optional, defaults to 1 when context = instream startdelay: 0, // optional, defaults to 0 when context = instream api: [ 1, 2 ], // optional skip: 0, // optional @@ -147,7 +147,7 @@ var adUnits = [ context: 'outstream', // required mimes: ['video/mp4','video/x-flv'], // required protocols: [ 2, 3 ], // required, set at least 1 value in array - placement: 2, // optional, defaults to 2 when context = outstream + plcmt: 2, // optional, defaults to 2 when context = outstream api: [ 1, 2 ], // optional skip: 0, // optional minduration: 5, // optional From b454d0dce5093673469735f5d9821d4a8b31d1a7 Mon Sep 17 00:00:00 2001 From: Baptiste Haudegand <89531368+github-baptiste-haudegand@users.noreply.github.com> Date: Thu, 6 Jun 2024 22:19:45 +0200 Subject: [PATCH 41/46] Update list of GPP sids for Teads adapter (#5394) --- dev-docs/bidders/teads.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-docs/bidders/teads.md b/dev-docs/bidders/teads.md index 3847370dc7..c3f623978a 100644 --- a/dev-docs/bidders/teads.md +++ b/dev-docs/bidders/teads.md @@ -20,7 +20,7 @@ multiformat_supported: will-not-bid ortb_blocking_supported: true floors_supported: true coppa_supported: true -gpp_sids: tcfeu, usp +gpp_sids: tcfeu, tcfca, usnat, usstate_all, usp fpd_supported: false sidebarType: 1 --- From c3fe0f5aeda6cc521a3980da022780600641d62b Mon Sep 17 00:00:00 2001 From: PrecisoSRL <134591565+PrecisoSRL@users.noreply.github.com> Date: Mon, 10 Jun 2024 11:53:40 +0530 Subject: [PATCH 42/46] Preciso: updates docs for new fields (#5191) * bidder Doc: Preciso bidder doc added * added multiformat_support * Changed pbjs as true * corrections on ORTB blocking * Updated preciso documentation * merge conflict fix * Updated preciso documentation * Updated preciso documentation * removed empty lines * features updated * bid params name corrected * SharedId Sample Comfiguration removed and Updated other requested changes * multiple empty lines removed --------- Co-authored-by: Nikhil Gopal Chennissery --- dev-docs/bidders/preciso.md | 104 +++++++++++++++++++++++------------- 1 file changed, 68 insertions(+), 36 deletions(-) diff --git a/dev-docs/bidders/preciso.md b/dev-docs/bidders/preciso.md index 52523c39c1..867d7b1c34 100644 --- a/dev-docs/bidders/preciso.md +++ b/dev-docs/bidders/preciso.md @@ -1,63 +1,95 @@ --- layout: bidder title: Preciso -description: Prebid Preciso Bidder Adapter +description: Prebid Preciso Bid Adapter +gdpr_supported: true gvl_id: 874 -media_types: display, video, native +media_types: display gdpr_supported: true usp_supported: true pbjs: true -pbs: true +pbs: false biddercode: preciso prebid_member: true floors_supported: true safeframes_ok: true schain_supported: true -userIds: id5Id, identityLink, pubProvidedId -pbs_app_supported: true +userIds: sharedId +deals_supported: false coppa_supported: true -multiformat_supported: will-bid-on-any -ortb_blocking_supported: partial +multiformat_supported: will-not-bid +ortb_blocking_supported: true sidebarType: 1 --- +### Modules -### Bid Params +SharedID: We need you to include the [SharedID module](/dev-docs/modules/userid-submodules/sharedid.html) in order to bid effectively on your inventory. + +### Registration + +The preciso Bidding adapter requires setup before beginning. Please contact us at [tech@preciso.net] + +#### OpenRTB Parameters +The following table contains currently supported parameters we parse. {: .table .table-bordered .table-striped } -| Name | Scope | Description | Example | Type | -|---------------|----------|---------------------|---------------|----------| -| `publisherId` | required | Unique publisher ID | `'ABCDEF'` | `string` | -| `region` | required | Assigned region | `'prebid-eu'` | `string` | -| `bidfloor` | optional | Minimal CPM value | `0.01` | `float` | -| `channel` | optional | Inventory channel identifier, limited to 50 characters | `Partner 1 - News` | `string` | +| Name | Scope | Description | Example | Type | +|--------------------|----------|---------------------------------------------------------------|-------------------|----------------| +| `bcat` | optional | List of blocked advertiser categories (IAB) | `['IAB1-1']` | `string array` | +| `badv` | optional | Blocked Advertiser Domains | `['example.com']` | `string array` | +| `wlang` | optional | Allow List of languages for creatives using ISO-639-1-alpha-2 | `['fr', 'en']` | `string array` | -### ORTB Blocking -Preciso supports blocking advertisers in `badv` and categories in `bcat` parameters. -The blocked advertisers/categories list has no length limitation, but response timeout is more likely to occur as the number of entries grow. -Blocked advertisers list (`badv`) is an array of domains as strings. -Blocked categories list (`bcat`) is an array of IAB categories as strings. +Example configuration: -For example: -#### Globally defined ORTB Blocking: ```javascript + pbjs.setConfig({ - ortb2: { - badv: ["domain1.com", "domain2.com"], - bcat: ["IAB23-1", "IAB23-5", "IAB25-3", "IAB25-2"] - } -)}; -``` -#### ORTB Blocking specific only to preciso bidder: -```javascript -pbjs.setBidderConfig({ - bidders: ['preciso'], - config:{ ortb2: { - badv: ["domain1.com", "domain2.com"], - bcat: ["IAB23-1", "IAB23-5", "IAB25-3", "IAB25-2"] + bcat: ['IAB1-1'], + badv: ['example.com'], + wlang: ['fr', 'en'] } - } }); -``` \ No newline at end of file +``` + +### Bid Params + +{: .table .table-bordered .table-striped } +| Name | Scope | Description | Example | Type | +|---------------|----------|---------------------|---------------|----------| +| `publisherId` | required | Numeric Publisher ID
(as provided by Preciso) | `'123AB123'` | `string` | +| `region` | optional,recommended | 3 letter country code | `'IND'` | `string` | +| `bidFloor` | optional,recommended | Minimum bid for this impression expressed in CPM (USD) | `0.01` | `float` | +| `pageType` | optional, recommended | Kind of content present in the page | `'homepage'` | `String` | +| `bcat` | optional | List of blocked advertiser categories (IAB) | `['IAB1-1']` | `string array` | +| `badv` | optional | Blocked Advertiser Domains| `'example.com'` | `string array`| + +Notes: + +- Preferred to provide the `bcat` and `badv` within the first party data (above). When both methods are provided, first party data values will be prioritized. + +### Example Ad Unit + +``````javascript + var adUnits = [{ + code: 'your-unit-container-id', + mediaTypes: { + banner: { + sizes: [[300, 250], [300,600]] + } + }, + bids: [{ + bidder: 'preciso', + params: { + publisherId: 'your-publisher-id', + region: 'IND', + pageType: 'news',// Optional + bidFloor: 0.25, // Optional - default is 0.0 + bcat: ['IAB1-1'], // Optional - default is [] + badv: ['example.com'] // Optional - default is [] + } + }] +}]; +`````` From ef3aec5cd6061ec81fb9e5723c0398e5766bba08 Mon Sep 17 00:00:00 2001 From: Eugene Dorfman Date: Mon, 10 Jun 2024 13:28:31 +0200 Subject: [PATCH 43/46] 51d: add table styles (#5405) --- dev-docs/modules/51DegreesRtdProvider.md | 1 + 1 file changed, 1 insertion(+) diff --git a/dev-docs/modules/51DegreesRtdProvider.md b/dev-docs/modules/51DegreesRtdProvider.md index 9d99c83ed2..dda5620d34 100644 --- a/dev-docs/modules/51DegreesRtdProvider.md +++ b/dev-docs/modules/51DegreesRtdProvider.md @@ -133,6 +133,7 @@ pbjs.setConfig({ > Note that `resourceKey` and `onPremiseJSUrl` are mutually exclusive parameters. Use strictly one of them: either a `resourceKey` for cloud integration and `onPremiseJSUrl` for the on-premise self-hosted integration. +{: .table .table-bordered .table-striped } | Name | Type | Description | Default | |:----------------------|:--------|:-------------------------------------------------------------------------------------------------|:-------------------| | name | String | Real time data module name | Always '51Degrees' | From ba31609869a2c183b5223387fd5e739d12396703 Mon Sep 17 00:00:00 2001 From: Keith Petri <74626343+KEPlockr@users.noreply.github.com> Date: Mon, 10 Jun 2024 09:02:34 -0400 Subject: [PATCH 44/46] lockr AIM (#5278) * added the lockr AIM documentation * added the fix for the tables * fixing linter errors * added the changes related to the build and the description updates * wordsmithing * lint --------- Co-authored-by: Avin Co-authored-by: bretg --- .../modules/userid-submodules/lockraim.md | 119 ++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 dev-docs/modules/userid-submodules/lockraim.md diff --git a/dev-docs/modules/userid-submodules/lockraim.md b/dev-docs/modules/userid-submodules/lockraim.md new file mode 100644 index 0000000000..6a1d8c7373 --- /dev/null +++ b/dev-docs/modules/userid-submodules/lockraim.md @@ -0,0 +1,119 @@ +--- +layout: userid +title: lockr AIM +description: lockr Alternative Identity Manager sub-module +useridmodule: lockrAIMIdSystem +--- + +Alternative Identity Manager (AIM) is a unified container for identity and data management. +AIM includes a self-service platform for publishers to seamlessly integrate and activate alternative IDs like LiveRamp’s Authenticated Traffic Solution (ATS), Unified ID 2.0 (UID2), and ID5. The self-service component allows the publisher to easily enable or disable IDs and to send identity clusters to CDPs or cleanrooms without engaging engineering teams. For more information about AIM and detailed integration docs, please visit [our documentation](https://sso.loc.kr/api/lockr_reference.html#tag/Alternate-Identity-Management-(AIM)). + +### **Account Creation | AIM** + +1. Sign up for an [Identity lockr account.](https://sso.loc.kr/console/signup) +2. Setup your app and activate the AIM library. +3. Compile Prebid with the appropriate configurations, and deploy. + +### **Configuration | AIM** + +Add the lockr’s AIM submodule to your Prebid.js package by running: + +```sh +gulp build –modules=lockrAIMIdSystem,... +``` + +The following configuration parameters are available: +{: .table .table-bordered .table-striped } +| Param | Scope | Type | Description | Example | +|----------------|----------|--------|----------------------------------------|-----------------------| +| name | Required | String | The name of this module: `"lockrAIMId"`| `"lockrAIMId"` | +| params | Required | Object | Details for the configuration. | | +| params.email | Required | String | Email address for identity tokens. | `test@example.com` | +| params.appID | Required | String | Identity lockr appID | `e84afc5f-4adf-4144-949f-1de5bd151fcc` | + +**Google oAuth:** +If you are using Google oAuth (_as an example_), the onSignIn function will subsequently call window.lockr.setAdditionalData function and include a raw email. + +```javascript +function onSignIn(googleUser) { + pbjs.setConfig({ + userSync: { + userIds: [{ + name: 'lockrAIMId', + params: { + email: 'john@example.com', + appID: 'e84afc5f-4adf-4144-949f-1de5bd151fcc' + } + }] + } + }); +} +``` + +**Facebook oAuth:** +If you are using Facebook Login (_as an example_), the statusChangeCallback function will subsequently call window.lockr.setAdditionalData function and include a raw email. + +```javascript +function statusChangeCallback(response) { + console.log('statusChangeCallback'); + console.log(response); + if(response.status === 'connected'){ + pbjs.setConfig({ + userSync: { + userIds: [{ + name: 'lockrAIMId', + params: { + email: 'john@example.com', + appID: 'e84afc5f-4adf-4144-949f-1de5bd151fcc' + } + }] + } + }); + }else{ + document.getElementById('status').innerHTML = 'Please login'; + } +} +``` + +**Note:** The above code can be triggered from anywhere on the domain (i.e. a subscription form). + +**lockr AIM Example** + +```javascript +pbjs.setConfig({ + userSync: { + userIds: [{ + name: 'lockrAIMId', + params: { + email: 'test@example.com', + appID: 'e84afc5f-4adf-4144-949f-1de5bd151fcc' + } + }] + } +}); +``` + +_Note_: lockr’s AIM self-service interface empowers publishers with the ability to pass the alternative IDs activated back to the client as local storage or as a first party cookie. Each Identity Provider can be individually set to restrict from client-side delivery and instead be retained as an authentication event within Identity lockr. In this case no data is lost, but instead maintained for automated or manual sharing to any Data Endpoint. + +**Troubleshooting and Error handling:** + +1. Navigate to the domain where Prebid.js Library is integrated. +2. Go to the 'Network' tab of your Developer Tools. Search for “prebid.js” +3. In the application tab, you can confirm any activated Identity Provider (if client-side storage is turned on in AIM’s Identity Provider settings). +4. Debugging: + Enable the debug flag to true in the setConfig call: + +```javascript +pbjs.setConfig({ + debug: true, + userSync: { + userIds: [{ + name: 'lockrAIMId', + params: { + email: 'test@example.com', + appID: 'e84afc5f-4adf-4144-949f-1de5bd151fcc' + } + }] + } +}); +``` From e03e7478abe3f285d73aa6add0d13737ffa6743d Mon Sep 17 00:00:00 2001 From: qt-io <104574052+qt-io@users.noreply.github.com> Date: Wed, 12 Jun 2024 18:47:39 +0300 Subject: [PATCH 45/46] New Adapter: QT (#5331) * New Adapter: QT * pbs marked as false --- dev-docs/bidders/qt.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 dev-docs/bidders/qt.md diff --git a/dev-docs/bidders/qt.md b/dev-docs/bidders/qt.md new file mode 100644 index 0000000000..c0838c774f --- /dev/null +++ b/dev-docs/bidders/qt.md @@ -0,0 +1,35 @@ +--- +layout: bidder +title: QT +description: Prebid QT Bidder Adapter +biddercode: qt +gpp_sids: usstate_all +tcfeu_supported: false +usp_supported: true +coppa_supported: true +schain_supported: true +deals_supported: false +floors_supported: true +fpd_supported: false +ortb_blocking_supported: false +media_types: banner, video, native +multiformat_supported: will-bid-on-one +userIds: all +pbjs: true +pbs: false +pbs_app_supported: true +safeframes_ok: true +sidebarType: 1 +--- + +### Bid Params + +{: .table .table-bordered .table-striped } +| Name | Scope | Description | Example | Type | +|---------------|----------|--------------|---------------------------------|------------| +| `placementId` | optional | Placement Id | `'0'` | `'string'` | +| `endpointId` | optional | Endpoint Id | `'0'` | `'string'` | + +### Note + +For the prebid server and prebid.js you only need to use one parameter: either placementId or endpointId From a11c1be8f9cd96a45e002eeb43c85c76f1f83ddf Mon Sep 17 00:00:00 2001 From: bretg Date: Thu, 13 Jun 2024 04:43:02 -0400 Subject: [PATCH 46/46] PBS request example (#5381) * pbs auction example * cont * lint * trying to work around build failure * Update prebid-server/endpoints/openrtb2/auction-request-example.md --------- Co-authored-by: Muki Seiler --- faq/prebid-server-faq.md | 4 + prebid-server/developers/add-new-bidder-go.md | 2 + .../developers/add-new-bidder-java.md | 2 + .../openrtb2/auction-request-example.md | 245 ++++++++++++++++++ .../openrtb2/pbs-endpoint-auction.md | 1 + 5 files changed, 254 insertions(+) create mode 100644 prebid-server/endpoints/openrtb2/auction-request-example.md diff --git a/faq/prebid-server-faq.md b/faq/prebid-server-faq.md index 26d7946c36..5f6ad81c19 100644 --- a/faq/prebid-server-faq.md +++ b/faq/prebid-server-faq.md @@ -248,6 +248,10 @@ In the long run, if you'd prefer to change the filenames too, that's ok - but ou 1. Submit a PR that changes the filenames and makes the old name a hard-coded alias. 2. Keep both bidder documentation files. +## May I build a server that calls Prebid Server? + +Sure. The main endpoint you're going to utilize is the [auction endpoint](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html). Basically, it's just OpenRTB 2.6, but with quite a few Prebid-specific extensions. See the [auction request example](/prebid-server/endpoints/openrtb2/auction-request-example.html). + ## Should Prebid bidders be in ads.txt? Publishers should be careful to list all their bidding partners in their ads.txt file. Bidders without an entry in ads.txt may be diff --git a/prebid-server/developers/add-new-bidder-go.md b/prebid-server/developers/add-new-bidder-go.md index e2bcf0c114..a7b395f972 100644 --- a/prebid-server/developers/add-new-bidder-go.md +++ b/prebid-server/developers/add-new-bidder-go.md @@ -29,6 +29,8 @@ Bid adapters are responsible for translating a 'Prebid-flavored' OpenRTB Bid Req OpenRTB Bid Requests contain one or more impression objects, each representing a single ad placement. An impression may define multiple sizes and/or multiple ad formats. If your bidding server limits requests to a single ad placement, size, or format, then your adapter will need to split the impression into multiple calls and merge the responses. +See the [example auction request](/prebid-server/endpoints/openrtb2/auction-request-example.html) to get an idea for what your adapter will receive. + ## Plan Your Bid Adapter The job of your bid adapter is to adapt. You'll need to think about currency, floors, mediatypes, and other details as noted below. diff --git a/prebid-server/developers/add-new-bidder-java.md b/prebid-server/developers/add-new-bidder-java.md index a0c4da4e79..0c9d06e2a5 100644 --- a/prebid-server/developers/add-new-bidder-java.md +++ b/prebid-server/developers/add-new-bidder-java.md @@ -29,6 +29,8 @@ Bid adapters are responsible for translating a 'Prebid-flavored' OpenRTB Bid Req OpenRTB Bid Requests contain one or more impression objects, each representing a single ad placement. An impression may define multiple sizes and/or multiple ad formats. If your bidding server limits requests to a single ad placement, size, or format, then your adapter will need to split the impression into multiple calls and merge the responses. +See the [example auction request](/prebid-server/endpoints/openrtb2/auction-request-example.html) to get an idea for what your adapter will receive. + ## Plan Your Bid Adapter ### Choose A Name diff --git a/prebid-server/endpoints/openrtb2/auction-request-example.md b/prebid-server/endpoints/openrtb2/auction-request-example.md new file mode 100644 index 0000000000..261cd9b25f --- /dev/null +++ b/prebid-server/endpoints/openrtb2/auction-request-example.md @@ -0,0 +1,245 @@ +--- +layout: page_v2 +sidebarType: 5 +title: Prebid Server | Endpoints | OpenRTB2 | Auction Example +--- + +# Prebid Server | Endpoints | /openrtb2/auction -- Example + +This is an example of a Prebid Server-flavored OpenRTB auction request with most fields present. +It serves 2 purposes: + +- Give context about what custom server-to-server integrations could implement. i.e. if you're building a server that will sit in front of Prebid Server, these are many of the fields that can be provided. +- Provide an example for bid adapter developers to understand what their code will see for each auction. Prebid Server does modify the auction request before giving it to a bid adapter because individual bidders are not allowed to see details from other adapters. The example is annotated with differences between the incoming auction request and what adapters see. + +## POST /openrtb2/auction + +```json5 +{ + "id": "123456789", + "source": { + "tid": "a64e6b91-7bfd-4f0b-9861-99307e41f971" + }, + "tmax": 1000, + "imp": [ + { + "ext": { + "ae": 1, + "gpid": "/1111/adslot#2", + "data": { + "adserver": { + "name": "gam", + "adslot": "/1111/adslot" + } + }, + "tid": "4f8f2e78-94b0-431b-b735-6da38a6f3ef0", + "prebid": { // bid adapters don't see this object + "bidder": { + "bidderAlias": { // bid adapters don't see this object + "placement": 1001 // The contents of this object are seen by adapters at imp[].ext.bidder + } + }, + "passthrough": { // bid adapters don't see this object + "attr": "val" + } + } + }, + "id": "test-div", + "banner": { + "format": [ + { + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 + }, + { + "w": 728, + "h": 90 + } + ] + }, + "bidfloor": 0.98, + "bidfloorcur": "USD" + } + ], + "test": 1, + "ext": { + "prebid": { + "trace": "verbose", + "returnallbidstatus": true, // bid adapters don't see this object + "auctiontimestamp": 1664308667064, + "cache": { // bid adapters don't see this object + "vastXml": {} + }, + "targeting": { // bid adapters don't see this object + "includewinners": true, + "includebidderkeys": false + }, + "floors": { // bid adapters don't see this object + "enabled": false + }, + "channel": { + "name": "pbjs", + "version": "v7.17.0" + }, + "createtid": false, // bid adapters don't see this object + "integration": "mbjs", + "currency": { + "rates": { + "USD": { "UAH": 24.47, "ETB": 32.04 } + }, + "usepbsrates": true + }, + "debug": true, + "aliases": { // bid adapters don't see this object + "bidderAlias": "bidderA" + }, + "aliasgvlids": { // bid adapters don't see this object + "bidderAlias": 999999 + }, + "bidadjustmentfactors": { // bid adapters don't see this object + "bidderA": 0.9 + }, + "bidderparams": { // bid adapters don't see this object + "bidderA": { + "globalparam": "value" // bid adapter will see this added to the imp.ext.bidder object + } + }, + "schains": [{ + "bidders": ["bidderA"], + "schain": { SCHAIN OBJECT 1} // bid adapters will see their schain on source.[ext.]schain. + }], + "server": { + "externalurl": "https://prebid-server.example.com", + "gvlid": 9999999, + "datacenter": "us-east-1" + }, + "data": { + "eidpermissions": [ // bid adapters don't see this object + {"source": "sharedid.org", "bidders": ["*"]}, // * is the default + ] + }, + "biddercontrols": { // bid adapters don't see this object + "bidderB": { "prefmtype": "video" } + }, + "bidderconfig": [ // bid adapters don't see this object + { + "bidders": [ + "bidderAlias" + ], + "config": { + "ortb2": { + "site": { + "ext": { + "data": { + "customsite": "customsite1" + } + } + }, + "user": { + "ext": { + "data": { + "customuser": "customuser1" + } + } + } + } + } + } + ] + } + }, + "cur": [ + "CAD" + ], + "site": { + "publisher": { + "id": "1001", + "domain": "example.com" + }, + "page": "http://lh.example.com/prebid_server_kitchen_sink.html?pbjs_debug=true", + "domain": "site-domain", + "keywords": "skw1,skw2", + "name": "site-name", + "cat": [ + "site-cat" + ], + "sectioncat": [ + "site-scat" + ], + "pagecat": [ + "site-pcat" + ], + "ref": "site-ref", + "search": "site-search", + "content": { + "userrating": "4", + "data": [ + { + "name": "www.dataprovider1.com", + "ext": { + "segtax": 6 + }, + "segment": [ + { + "id": "123" + }, + { + "id": "456" + } + ] + } + ] + }, + "ext": { + "data": { + "siteextdata": "site-ext-data", + "siteextdata2": "site-ext-data2" + } + } + }, + "device": { + "w": 1434, + "h": 686 + }, + "regs": { + "gdpr": 1, + "coppa": 0, + "gpp": "DBABBg~BVpAAEBY.QA", + "gpp_sid": [7] + }, + "user": { + "ext": { + "consent": "CO_d4kAPPVBUAADABCENB0CoAP_AAE7AAAAAF5wAwAQAA0AXmBecAMAEAANAF5gAAA.YAAAAAAAA4AA", + "data": { + "userextdata": "user-ext-data", + "userextdata2": "user-ext-data2" + } + }, + "keywords": "ukw1,ukw2", + "data": [ + { + "name": "www.dataprovider1.com", + "ext": { + "segtax": 4 + }, + "segment": [ + { + "id": "123" + }, + { + "id": "456" + } + ] + } + ] + } +} +``` + +### Further Reading + +- [PBS auction endpoint](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html) diff --git a/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.md b/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.md index 17fe73c7f3..3aeb1d1e3e 100644 --- a/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.md +++ b/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.md @@ -1824,6 +1824,7 @@ The Prebid SDK version comes from: ### Further Reading +- [Example auction request](/prebid-server/endpoints/openrtb2/auction-request-example.html) - [OpenRTB 2.4 Specification](https://iabtechlab.com/wp-content/uploads/2016/04/OpenRTB-API-Specification-Version-2-4-FINAL.pdf) - [OpenRTB 2.5 Specification](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) - [OpenRTB 2.6 Specification](https://github.com/InteractiveAdvertisingBureau/openrtb2.x/blob/main/2.6.md)