From 0f74f8b7291471470aad1c14bb45699e1780ff69 Mon Sep 17 00:00:00 2001 From: Olena Stepaniuk <92721590+OlenaPostindustria@users.noreply.github.com> Date: Fri, 20 Dec 2024 18:33:36 +0200 Subject: [PATCH] Mobile: Add section about ad position configuration (#5751) * Add section about ad position * Add rendering-adunit-config-android.md --- _includes/mobile/adunit-config-android.md | 10 ++++++++++ _includes/mobile/adunit-config-ios.md | 10 ++++++++++ _includes/mobile/rendering-adunit-config-android.md | 9 +++++++++ _includes/mobile/rendering-adunit-config-ios.md | 9 +++++++++ .../modules/rendering/android-sdk-integration-admob.md | 4 ++++ .../modules/rendering/android-sdk-integration-gam.md | 2 +- .../modules/rendering/android-sdk-integration-max.md | 4 ++++ .../modules/rendering/android-sdk-integration-pb.md | 4 ++++ .../modules/rendering/ios-sdk-integration-admob.md | 4 ++++ .../modules/rendering/ios-sdk-integration-gam.md | 2 +- .../modules/rendering/ios-sdk-integration-max.md | 4 ++++ .../modules/rendering/ios-sdk-integration-pb.md | 4 ++++ 12 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 _includes/mobile/rendering-adunit-config-android.md create mode 100644 _includes/mobile/rendering-adunit-config-ios.md diff --git a/_includes/mobile/adunit-config-android.md b/_includes/mobile/adunit-config-android.md index 0cce97bcb2..e3e4bde8dd 100644 --- a/_includes/mobile/adunit-config-android.md +++ b/_includes/mobile/adunit-config-android.md @@ -33,3 +33,13 @@ Using the following method, you can set the impression-level [GPID](https://docs ``` kotlin adUnit?.gpid = "/36117602/hnp-sfgate.com/Homepage/AP300" ``` + +### Ad Position + +The `adPosition` property allows developers to specify the position of the ad within the publisher's content. This property maps to the `pos` field in the OpenRTB specification under the `imp[].banner` or `imp[].video` objects, depending on the ad format. The possible values for this field could be found in the [respective specification](https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/main/AdCOM%20v1.0%20FINAL.md#list--placement-positions-). + +You can set `adPosition` by using the following method: + +```kotlin +adUnit.setAdPosition(AdPosition.FOOTER); +``` \ No newline at end of file diff --git a/_includes/mobile/adunit-config-ios.md b/_includes/mobile/adunit-config-ios.md index 42ba1f2aec..4812e1d7d6 100644 --- a/_includes/mobile/adunit-config-ios.md +++ b/_includes/mobile/adunit-config-ios.md @@ -29,3 +29,13 @@ Using the following method, you can set the impression-level [GPID](https://docs ``` swift adUnit.setGPID("/36117602/hnp-sfgate.com/Homepage/AP300") ``` + +### Ad Position + +The `adPosition` property allows developers to specify the position of the ad within the publisher's content. This property maps to the `pos` field in the OpenRTB specification under the `imp[].banner` or `imp[].video` objects, depending on the ad format. The possible values for this field could be found in the [respective specification](https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/main/AdCOM%20v1.0%20FINAL.md#list--placement-positions-). + +You can set `adPosition` by using the following property: + +```swift +adUnit.adPosition = .footer +``` \ No newline at end of file diff --git a/_includes/mobile/rendering-adunit-config-android.md b/_includes/mobile/rendering-adunit-config-android.md new file mode 100644 index 0000000000..5fc4d6ec26 --- /dev/null +++ b/_includes/mobile/rendering-adunit-config-android.md @@ -0,0 +1,9 @@ +### Ad Position + +The `adPosition` property allows developers to specify the position of the ad within the publisher's content. This property maps to the `pos` field in the OpenRTB specification under the `imp[].banner` or `imp[].video` objects, depending on the ad format. The possible values for this field could be found in the [respective specification](https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/main/AdCOM%20v1.0%20FINAL.md#list--placement-positions-). + +You can set `adPosition` by using the following method: + +```kotlin +adUnit.setAdPosition(AdPosition.FOOTER); +``` \ No newline at end of file diff --git a/_includes/mobile/rendering-adunit-config-ios.md b/_includes/mobile/rendering-adunit-config-ios.md new file mode 100644 index 0000000000..5737e459e7 --- /dev/null +++ b/_includes/mobile/rendering-adunit-config-ios.md @@ -0,0 +1,9 @@ +### Ad Position + +The `adPosition` property allows developers to specify the position of the ad within the publisher's content. This property maps to the `pos` field in the OpenRTB specification under the `imp[].banner` or `imp[].video` objects, depending on the ad format. The possible values for this field could be found in the [respective specification](https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/main/AdCOM%20v1.0%20FINAL.md#list--placement-positions-). + +You can set `adPosition` by using the following property: + +```swift +adUnit.adPosition = .footer +``` \ No newline at end of file diff --git a/prebid-mobile/modules/rendering/android-sdk-integration-admob.md b/prebid-mobile/modules/rendering/android-sdk-integration-admob.md index 32cc4169c5..cca7f118a0 100644 --- a/prebid-mobile/modules/rendering/android-sdk-integration-admob.md +++ b/prebid-mobile/modules/rendering/android-sdk-integration-admob.md @@ -389,6 +389,10 @@ The `fetchDemand` method makes a bid request to the prebid server and provides a Now load an native ad from AdMob according to the [AdMob instructions](https://developers.google.com/admob/android/native/start). Everything else will be handled by GMA SDK and prebid adapters. +## Additional Ad Unit Configuration + +{% include mobile/rendering-adunit-config-android.md %} + ## Further Reading - [Prebid Mobile Overview](/prebid-mobile/prebid-mobile.html) diff --git a/prebid-mobile/modules/rendering/android-sdk-integration-gam.md b/prebid-mobile/modules/rendering/android-sdk-integration-gam.md index 45da869bf1..502a9d6629 100644 --- a/prebid-mobile/modules/rendering/android-sdk-integration-gam.md +++ b/prebid-mobile/modules/rendering/android-sdk-integration-gam.md @@ -310,7 +310,7 @@ Integration: ## Additional Ad Unit Configuration -{% include mobile/adunit-config-android.md %} +{% include mobile/rendering-adunit-config-android.md %} ## Further Reading diff --git a/prebid-mobile/modules/rendering/android-sdk-integration-max.md b/prebid-mobile/modules/rendering/android-sdk-integration-max.md index 2a5803b2c1..715d7830a2 100644 --- a/prebid-mobile/modules/rendering/android-sdk-integration-max.md +++ b/prebid-mobile/modules/rendering/android-sdk-integration-max.md @@ -330,6 +330,10 @@ The `fetchDemand` method makes a bid request to prebid server and provides a res Now just load a native ad from MAX according to the [MAX instructions](https://dash.applovin.com/documentation/mediation/android/getting-started/native-manual#load-the-native-ad). +## Additional Ad Unit Configuration + +{% include mobile/rendering-adunit-config-android.md %} + ## Further Reading - [Prebid Mobile Overview](/prebid-mobile/prebid-mobile.html) diff --git a/prebid-mobile/modules/rendering/android-sdk-integration-pb.md b/prebid-mobile/modules/rendering/android-sdk-integration-pb.md index 6c4a24cadc..6d6334cc88 100644 --- a/prebid-mobile/modules/rendering/android-sdk-integration-pb.md +++ b/prebid-mobile/modules/rendering/android-sdk-integration-pb.md @@ -238,6 +238,10 @@ override fun onAdLoaded(rewardedAdUnit: RewardedAdUnit) { } ``` +## Additional Ad Unit Configuration + +{% include mobile/rendering-adunit-config-android.md %} + ## Further Reading - [Prebid Mobile Overview](/prebid-mobile/prebid-mobile) diff --git a/prebid-mobile/modules/rendering/ios-sdk-integration-admob.md b/prebid-mobile/modules/rendering/ios-sdk-integration-admob.md index acc6d0bb43..60beae54c1 100644 --- a/prebid-mobile/modules/rendering/ios-sdk-integration-admob.md +++ b/prebid-mobile/modules/rendering/ios-sdk-integration-admob.md @@ -350,6 +350,10 @@ The `fetchDemand` method makes a bid request to Prebid server and provides a res Now just load a native ad from AdMob according to the [AdMob instructions](https://developers.google.com/admob/ios/native/start). +## Additional Ad Unit Configuration + +{% include mobile/rendering-adunit-config-ios.md %} + ## Further Reading - [Prebid Mobile Overview](/prebid-mobile/prebid-mobile) diff --git a/prebid-mobile/modules/rendering/ios-sdk-integration-gam.md b/prebid-mobile/modules/rendering/ios-sdk-integration-gam.md index 949abdf86b..6610406e66 100644 --- a/prebid-mobile/modules/rendering/ios-sdk-integration-gam.md +++ b/prebid-mobile/modules/rendering/ios-sdk-integration-gam.md @@ -297,7 +297,7 @@ Integration: ## Additional Ad Unit Configuration -{% include mobile/adunit-config-ios.md %} +{% include mobile/rendering-adunit-config-ios.md %} ## Further Reading diff --git a/prebid-mobile/modules/rendering/ios-sdk-integration-max.md b/prebid-mobile/modules/rendering/ios-sdk-integration-max.md index 9145836090..746d660e17 100644 --- a/prebid-mobile/modules/rendering/ios-sdk-integration-max.md +++ b/prebid-mobile/modules/rendering/ios-sdk-integration-max.md @@ -304,6 +304,10 @@ The `fetchDemand` method makes a bid request to Prebid Server and provides a res Load a native ad from MAX according to the [MAX instructions](https://dash.applovin.com/documentation/mediation/ios/getting-started/native-manual#load-the-native-ad). +## Additional Ad Unit Configuration + +{% include mobile/rendering-adunit-config-ios.md %} + ## Further Reading - [Prebid Mobile Overview](/prebid-mobile/prebid-mobile) diff --git a/prebid-mobile/modules/rendering/ios-sdk-integration-pb.md b/prebid-mobile/modules/rendering/ios-sdk-integration-pb.md index 5291655c9d..d41ceb0386 100644 --- a/prebid-mobile/modules/rendering/ios-sdk-integration-pb.md +++ b/prebid-mobile/modules/rendering/ios-sdk-integration-pb.md @@ -237,6 +237,10 @@ func rewardedAdDidReceiveAd(_ rewardedAd: RewardedAdUnit) { } ``` +## Additional Ad Unit Configuration + +{% include mobile/rendering-adunit-config-ios.md %} + ## Further Reading - [Prebid Mobile Overview](/prebid-mobile/prebid-mobile)