prebid / prebid-mobile-ios

Prebid Mobile SDK for iOS applications
Apache License 2.0
48 stars 93 forks source link

Questions for SKAdNetwork endImpression call #1029

Open jsrofrimfram opened 4 months ago

jsrofrimfram commented 4 months ago

Hello,

According to this line of code here, SKAdNetwork endImpression is being called 5 seconds after startImpression call. According to Apple documentation, endImpression is to be called when the ad is no longer visible to the user. Can this implementation lead to loss of actual duration of ad visibility in reports (endImpression time - startImpression time) ?

https://github.com/prebid/prebid-mobile-ios/blob/44e59f01f9af2e377f46963d87268ea018a511f1/PrebidMobile/PrebidMobileRendering/SkadnEventTracker.swift#L51

jsligh commented 4 months ago

@jsrofrimfram It is coded this way because of the situation in which if there are multiple impressions and endImpression isn't called, a new impression overrides it. Apple's documentation on the subject does seem a bit confusing when looking at https://developer.apple.com/documentation/storekit/skadnetwork/3727304-startimpression.