From 555e8e1c3ead6172e16d16c2bf45a0c0887ba28d Mon Sep 17 00:00:00 2001 From: Yuriy Velichko Date: Wed, 20 Nov 2024 10:19:56 +0200 Subject: [PATCH] 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)