From aaa6a493d6609f77b5c27219d0a325f12aea57bd Mon Sep 17 00:00:00 2001 From: Valentin Petrovych Date: Fri, 15 Nov 2024 12:05:24 +0100 Subject: [PATCH 1/7] Impression tracking for Mobile Original api. --- .../android-sdk-integration-gam-original-api.md | 16 ++++++++++++++++ 1 file changed, 16 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 9642040148..a90b8bf36b 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 @@ -41,6 +41,22 @@ This section describes the integration details for different ad formats. In each {% include mobile/adunit-config-android.md %} +### Impression tracking + +The SDK supports the native impression tracking. It triggers the `burl` impression URL. It tracks the visibility of view and trigger the event when the view is on the screen and at least 1x1 px in size. + +For activation for the banner ad units you should use `fetchDemand()` with the ad view parameter (f.e. AdManagerAdView): + +```java +adUnit.fetchDemand(builder, adView, resultCode -> { ... }) +``` + +For activation for the interstitial ad unit you should set `activatePrebidImpressionTracker()` flag: +```java +Interstitial adUnit = InterstitialAdUnit(CONFIG_ID, WIDTH, HEIGTH); +adUnit.activatePrebidImpressionTracker(true); +``` + ## Further Reading - [Prebid Mobile Overview](/prebid-mobile/prebid-mobile.html) From 74bd60339a60cba4b90375600fd8fd103f22ed20 Mon Sep 17 00:00:00 2001 From: Valentin Petrovych Date: Fri, 15 Nov 2024 12:09:36 +0100 Subject: [PATCH 2/7] Lint correction. --- .../pbm-api/android/android-sdk-integration-gam-original-api.md | 1 + 1 file changed, 1 insertion(+) 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 a90b8bf36b..a010f99d02 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 @@ -52,6 +52,7 @@ adUnit.fetchDemand(builder, adView, resultCode -> { ... }) ``` For activation for the interstitial ad unit you should set `activatePrebidImpressionTracker()` flag: + ```java Interstitial adUnit = InterstitialAdUnit(CONFIG_ID, WIDTH, HEIGTH); adUnit.activatePrebidImpressionTracker(true); From 2d4d8b29c068c7e9459ed3322717d45c82edd509 Mon Sep 17 00:00:00 2001 From: Olena Stepaniuk Date: Fri, 15 Nov 2024 13:24:31 +0200 Subject: [PATCH 3/7] doc: add ios impression tracking section --- .../ios-sdk-integration-gam-original-api.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 391385004e..5f92eb0188 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 @@ -41,6 +41,25 @@ This section describes the integration details for different ad formats. In each {% include mobile/adunit-config-ios.md %} +### Impression tracking + +The SDK supports the native impression tracking. It triggers the `burl` impression URL. It tracks the visibility of view and trigger the event when the view is on the screen and at least 1x1 px in size. + +For activation for the banner ad units you should use `fetchDemand()` with the ad view parameter (f.e. GAMBannerView): + +```swift +adUnit.fetchDemand(adObject: gamRequest, adView: gamBanner) { [weak self] resultCode in + // ... +} +``` + +For activation for the interstitial ad unit you should set `activatePrebidImpressionTracker` flag: + +```swift +let adUnit = InterstitialAdUnit(configId: CONFIG_ID, minWidthPerc: WIDTH_PERC, minHeightPerc: HEIGTH_PERC) +adUnit.activatePrebidImpressionTracker = true +``` + ## Further Reading - [Prebid Mobile Overview](/prebid-mobile/prebid-mobile.html) From 1f9d33773c93ac94a7ba47cff0ffe112a83aa31e Mon Sep 17 00:00:00 2001 From: Yuriy Velichko Date: Wed, 20 Nov 2024 10:17:44 +0200 Subject: [PATCH 4/7] Update android-sdk-integration-gam-original-api.md doc: update Android section --- .../android-sdk-integration-gam-original-api.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 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 a010f99d02..9153a32b69 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 @@ -43,21 +43,26 @@ This section describes the integration details for different ad formats. In each ### Impression tracking -The SDK supports the native impression tracking. It triggers the `burl` impression URL. It tracks the visibility of view and trigger the event when the view is on the screen and at least 1x1 px in size. +In the Bidding Only integration scenario, PUC is responsible for tracking events for banner ads, like `burl`, `imp`, and `win`. The disadvantage of this approach is that PUC doesn't have reliable information about the viewability of the WebView. As a result, impression tracking happens at the rendering stage of the ad. Or, if MRAID is supported, once the `viewableChange` event is fired. It leads to big discrepancies since the "1 pixel in view" requirement is not met. -For activation for the banner ad units you should use `fetchDemand()` with the ad view parameter (f.e. AdManagerAdView): +Starting with version `2.4.0`, Prebid SDK introduced the API to track the viewability of the ad and track impression event, respectively. + +To activate impression tracking for the banner ad unit - use the `activatePrebidImpressionTracker(adView)` method. The `adView` parameter should be an instance of AdManagerAdView: ```java -adUnit.fetchDemand(builder, adView, resultCode -> { ... }) +adUnit.activatePrebidImpressionTracker(adView) +adUnit.fetchDemand(builder, resultCode -> { ... }) ``` -For activation for the interstitial ad unit you should set `activatePrebidImpressionTracker()` flag: +For activation for the interstitial ad unit, you should set `activatePrebidImpressionTracker()` flag: ```java Interstitial adUnit = InterstitialAdUnit(CONFIG_ID, WIDTH, HEIGTH); adUnit.activatePrebidImpressionTracker(true); ``` +After the invocation of `activatePrebidImpressionTracker(),` the Prebid SDK will start analyzing the View Hierarchy and track the viewability of the ad view. Once the ad view is viewable for the user for at least 1 pixel for 1 second, the SDK will track an impression event for the presented ad. The SDK will stop analyzing the View Hierarchy once the caller object of `activatePrebidImpressionTracker()` is destroyed. + ## Further Reading - [Prebid Mobile Overview](/prebid-mobile/prebid-mobile.html) From 555e8e1c3ead6172e16d16c2bf45a0c0887ba28d Mon Sep 17 00:00:00 2001 From: Yuriy Velichko Date: Wed, 20 Nov 2024 10:19:56 +0200 Subject: [PATCH 5/7] Update ios-sdk-integration-gam-original-api.md doc: update iOS DOC --- .../ios/ios-sdk-integration-gam-original-api.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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 5f92eb0188..090a4123fa 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 @@ -43,23 +43,28 @@ This section describes the integration details for different ad formats. In each ### Impression tracking -The SDK supports the native impression tracking. It triggers the `burl` impression URL. It tracks the visibility of view and trigger the event when the view is on the screen and at least 1x1 px in size. +In the Bidding Only integration scenario, PUC is responsible for tracking events for banner ads, like `burl`, `imp`, and `win`. The disadvantage of this approach is that PUC doesn't have reliable information about the viewability of the WebView. As a result, impression tracking happens at the rendering stage of the ad. Or, if MRAID is supported, once the `viewableChange` event is fired. It leads to big discrepancies since the "1 pixel in view" requirement is not met. -For activation for the banner ad units you should use `fetchDemand()` with the ad view parameter (f.e. GAMBannerView): +Starting with version `2.4.0`, Prebid SDK introduced the API to track the viewability of the ad and track impression event, respectively. + +To activate impression tracking for the banner ad unit - use the `activatePrebidImpressionTracker(adView)` method. The `adView` parameter should be an instance of AdManagerAdView: ```swift +adUnit.activatePrebidImpressionTracker(adView: gamBanner) adUnit.fetchDemand(adObject: gamRequest, adView: gamBanner) { [weak self] resultCode in // ... } ``` -For activation for the interstitial ad unit you should set `activatePrebidImpressionTracker` flag: +For activation for the interstitial ad unit, you should set `activatePrebidImpressionTracker()` flag: ```swift let adUnit = InterstitialAdUnit(configId: CONFIG_ID, minWidthPerc: WIDTH_PERC, minHeightPerc: HEIGTH_PERC) -adUnit.activatePrebidImpressionTracker = true +adUnit.activatePrebidImpressionTracker() ``` +After the invocation of `activatePrebidImpressionTracker(),` the Prebid SDK will start analyzing the View Hierarchy and track the viewability of the ad view. Once the ad view is viewable for the user for at least 1 pixel for 1 second, the SDK will track an impression event for the presented ad. The SDK will stop analyzing the View Hierarchy once the caller object of `activatePrebidImpressionTracker()` is destroyed. + ## Further Reading - [Prebid Mobile Overview](/prebid-mobile/prebid-mobile.html) From a7fb3f39eba361d4563887ae0e84b4374734e77e Mon Sep 17 00:00:00 2001 From: Olena Stepaniuk Date: Wed, 20 Nov 2024 15:27:40 +0200 Subject: [PATCH 6/7] doc: minor change in ios-sdk-integration-gam-original-api.md --- .../pbm-api/ios/ios-sdk-integration-gam-original-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 090a4123fa..f7b849f3e6 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 @@ -51,7 +51,7 @@ To activate impression tracking for the banner ad unit - use the `activatePrebid ```swift adUnit.activatePrebidImpressionTracker(adView: gamBanner) -adUnit.fetchDemand(adObject: gamRequest, adView: gamBanner) { [weak self] resultCode in +adUnit.fetchDemand(adObject: gamRequest) { [weak self] resultCode in // ... } ``` From 7fed9b8ea29ea5fa4775ce9333e004f34ed0869f Mon Sep 17 00:00:00 2001 From: Yuriy Velichko Date: Thu, 21 Nov 2024 10:37:39 +0200 Subject: [PATCH 7/7] Update android-sdk-integration-gam-original-api.md doc: small change --- .../pbm-api/android/android-sdk-integration-gam-original-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 9153a32b69..7d2df6902c 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 @@ -58,7 +58,7 @@ For activation for the interstitial ad unit, you should set `activatePrebidImpre ```java Interstitial adUnit = InterstitialAdUnit(CONFIG_ID, WIDTH, HEIGTH); -adUnit.activatePrebidImpressionTracker(true); +adUnit.activatePrebidImpressionTracker(); ``` After the invocation of `activatePrebidImpressionTracker(),` the Prebid SDK will start analyzing the View Hierarchy and track the viewability of the ad view. Once the ad view is viewable for the user for at least 1 pixel for 1 second, the SDK will track an impression event for the presented ad. The SDK will stop analyzing the View Hierarchy once the caller object of `activatePrebidImpressionTracker()` is destroyed.