Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Android and iOS Documentation for arbitrary ORTB #5195

Merged
merged 11 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions prebid-mobile/pbm-api/android/pbm-targeting-params-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@

If you need to use a CMP way, ensure that you don't set any of the following API properties.


Check failure on line 34 in prebid-mobile/pbm-api/android/pbm-targeting-params-android.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Multiple consecutive blank lines

prebid-mobile/pbm-api/android/pbm-targeting-params-android.md:34 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md012.md
{% endcapture %}
{% include /alerts/alert_warning.html content=warning_note %}


Check failure on line 38 in prebid-mobile/pbm-api/android/pbm-targeting-params-android.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Multiple consecutive blank lines

prebid-mobile/pbm-api/android/pbm-targeting-params-android.md:38 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md012.md
### Subject To GPDR
{:.no_toc}

Enable (true) or disable (false) the ability to provide consent.

```

Check failure on line 44 in prebid-mobile/pbm-api/android/pbm-targeting-params-android.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Fenced code blocks should have a language specified

prebid-mobile/pbm-api/android/pbm-targeting-params-android.md:44 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md040.md
TargetingParams.isSubjectToGDPR()
TargetingParams.setSubjectToGDPR(true)
```
Expand All @@ -49,7 +49,7 @@
### GDPR Consent String
{:.no_toc}

```

Check failure on line 52 in prebid-mobile/pbm-api/android/pbm-targeting-params-android.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Fenced code blocks should have a language specified

prebid-mobile/pbm-api/android/pbm-targeting-params-android.md:52 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md040.md
val consent = TargetingParams.getGDPRConsentString();
TargetingParams.setGDPRConsentString(string);
```
Expand All @@ -57,7 +57,7 @@
### Purpose Consent
{:.no_toc}

```

Check failure on line 60 in prebid-mobile/pbm-api/android/pbm-targeting-params-android.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Fenced code blocks should have a language specified

prebid-mobile/pbm-api/android/pbm-targeting-params-android.md:60 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md040.md
val consent = TargetingParams.getPurposeConsents()
TargetingParams.setPurposeConsents(string)
```
Expand All @@ -68,11 +68,11 @@

Example:

```

Check failure on line 71 in prebid-mobile/pbm-api/android/pbm-targeting-params-android.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Fenced code blocks should have a language specified

prebid-mobile/pbm-api/android/pbm-targeting-params-android.md:71 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md040.md
TargetingParams.setSubjectToCOPPA(true);
```


Check failure on line 75 in prebid-mobile/pbm-api/android/pbm-targeting-params-android.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Multiple consecutive blank lines

prebid-mobile/pbm-api/android/pbm-targeting-params-android.md:75 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md012.md
## Parameters

The tables below list the methods and properties that the Prebid Rendering API uses for customization.
Expand All @@ -81,7 +81,7 @@
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)

Check failure on line 84 in prebid-mobile/pbm-api/android/pbm-targeting-params-android.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Link fragments should be valid

prebid-mobile/pbm-api/android/pbm-targeting-params-android.md:84:4 MD051/link-fragments Link fragments should be valid [Context: "[SDK Settings](#prebidrenderingsettings)"] https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md051.md

### Targeting

Expand All @@ -99,11 +99,11 @@
| 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. <br />**For example:**` https://play.google.com/store/apps/details?id=com.outfit7.talkingtom`. | ❗ Required |

Check failure on line 102 in prebid-mobile/pbm-api/android/pbm-targeting-params-android.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Spaces inside code span elements

prebid-mobile/pbm-api/android/pbm-targeting-params-android.md:102:160 MD038/no-space-in-code Spaces inside code span elements [Context: "` https://play.google.com/stor..."] https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md038.md
| 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||


Check failure on line 106 in prebid-mobile/pbm-api/android/pbm-targeting-params-android.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Multiple consecutive blank lines

prebid-mobile/pbm-api/android/pbm-targeting-params-android.md:106 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md012.md
Example:

``` java
Expand All @@ -113,6 +113,22 @@
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.
bretg marked this conversation as resolved.
Show resolved Hide resolved

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"}}}"
jsligh marked this conversation as resolved.
Show resolved Hide resolved
```

``` kotlin
adUnit?.ortbConfig = "{"ext":{"prebid":{"debug":1,"trace":"verbose"}}}"
bretg marked this conversation as resolved.
Show resolved Hide resolved
```

### Global User Targeting


Expand Down
16 changes: 16 additions & 0 deletions prebid-mobile/pbm-api/ios/pbm-targeting-ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading