Skip to content

Commit 1a1aaeb

Browse files
authored
Merge branch 'master' into master
2 parents a1e3ff4 + e006ecb commit 1a1aaeb

79 files changed

Lines changed: 3816 additions & 605 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
files: '**/*.md'
2525
separator: ","
26-
- uses: DavidAnson/markdownlint-cli2-action@v22
26+
- uses: DavidAnson/markdownlint-cli2-action@v23
2727
if: steps.changed-files.outputs.any_changed == 'true'
2828
with:
2929
globs: "${{ steps.changed-files.outputs.all_changed_files }},!_includes"

.markdownlint.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
"MD024": false,
77
"MD025": false,
88
"MD033": false,
9-
"MD036": false
10-
}
9+
"MD036": false,
10+
"MD058": false
11+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The markdown files are linted via [markdownlint-cli](https://github.com/igorshub
5151
You may need to configure the disabled rules specified in [.markdownlint.json](.markdownlint.json) directly in your project settings. You can invoke linting in CLI via
5252

5353
```bash
54-
markdownlint --config .markdownlint.json --ignore-path .markdownlintignore "**/*.md"
54+
markdownlint --config .markdownlint.json "**/*.md"
5555
```
5656

5757
<a name="running-jekyll-locally"></a>

_data/sidebar.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,22 @@
912912
sectionTitle:
913913
subgroup: 3
914914

915+
- sbSecId: 2
916+
title: Google Next-Gen SDK Bidding-Only Integration
917+
link: /prebid-mobile/pbm-api/android/android-sdk-integration-nextgen-original-api.html
918+
isHeader: 0
919+
isSectionHeader: 0
920+
sectionTitle:
921+
subgroup: 3
922+
923+
- sbSecId: 2
924+
title: Google Next-Gen SDK Prebid-Rendered Integration
925+
link: /prebid-mobile/modules/rendering/android-sdk-integration-nextgen.html
926+
isHeader: 0
927+
isSectionHeader: 0
928+
sectionTitle:
929+
subgroup: 3
930+
915931
- sbSecId: 2
916932
title: AdMob
917933
link: /prebid-mobile/modules/rendering/android-sdk-integration-admob.html

_includes/loadScript.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<script type="text/javascript">
2+
function loadScript(url) {
3+
const scr = document.createElement('script');
4+
scr.src = url;
5+
return new Promise((resolve, reject) => {
6+
scr.onerror = reject;
7+
scr.onload = resolve;
8+
document.head.appendChild(scr);
9+
});
10+
}
11+
</script>
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
## Overview
2+
3+
This how-to guide covers the original approach for integrating the Prebid SDK into your app with the Google Next-Gen Mobile Ads SDK. It utilizes:
4+
5+
- **Prebid SDK** and **Prebid server** to handle the bidding and auction process.
6+
- **GAM** and the **Google Next-Gen Mobile Ads SDK** manage the ad inventory and select the winning ad to display.
7+
- **Prebid Universal Creative** renders display ads when a Prebid bid wins.
8+
- **Next-Gen SDK** renders banner and non-instream ads when a Prebid bid wins.
9+
10+
If you do not have the Next-Gen Mobile Ads SDK in the app, refer to the [Google Integration Documentation](https://developers.google.com/admob/{{include.platform}}/next-gen/quick-start).
11+
12+
### Alternative Approaches
13+
14+
Another way to integrate Next-Gen SDK into your app is with the [Prebid-Rendered Integration](/prebid-mobile/modules/rendering/{{include.platform}}-sdk-integration-nextgen.html).
15+
16+
Tradeoffs between these integration approaches:
17+
18+
{: .table .table-bordered .table-striped }
19+
| Aspect | Bidding-Only Integration | Prebid-Rendered Integration |
20+
| --- |:---:|:---:|
21+
| App code has direct access to bids | <img alt="check" src="/assets/images/icons/icon-check-green.png" width="30"> | |
22+
| Support for MRAID 3.0 | | <img alt="check" src="/assets/images/icons/icon-check-green.png" width="30"> |
23+
| Support for SKAdnetwork | | <img alt="check" src="/assets/images/icons/icon-check-green.png" width="30"> |
24+
| Loads data from Prebid Cache | <img alt="check" src="/assets/images/icons/icon-check-green.png" width="30"> | |
25+
| Triggers billing and Notice URLs | <img alt="check" src="/assets/images/icons/icon-check-green.png" width="30"> | |
26+
| Supports Third Party Rendering libraries | | <img alt="check" src="/assets/images/icons/icon-check-green.png" width="30"> |
27+
28+
**Notes:**
29+
30+
- On one hand, using Prebid Cache reduces the amount of data that must be sent to the mobile device -- the body of the creative does not need to be transmitted for bids. On the other hand, though, when a bid wins in the ad server, the body of the creative must be retrieved from the cache.
31+
- It is possible to mix-and-match implementations within an app. e.g. you could implement instream video with the Bidding-Only approach and other adunits with Prebid-Rendered.
32+
33+
### Prerequisites
34+
35+
The Next-Gen SDK Bidding-Only Integration method assumes that you have the following components:
36+
37+
- **Google Ad Manager Account** - A GAM account allows you to manage and serve ads within your mobile app. Within this account you'll need to configure your inventory and create orders for serving ads within your app. This involves defining ad units (spaces within your app where ads will be displayed) and setting up orders and line items to deliver ads to those units. See [Prebid's AdOps Guide](/adops/before-you-start.html) for more information.
38+
- **Google Next-Gen Mobile Ads SDK** - This refers to the software development kit provided by Google. You need to ensure that you have the latest version of the Next-Gen Mobile Ads SDK supported by Prebid SDK. This SDK integration is necessary to communicate with the ad server and display ads in your app.
39+
- **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).
40+
- **Prebid Universal Creative** - This needs to be hosted on a CDN and loaded from the creative in GAM as detailed in the [AdOps GAM creative reference](/adops/gam-creative-banner-sbs.html#prebid-universal-creative).
41+
- **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:
42+
- 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.
43+
- Server-side auction - the server will make the connections to multiple auction bidding partners so the app doesn't have to.
44+
- Creative caching - Prebid Cache stores the creatives until the app needs to render them, reducing the auction response bandwidth.
45+
- Privacy regulation tools - the server can help your legal team meet different regulatory needs in different jurisdictions by configuring various protocols and anonyimization activities.
46+
47+
## How it Works
48+
49+
Here's how the ad bidding-auction-rendering process works in this integration scenario.
50+
51+
![Next-Gen Bidding Only Integration Details](/assets/images/prebid-mobile/mobile-details-gam-bidding-only.png)
52+
53+
1. Prebid SDK calls Prebid Server which supplies one or more bids.
54+
1. PBSDK adds targeting values to Next-Gen SDK.
55+
1. Next-Gen SDK calls GAM, which makes the ad decision.
56+
1. If a 3rd party HTML creative is chosen (banner or interstitial):
57+
1. Next-Gen SDK writes the HTML to a webview, loading the Prebid Universal Creative (PUC).
58+
1. The PUC loads the winning creative from Prebid Cache.
59+
1. The PUC writes this creative into an iframe and hits all the tracking strings: Prebid win URL, billing url (burl), and notice url (nurl).
60+
1. If MRAID is available, it is used to consider the view state before hitting the burl.
61+
1. If a video VastUrl creative is chosen:
62+
1. The Next-Gen SDK uses the platform video player which loads the VAST from Prebid Cache.
63+
1. It then starts playing the VAST, hitting the embedded Impression tags when appropriate.
64+
1. If an In-App Native format is chosen:
65+
1. Next-Gen SDK delegates the rendering of native to the App and PBSDK when a special signal is specified.
66+
1. The app code gets the native assets from PBSDK. The app is coded to render the ad.
67+
1. PBSDK fires the eventtrackers when appropriate.
68+
1. The PBS win event is fired.
69+
1. The Next-Gen SDK handles Open Measurement SDK interactions.
70+
71+
## Major Integration Steps
72+
73+
Assuming your app already has AdUnits integrated with the Next-Gen Mobile Ads SDK, the technical implementation of Prebid mobile into your app will involve these major steps:
74+
75+
1. [Initialize the Prebid SDK](/prebid-mobile/pbm-api/{{include.platform}}/code-integration-{{include.platform}}.html) - create a connection to your Prebid Server.
76+
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.
77+
3. Work with your Prebid Server team to create the adunit configIds that will be used in the app.
78+
4. Set up GAM orders, line items, and creatives. See [AdOps guidance](#ad-operations-guidance)
79+
5. Link Prebid AdUnit code to your Next-Gen SDK AdUnits - for any 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.
80+
81+
## Ad Operations Guidance
82+
83+
The Ad Operations team will need to create line items in GAM. The creatives used depend on which media formats your adunits utilize.
84+
85+
{: .table .table-bordered .table-striped }
86+
| AdUnit Format | Line Item Targeting | Creative Type | Prebid Cache? | Ad Ops Details |
87+
| --- | --- | --- | --- | --- |
88+
| HTML banner, interstitial banner | hb_pb<br/>hb_format=banner | 3rd party HTML that loads the [PUC](/overview/prebid-universal-creative.html) | yes | [link](/adops/gam-creative-banner-sbs.html) |
89+
| Video (instream, non-instream, interstitial) | hb_pb<br/>hb_format=video<br/>inventoryType in (instream, mobile app) | VastUrl pointing to Prebid Cache | yes | [link](/adops/setting-up-prebid-video-in-dfp.html) |
90+
| Rewarded Video | hb_pb<br/>hb_format=video<br/>inventoryType in (instream, mobile app)<br/>rewarded adunits | VastUrl pointing to Prebid Cache | yes | [link](/adops/setting-up-prebid-video-in-dfp.html) |
91+
| In-app native | hb_pb<br/>hb_format=native | GAM native | no | [link](/adops/gam-native.html#create-a-new-native-creative) |
92+
| In-Webview native | hb_pb<br/>hb_format=native | 3rd party HTML that loads the native-trk script. | yes | [link](/adops/gam-native.html) |
93+
94+
Notes:
95+
96+
- You may need up to 4 sets of line items to support Prebid Mobile depending on adunit types. If you also run Prebid.js or AMP, please see [line item considerations](/adops/line-item-creation.html) for more information.
97+
- Discuss the Prebid Cache column with the Prebid Server team. They can set up the "top-level stored request" for your account to cache or not cache requests as needed.
98+
99+
### Rendering and Tracking
100+
101+
This information may be useful when comparing data across various reporting systems:
102+
103+
{: .table .table-bordered .table-striped }
104+
| Scenario | PUC | VastUrl Creative | GAM Native Creative |
105+
| --- | --- | --- | --- |
106+
| Rendering Method | PUC in iframe | Next-Gen SDK player | App code with data from PBSDK |
107+
| Fires Prebid win event | always | never | always |
108+
| Fires Prebid imp event | never | VAST impression tag | never |
109+
| Fires OpenRTB burl | when in view | n/a | never (1) |
110+
| Fires OpenRTB nurl | always | n/a | always |
111+
| Fires OpenMeasurement events | Next-Gen SDK | n/a | PB SDK |
112+
113+
Notes:
114+
115+
1. OpenRTB burl and nurl will be utilized in a future release.

0 commit comments

Comments
 (0)