-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
162 changed files
with
6,572 additions
and
3,909 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Each ad unit in the Original API is a subclass of the `AdUnit` class, which provides the following properties and methods for additional configuration. | ||
|
||
### Auto Refresh | ||
|
||
#### setAutoRefreshPeriodMillis | ||
{:.no_toc} | ||
|
||
If set on a given Prebid Mobile ad unit, the `fetchDemand` function will be called every `periodMillis` until `stopAutoRefresh` is called. Each call to `fetchDemand` will invoke the `onComplete` function. This refresh only pertains to Prebid Mobile and not to any ad server refresh processes. It is suggested that the adServers refresh be turned off. | ||
|
||
**Parameters** | ||
|
||
- `periodMillis`: Integer defining the refresh time in milliseconds. | ||
|
||
#### startAutoRefresh | ||
{:.no_toc} | ||
|
||
Starts the auto-refresh behavior for a given Prebid Mobile ad unit. | ||
|
||
#### stopAutoRefresh | ||
{:.no_toc} | ||
|
||
Halts the auto-refresh behavior for a given Prebid Mobile ad unit. If no auto-refresh behavior has been set, `stopAutoRefresh` will be ignored. | ||
|
||
### 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" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Each ad unit in the original integration method is a subclass of the `AdUnit` class, which provides the following properties and methods for the additional configuration. | ||
|
||
### Autorefresh | ||
|
||
#### setAutoRefreshMillis | ||
{:.no_toc} | ||
|
||
If set on a given banner adunit, the `fetchDemand` function will be called every `periodMillis` until `stopAutoRefresh` is called. Each call to `fetchDemand` will invoke the `onComplete` function. This refresh only pertains to Prebid Mobile and not to any ad server refresh processes. It is suggested that the adServes refresh be turned off. | ||
|
||
#### stopAutoRefresh | ||
{:.no_toc} | ||
|
||
Halts the auto-refresh behavior for a given Prebid Mobile ad unit. If no auto-refresh behavior has been set, `stopAutoRefresh` will be ignored. | ||
|
||
#### resumeAutoRefresh | ||
{:.no_toc} | ||
|
||
Resumes a stopped autorefresh for the ad unit with the previously-defined autorefresh value. | ||
|
||
### 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") | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Using the `BannerParameters` object you can customize the bid request for banner ads. | ||
|
||
{: .alert.alert-warning :} | ||
Starting from PrebidMobile `2.1.0` the `BannerBaseAdUnit.Parameters` class is deprecated. Use `BannerParameters` instead. | ||
|
||
#### adSizes | ||
|
||
Defines the OpenRTB banner.formats array. | ||
|
||
#### interstitialMinWidthPerc and interstitialMinHeightPerc | ||
{:.no_toc} | ||
|
||
For interstitials only, these define which sizes Prebid Server will choose to send to bidders. See [Prebid Server interstitial support](/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#interstitial-support). If this option is used, you'll need to set the size to 1x1. | ||
|
||
#### api | ||
{:.no_toc} | ||
|
||
The `api` property is dedicated to adding values for API Frameworks to bid response according to the [OpenRTB 2.6](https://iabtechlab.com/wp-content/uploads/2022/04/OpenRTB-2-6_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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
## Overview | ||
|
||
Here's how to integrate the Prebid SDK with [Google AdMob](https://admob.google.com/home/). | ||
|
||
### Prerequisites | ||
|
||
These are the required components: | ||
|
||
- **AdMob Account** - This account allows you to manage and serve ads within your mobile app. Within this account you'll need to configure your inventory for serving ads within your app. | ||
- **GMA SDK** - This SDK integration is necessary to communicate with the AdMob service. | ||
- **Prebid SDK** - You will need the latest version of the Prebid Mobile SDK for either [Android](/prebid-mobile/pbm-api/android/code-integration-android.html) or [iOS](/prebid-mobile/pbm-api/ios/code-integration-ios.html). | ||
- **Prebid Server** - You will need a cluster of servers running [Prebid Server](/prebid-server/use-cases/pbs-sdk.html). You can set up your own Prebid Server or work with a [Prebid Server managed service](https://prebid.org/managed-services/). Prebid Server provides you with the following: | ||
- Configuration storage - rather than hardcoding all the details of your current business arrangements in the app, Prebid Server stores which bidders you're currently working with, their inventory details, and other settings that can be changed without updating your app. | ||
- Server-side auction - the server will make the connections to multiple auction bidding partners so the app doesn't have to. | ||
- Privacy regulation tools - the server can help your legal team meet different regulatory needs in different jurisdictions by configuring various protocols and anonyimization activities. | ||
|
||
## How it Works | ||
|
||
Here's how the ad bidding-auction-rendering process works in this integration scenario. | ||
|
||
![Rendering with AdMob](/assets/images/prebid-mobile/modules/rendering/prebid-in-app-bidding-overview-admob.png) | ||
|
||
**Steps 1-2** Prebid SDK makes a bid request. Prebid Server runs an auction and returns the winning bid. | ||
|
||
**Step 3** GMA SDK makes an ad request. AdMob returns the mediation chain with respective ad sources. | ||
|
||
**Step 4** For each Prebid ad source, the GMA SDK sequentially instantiates a Prebid adapter function. | ||
|
||
**Step 5** The adapter function verifies the targeting keywords of the winning bid and the server properties of the given ad source. If they match the adapter will render the winning bid. Otherwise, it will immediately fail with a "no ad" error and the next ad source will instantiate the same adapter but for another set of server params. | ||
|
||
## Major Integration Steps | ||
|
||
Assuming your app is already integrated with the [GMA SDK](https://developers.google.com/admob/android/quick-start), the technical implementation of Prebid mobile into your app will involve these major steps: | ||
|
||
1. [Initialize the Prebid SDK](/prebid-mobile/pbm-api/{{include.platform}}/code-integration-{{include.platform}}.html) - create a connection to your Prebid Server. | ||
2. [Set Global Parameters](/prebid-mobile/pbm-api/{{include.platform}}/pbm-targeting-{{include.platform}}.html) - let bidders know important data about the page, privacy consent, and other settings. | ||
3. Work with your Prebid Server team to create the adunit configIds that will be used in the app. | ||
4. Set up AdMob Mediation Groups and Custom Events. See [AdOps guidance](#ad-operations-guidance) | ||
5. Link Prebid SDK AdUnit code to your app's AdUnits for the adunits that your business team wants to connect to Prebid with the configIds generated in Step 3. See the [adunit-specific instructions](#adunit-specific-instructions) below. | ||
|
||
## Ad Operations Guidance | ||
|
||
The Ad Operations team will need to create a [Mediation Group in AdMob](/adops/mobile-rendering-admob-line-item-setup.html). | ||
|
||
### Rendering and Tracking | ||
|
||
This information may be useful when comparing data across various reporting systems: | ||
|
||
{: .table .table-bordered .table-striped } | ||
| Scenario | Tracked? | | ||
| --- | --- | | ||
| Fires Prebid win event | yes | | ||
| Fires Prebid imp event | no | | ||
| Fires OpenRTB burl | no (1) | | ||
| Fires OpenRTB nurl | no (1) | | ||
| Fires OpenMeasurement events | yes | | ||
|
||
Notes: | ||
|
||
1. OpenRTB burl and nurl will be utilized in a future release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
## Overview | ||
|
||
Here's how to integrate the Prebid SDK with [AppLovin MAX](https://developers.applovin.com/en). | ||
|
||
### Prerequisites | ||
|
||
These are the required components: | ||
|
||
- **AppLovin Account** - This account allows you to manage and serve ads within your mobile app. Within this account you'll need to configure your inventory for serving ads within your app. | ||
- **AppLovin MAX SDK** - This SDK integration is necessary to communicate with the AppLovin service. | ||
- **Prebid SDK** - You will need the latest version of the Prebid Mobile SDK for either [Android](/prebid-mobile/pbm-api/android/code-integration-android.html) or [iOS](/prebid-mobile/pbm-api/ios/code-integration-ios.html). | ||
- **Prebid Server** - You will need a cluster of servers running [Prebid Server](/prebid-server/use-cases/pbs-sdk.html). You can set up your own Prebid Server or work with a [Prebid Server managed service](https://prebid.org/managed-services/). Prebid Server provides you with the following: | ||
- Configuration storage - rather than hardcoding all the details of your current business arrangements in the app, Prebid Server stores which bidders you're currently working with, their inventory details, and other settings that can be changed without updating your app. | ||
- Server-side auction - the server will make the connections to multiple auction bidding partners so the app doesn't have to. | ||
- Privacy regulation tools - the server can help your legal team meet different regulatory needs in different jurisdictions by configuring various protocols and anonyimization activities. | ||
|
||
## How it Works | ||
|
||
Here's how the ad bidding-auction-rendering process works in this integration scenario. | ||
|
||
![Rendering with MAX](/assets/images/prebid-mobile/modules/rendering/prebid-in-app-bidding-overview-max.png) | ||
|
||
**Steps 1-2** Prebid SDK makes a bid request. Prebid Server runs an auction and returns the winning bid. | ||
|
||
**Step 3** MAX SDK makes an ad request. MAX returns the waterfall with respective placements. | ||
|
||
**Step 4** For each Prebid placement, the MAX SDK sequentially instantiates one of Prebid's adapter functions. | ||
|
||
**Step 5** The adapter function verifies the targeting keywords of the winning bid and the custom properties of the given placement. If they match the adapter will render the winning bid. Otherwise, adpater will fail with "no ad" immediately and the next placement will instantiate the same adapter but for another custom properties. | ||
|
||
## Major Integration Steps | ||
|
||
Assuming your app is already integrated with the [AppLovin MAX SDK](https://dash.applovin.com/documentation/mediation/android/getting-started/integration), the technical implementation of Prebid mobile into your app will involve these major steps: | ||
|
||
1. [Initialize the Prebid SDK](/prebid-mobile/pbm-api/{{include.platform}}/code-integration-{{include.platform}}.html) - create a connection to your Prebid Server. | ||
2. [Set Global Parameters](/prebid-mobile/pbm-api/{{include.platform}}/pbm-targeting-{{include.platform}}.html) - let bidders know important data about the page, privacy consent, and other settings. | ||
3. Work with your Prebid Server team to create the adunit configIds that will be used in the app. | ||
4. Set up ovin custom network and placements. See [AdOps guidance](#ad-operations-guidance) | ||
5. Link Prebid SDK AdUnit code to your app's AdUnits for the adunits that your business team wants to connect to Prebid with the configIds generated in Step 3. See the [adunit-specific instructions](#adunit-specific-instructions) below. | ||
|
||
## Ad Operations Guidance | ||
|
||
The Ad Operations team will need to create a [Custom Network in AppLovin](/adops/mobile-rendering-max-line-item-setup.html). | ||
|
||
### Rendering and Tracking | ||
|
||
This information may be useful when comparing data across various reporting systems: | ||
|
||
{: .table .table-bordered .table-striped } | ||
| Scenario | Tracked? | | ||
| --- | --- | | ||
| Fires Prebid win event | yes | | ||
| Fires Prebid imp event | no | | ||
| Fires OpenRTB burl | no (1) | | ||
| Fires OpenRTB nurl | no (1) | | ||
| Fires OpenMeasurement events | yes | | ||
|
||
Notes: | ||
|
||
1. OpenRTB burl and nurl will be utilized in a future release. |
Oops, something went wrong.