From ee5eff21427fbf82c766ed9e00e3326a15f1811b Mon Sep 17 00:00:00 2001 From: Jono Sligh Date: Mon, 11 Mar 2024 13:31:33 -0500 Subject: [PATCH 01/11] Added Android and iOS Documentation. --- .../android-sdk-integration-gam-original-api.md | 12 ++++++++++++ .../ios/ios-sdk-integration-gam-original-api.md | 12 ++++++++++++ 2 files changed, 24 insertions(+) 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 22dd690100..2de2dc4ee0 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 @@ -1561,6 +1561,18 @@ Using the following method, you can set the impression-level [GPID](https://docs adUnit?.gpid = "/36117602/hnp-sfgate.com/Homepage/AP300" ``` +### ORTBConfig + +(requires SDK v2.2.1) + +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. + +There are certain protected fields such as regs, device, geo, ext.gdpr, ext.us_privacy, and ext.consent which cannot be changed. + +``` kotlin +adUnit?.ortbConfig = "{"ext":{"prebid":{"debug":1,"trace":"verbose"}}}" +``` + ### UserKeyword #### setUserKeyword 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 018719835b..2f39c8f5eb 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 @@ -1396,6 +1396,18 @@ Using the following method, you can set the impression-level [GPID](https://docs adUnit.setGPID("/36117602/hnp-sfgate.com/Homepage/AP300") ``` +### ORTBConfig + +(requires SDK v2.2.1) + +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. + +There are certain protected fields such as regs, device, geo, ext.gdpr, ext.us_privacy, and ext.consent which cannot be changed. + +``` swift +adUnit.setOrtbConfig("{"ext":{"prebid":{"debug":1,"trace":"verbose"}}}") +``` + ### User Data Using the following methods you can add `user.data` objects to the bid requests. From 9a188f39422c248c0569a9eec8e56e40b9f02162 Mon Sep 17 00:00:00 2001 From: Jono Sligh Date: Mon, 1 Apr 2024 08:37:29 -0500 Subject: [PATCH 02/11] Put in some different places. --- .../android-sdk-integration-gam-original-api.md | 12 ------------ .../android/pbm-targeting-params-android.md | 16 ++++++++++++++++ .../ios/ios-sdk-integration-gam-original-api.md | 12 ------------ prebid-mobile/pbm-api/ios/pbm-targeting-ios.md | 16 ++++++++++++++++ 4 files changed, 32 insertions(+), 24 deletions(-) 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 2de2dc4ee0..22dd690100 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 @@ -1561,18 +1561,6 @@ Using the following method, you can set the impression-level [GPID](https://docs adUnit?.gpid = "/36117602/hnp-sfgate.com/Homepage/AP300" ``` -### ORTBConfig - -(requires SDK v2.2.1) - -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. - -There are certain protected fields such as regs, device, geo, ext.gdpr, ext.us_privacy, and ext.consent which cannot be changed. - -``` kotlin -adUnit?.ortbConfig = "{"ext":{"prebid":{"debug":1,"trace":"verbose"}}}" -``` - ### UserKeyword #### setUserKeyword 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 efafccacbf..457d592d39 100755 --- a/prebid-mobile/pbm-api/android/pbm-targeting-params-android.md +++ b/prebid-mobile/pbm-api/android/pbm-targeting-params-android.md @@ -113,6 +113,22 @@ TargetingParams.addUserKeyword("socialNetworking"); TargetingParams.setUserAge(18); ``` +### ORTBConfig + +(requires SDK v2.2.1) + +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 setORTBConfig() method, 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 +adUnitConfiguration?.ortbConfig = "{"ext":{"prebid":{"debug":1,"trace":"verbose"}}}" +``` + +``` kotlin +adUnit?.ortbConfig = "{"ext":{"prebid":{"debug":1,"trace":"verbose"}}}" +``` + ### Global User Targeting 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 2f39c8f5eb..018719835b 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 @@ -1396,18 +1396,6 @@ Using the following method, you can set the impression-level [GPID](https://docs adUnit.setGPID("/36117602/hnp-sfgate.com/Homepage/AP300") ``` -### ORTBConfig - -(requires SDK v2.2.1) - -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. - -There are certain protected fields such as regs, device, geo, ext.gdpr, ext.us_privacy, and ext.consent which cannot be changed. - -``` swift -adUnit.setOrtbConfig("{"ext":{"prebid":{"debug":1,"trace":"verbose"}}}") -``` - ### User Data Using the following methods you can add `user.data` objects to the bid requests. diff --git a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md index 6beef6a9f6..26a5d951a5 100644 --- a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md +++ b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md @@ -266,6 +266,22 @@ Store location in the user's section public func setLatitude(_ latitude: Double, longitude: Double) ``` +### ORTBConfig + +(requires SDK v2.2.1) + +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. + +There are certain protected fields such as regs, device, geo, ext.gdpr, ext.us_privacy, and ext.consent which cannot be changed. + +``` swift +adUnitConfig.setOrtbConfig("{"ext":{"prebid":{"debug":1,"trace":"verbose"}}}") +``` + +``` swift +adUnit.setOrtbConfig("{"ext":{"prebid":{"debug":1,"trace":"verbose"}}}") +``` + ## User Identity API Prebid SDK supports two interfaces to pass / maintain User IDs and ID vendor details: From a037a79be01665428b5e3b0d692ddbecdf9e11a5 Mon Sep 17 00:00:00 2001 From: Jono Sligh Date: Mon, 1 Apr 2024 13:09:01 -0500 Subject: [PATCH 03/11] fixing lint errors / adding a couple things --- .../android/pbm-targeting-params-android.md | 22 +++++++++---------- .../pbm-api/ios/pbm-targeting-ios.md | 6 +++-- 2 files changed, 14 insertions(+), 14 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 457d592d39..7ba98bab4b 100755 --- a/prebid-mobile/pbm-api/android/pbm-targeting-params-android.md +++ b/prebid-mobile/pbm-api/android/pbm-targeting-params-android.md @@ -31,17 +31,15 @@ If you need to use an API way, ensure that all the following properties are set If you need to use a CMP way, ensure that you don't set any of the following API properties. - {% endcapture %} {% include /alerts/alert_warning.html content=warning_note %} - ### Subject To GPDR {:.no_toc} Enable (true) or disable (false) the ability to provide consent. -``` +```kotlin TargetingParams.isSubjectToGDPR() TargetingParams.setSubjectToGDPR(true) ``` @@ -49,7 +47,7 @@ TargetingParams.setSubjectToGDPR(true) ### GDPR Consent String {:.no_toc} -``` +```java val consent = TargetingParams.getGDPRConsentString(); TargetingParams.setGDPRConsentString(string); ``` @@ -57,7 +55,7 @@ TargetingParams.setGDPRConsentString(string); ### Purpose Consent {:.no_toc} -``` +```kotlin val consent = TargetingParams.getPurposeConsents() TargetingParams.setPurposeConsents(string) ``` @@ -68,11 +66,10 @@ Prebid supports passing of the Child Online Privacy Prection (COPPA) signal to P Example: -``` +```java TargetingParams.setSubjectToCOPPA(true); ``` - ## Parameters The tables below list the methods and properties that the Prebid Rendering API uses for customization. @@ -103,30 +100,31 @@ You can use `Targeting` to pass ad call request parameters. | 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|| - Example: ``` 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); +TargetingParams.setUserAge(18); ``` ### ORTBConfig (requires SDK v2.2.1) -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 setORTBConfig() method, please extensively test your requests sent to Prebid Server. +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. 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 -adUnit?.ortbConfig = "{"ext":{"prebid":{"debug":1,"trace":"verbose"}}}" +//ad unit / impression-level +adUnit?.ortbConfig = "{"ext":{"gpid":"abc123"}}" ``` ### Global User Targeting @@ -137,7 +135,7 @@ adUnit?.ortbConfig = "{"ext":{"prebid":{"debug":1,"trace":"verbose"}}}" 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. -``` +```k otlin void addUserKeyword(String keyword) void addUserKeywords(Set keywords) void removeUserKeyword(String keyword) diff --git a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md index 26a5d951a5..7bb210158a 100644 --- a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md +++ b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md @@ -270,16 +270,18 @@ public func setLatitude(_ latitude: Double, longitude: Double) (requires SDK v2.2.1) -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. +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. 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 -adUnit.setOrtbConfig("{"ext":{"prebid":{"debug":1,"trace":"verbose"}}}") +//ad unit / impression-level +adUnit.setOrtbConfig("{"ext":{"gpid":"abc123"}}") ``` ## User Identity API From 64e9a169d1d211981024132e520b79cdcc527e42 Mon Sep 17 00:00:00 2001 From: Jono Sligh Date: Mon, 1 Apr 2024 13:13:36 -0500 Subject: [PATCH 04/11] More lint fixes --- .../android/pbm-targeting-params-android.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 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 7ba98bab4b..effd10e3a0 100755 --- a/prebid-mobile/pbm-api/android/pbm-targeting-params-android.md +++ b/prebid-mobile/pbm-api/android/pbm-targeting-params-android.md @@ -96,7 +96,7 @@ You can use `Targeting` to pass ad call request parameters. | 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 | +| 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|| @@ -129,13 +129,12 @@ adUnit?.ortbConfig = "{"ext":{"gpid":"abc123"}}" ### Global User Targeting - #### User Keywords {:.no_toc} 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. -```k otlin +```kotlin void addUserKeyword(String keyword) void addUserKeywords(Set keywords) void removeUserKeyword(String keyword) @@ -156,8 +155,7 @@ TargetingParams.addUserKeyword("globalUserKeywordValue2") 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. - -``` +```kotlin void addContextKeyword(String keyword) void addContextKeywords(Set keywords) void removeContextKeyword(String keyword) @@ -166,24 +164,23 @@ void clearContextKeywords() Example: -``` +```kotlin TargetingParams.addContextKeyword("globalContextKeywordValue1") TargetingParams.addContextKeyword("globalContextKeywordValue2") ``` - ### Bundle ID {:.no_toc} Use the following code to retrieve the platform-specific bundle/package name: -``` +```kotlin bundleName = TargetingParams.getBundleName() ``` Pass in the platform-specific identifier - the bundle/package name - to set the bundle ID: -``` +```kotlin TargetingParams.setBundleName(bundleName) ``` @@ -205,6 +202,7 @@ val domain = TargetingParams.getDomain() 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. There three components to signaling support for OMSDK: + * Partner Name * Partner Version * API code From b2e84dfe4aed09a4a47f04b38edd8fa12e4bc037 Mon Sep 17 00:00:00 2001 From: Jono Sligh Date: Mon, 1 Apr 2024 13:34:56 -0500 Subject: [PATCH 05/11] fixing more lint --- .../android/pbm-targeting-params-android.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 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 effd10e3a0..77847422aa 100755 --- a/prebid-mobile/pbm-api/android/pbm-targeting-params-android.md +++ b/prebid-mobile/pbm-api/android/pbm-targeting-params-android.md @@ -78,7 +78,6 @@ The more data about the user, app, and device that can be provided the more chan It is advised that you strictly follow the recommendations in the tables below. Any field marked with an ❗is required and recommended. 1. [Targeting Params](#targeting) -2. [SDK Settings](#prebidrenderingsettings) ### Targeting @@ -207,24 +206,25 @@ There three components to signaling support for OMSDK: * Partner Version * API code -#### Partner Name +### 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. -``` +```kotlin TargetingParams.setOmidPartnerName("Google") ``` -#### Partner Version +### Partner Version {:.no_toc} The OMSDK version number the partner integrated with. See below for configuration and examples. Partner's OMSDK version number implementation -``` + +```java TargetingParams.setOmidPartnerVersion(); ``` @@ -233,19 +233,19 @@ TargetingParams.setOmidPartnerVersion(); 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. Data is broken up into two different data types: + * User * Global in scope only * Inventory (context) * Global scope * Ad Unit grain - ### First Party User Data {:.no_toc} User specic data is passed in the global scope (i.e. applicable to all ad units). -``` +```java void addUserData(String key, String value) void updateUserData(String key, Set value) void removeUserData(String key) @@ -253,7 +253,8 @@ void clearUserData() ``` Example: -``` + +```java TargetingParams.addUserData("globalUserDataKey1", "globalUserDataValue1") ``` From 75f5698458313b2c7f5abf53b1434ddea6118c78 Mon Sep 17 00:00:00 2001 From: Jono Sligh Date: Mon, 1 Apr 2024 13:55:35 -0500 Subject: [PATCH 06/11] lint --- .../android/pbm-targeting-params-android.md | 14 ++++++++------ prebid-mobile/pbm-api/ios/pbm-targeting-ios.md | 1 - 2 files changed, 8 insertions(+), 7 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 77847422aa..bdfd1a6ebd 100755 --- a/prebid-mobile/pbm-api/android/pbm-targeting-params-android.md +++ b/prebid-mobile/pbm-api/android/pbm-targeting-params-android.md @@ -266,7 +266,7 @@ Inventory specific free form data decribing the context of the inventory. #### Global Context Data {:.no_toc} -``` +```kotlin void addContextData(String key, String value) void updateContextData(String key, Set value) void removeContextData(String key) @@ -275,7 +275,7 @@ void clearContextData() Example: -``` +```kotlin TargetingParams.addContextData("globalContextDataKey1", "globalContextDataValue1, globalContextDataValue2") ``` @@ -291,20 +291,22 @@ The First Party Data Access Control List provides a method to restrict access to 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. -``` +```java void addBidderToAccessControlList(String bidderName) void removeBidderFromAccessControlList(String bidderName) void clearAccessControlList() ``` Example: -``` + +```java TargetingParams.addBidderToAccessControlList(TargetingParams.BIDDER_NAME_RUBICON_PROJECT); ``` ## User Identity Prebid SDK supports two interfaces to pass / maintain User IDs and ID vendor details: + * Real-time in Prebid SDK's API field setExternalUserIds * Store User Id(s) in local storage @@ -323,7 +325,7 @@ public static List getExternalUserIds() Exmaple (JAVA): -``` +```java // User Id from External Third Party Sources ArrayList externalUserIdArray = new ArrayList<>(); externalUserIdArray.add(new ExternalUserId("adserver.org", "111111111111", null, new HashMap() { @@ -352,7 +354,7 @@ Prebid SDK provides a local storage interface to set, retrieve or update an arra Prebid SDK Provides five functions to handle User ID details: -``` +```java public static void storeExternalUserId(ExternalUserId externalUserId) public static ExternalUserId fetchStoredExternalUserId(@NonNull String source) public static List fetchStoredExternalUserIds() diff --git a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md index 7bb210158a..a67817c297 100644 --- a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md +++ b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md @@ -35,7 +35,6 @@ If you need to use an API way, ensure that all the following properties are set If you need to use a CMP way, ensure that you don't set any of the following API properties. - {% endcapture %} {% include /alerts/alert_warning.html content=warning_note %} From 30ffbea86b31039a7ea311eab692f7c0b299feb0 Mon Sep 17 00:00:00 2001 From: Jono Sligh Date: Mon, 1 Apr 2024 13:58:34 -0500 Subject: [PATCH 07/11] lint --- .../pbm-api/ios/pbm-targeting-ios.md | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md index a67817c297..7346a9bdd1 100644 --- a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md +++ b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md @@ -40,54 +40,53 @@ If you need to use a CMP way, ensure that you don't set any of the following API ### Subject To GPDR -``` +```swift public var subjectToGDPR:Bool? ``` You can retrieve and set the subjectToGDPR for targeting: -``` +```swift guard let subjectToGDPR = Targeting.shared.subjectToGDPR else { print("There was an error retrieving subjectToGDPR) return } ``` -``` +```swift Targeting.shared.subjectToGDPR = false ``` ### GDPR Consent String -``` +```swift public var gdprConsentString? ``` You can retrieve and set the subjectToGDPR for targeting: -``` +```swift guard let gdprConsentString = Targeting.shared.gdprConsentString else { print("There was an error retrieving gdprConsentString") return } ``` -``` +```swift Targeting.shared.gdprConsentString = "A String" ``` ### Purpose Consent -``` +```swift public var purposeConsents: String? ``` You can retrieve and set the purposeConsents for targeting: -``` +```swift Targeting.shared.purposeConsents = "100000000000000000000000" - ``` ## Targeting properties @@ -159,8 +158,7 @@ Targeting.shared.omidPartnerVersion = "1.0" 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: - -``` +```swift func addContextKeyword(_ newElement: String) func addContextKeywords(_ newElements: Set) @@ -182,7 +180,7 @@ Targeting.shared.addContextKeyword("globalContextKeywordValue3") Prebid provides following functions to manage First Party User Data: -``` +```swift func addUserData(key: String, value: String) func updateUserData(key: String, value: Set) @@ -203,7 +201,7 @@ Targeting.shared.addUserData(key: "globalUserDataKey1", value: "globalUserDataVa Prebid provides following functions to manage First Party Inventory Data: -``` +```swift func addContextData(key: String, value: String) func updateContextData(key: String, value: Set) @@ -224,7 +222,7 @@ Targeting.shared.addContextData(key: "globalContextDataKey1", value: "globalCont The First Party Data Access Control List provides a methods to restrict access to first party data to a supplied list of bidders. -``` +```swift func addBidderToAccessControlList(_ bidderName: String) func removeBidderFromAccessControlList(_ bidderName: String) @@ -243,7 +241,7 @@ Targeting.shared.addBidderToAccessControlList(Prebid.bidderNameRubiconProject) The methods that add or change the custom parameters. The name will be auto-prepended with `c.` to avoid collisions. -``` +```swift public func addCustomParam(_ value: String, withName: String?) public func setCustomParams(_ params: [String : String]?) @@ -253,7 +251,7 @@ public func setCustomParams(_ params: [String : String]?) Adds a new param by name and sets its value. -``` +```swift public func addParam(_ value: String, withName: String?) ``` @@ -261,7 +259,7 @@ public func addParam(_ value: String, withName: String?) Store location in the user's section -``` +```swift public func setLatitude(_ latitude: Double, longitude: Double) ``` @@ -273,12 +271,12 @@ Provides a way for app publishers to customize most ORTB fields in the partial b There are certain protected fields such as regs, device, geo, ext.gdpr, ext.us_privacy, and ext.consent which cannot be changed. -``` swift +```swift //global invocation adUnitConfig.setOrtbConfig("{"ext":{"prebid":{"debug":1,"trace":"verbose"}}}") ``` -``` swift +```swift //ad unit / impression-level adUnit.setOrtbConfig("{"ext":{"gpid":"abc123"}}") ``` @@ -321,7 +319,7 @@ Prebid SDK provides a local storage interface to set, retrieve or update an arra Prebid SDK Provides five functions to handle User ID details: -``` +```swift public func storeExternalUserId(_ externalUserId: ExternalUserId) public func fetchStoredExternalUserIds() -> [ExternalUserId]? From 85d23e2bd3e5625252e8506e6976b8ed1c80010f Mon Sep 17 00:00:00 2001 From: Jono Sligh Date: Mon, 1 Apr 2024 14:01:18 -0500 Subject: [PATCH 08/11] lint2 --- prebid-mobile/pbm-api/ios/pbm-targeting-ios.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md index 7346a9bdd1..057b203d60 100644 --- a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md +++ b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md @@ -110,7 +110,6 @@ Targeting.shared.purposeConsents = "100000000000000000000000" |`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 @@ -128,11 +127,12 @@ targeting.userID = "X345Y678Z890" 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. There three components to signaling support for OMSDK: + * Partner Name * Partner Version * API code -#### Partner Name +### 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 @@ -141,7 +141,7 @@ This will be the [IAB OMSDK compliant partner name](https://complianceomsdkapi.i Targeting.shared.omidPartnerName = "Google" ``` -#### Partner Version +### Partner Version {:.no_toc} The OMSDK version number the partner integrated with. See below for configuration and examples. @@ -200,7 +200,6 @@ Targeting.shared.addUserData(key: "globalUserDataKey1", value: "globalUserDataVa Prebid provides following functions to manage First Party Inventory Data: - ```swift func addContextData(key: String, value: String) @@ -221,7 +220,6 @@ Targeting.shared.addContextData(key: "globalContextDataKey1", value: "globalCont The First Party Data Access Control List provides a methods to restrict access to first party data to a supplied list of bidders. - ```swift func addBidderToAccessControlList(_ bidderName: String) @@ -236,7 +234,6 @@ Example: Targeting.shared.addBidderToAccessControlList(Prebid.bidderNameRubiconProject) ``` - ### Custom Params The methods that add or change the custom parameters. The name will be auto-prepended with `c.` to avoid collisions. From 931d89b9673e304f995c283ec06ffab1e0a71ffe Mon Sep 17 00:00:00 2001 From: Jono Sligh Date: Mon, 1 Apr 2024 14:02:13 -0500 Subject: [PATCH 09/11] lint --- prebid-mobile/pbm-api/ios/pbm-targeting-ios.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md index 057b203d60..14cb470a6b 100644 --- a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md +++ b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md @@ -281,6 +281,7 @@ adUnit.setOrtbConfig("{"ext":{"gpid":"abc123"}}") ## User Identity API Prebid SDK supports two interfaces to pass / maintain User IDs and ID vendor details: + * Real-time in Prebid SDK's API field externalUserIdArray * Store User Id(s) in local storage @@ -290,7 +291,6 @@ Any identity vendor's details in local storage will be sent over to Prebid Serve 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. - ```swift public var externalUserIdArray = [ExternalUserId]() ``` From 69cc6e9c8a97e73669181e0def2167cb1b2bcdd9 Mon Sep 17 00:00:00 2001 From: Jono Sligh Date: Mon, 1 Apr 2024 14:08:43 -0500 Subject: [PATCH 10/11] ...one more --- prebid-mobile/pbm-api/ios/pbm-targeting-ios.md | 1 - 1 file changed, 1 deletion(-) diff --git a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md index 14cb470a6b..50dcc673b2 100644 --- a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md +++ b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md @@ -57,7 +57,6 @@ guard let subjectToGDPR = Targeting.shared.subjectToGDPR else { Targeting.shared.subjectToGDPR = false ``` - ### GDPR Consent String ```swift From a9ddb8adf183814d3ef0fd02499f203e9f2e26be Mon Sep 17 00:00:00 2001 From: Jono Sligh Date: Mon, 1 Apr 2024 14:12:06 -0500 Subject: [PATCH 11/11] are you serious. --- prebid-mobile/pbm-api/android/pbm-targeting-params-android.md | 1 - prebid-mobile/pbm-api/ios/pbm-targeting-ios.md | 1 - 2 files changed, 2 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 bdfd1a6ebd..13273f10c1 100755 --- a/prebid-mobile/pbm-api/android/pbm-targeting-params-android.md +++ b/prebid-mobile/pbm-api/android/pbm-targeting-params-android.md @@ -385,4 +385,3 @@ TargetingParams.removeStoredExternalUserId("adserver.org"); //Remove All External UserID TargetingParams.clearStoredExternalUserIds(); ``` - diff --git a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md index 50dcc673b2..8319f7f67b 100644 --- a/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md +++ b/prebid-mobile/pbm-api/ios/pbm-targeting-ios.md @@ -345,4 +345,3 @@ Targeting.shared.removeStoredExternalUserId("sharedid.org") //Remove All External UserID Targeting.shared.removeStoredExternalUserIds() ``` -