Repository navigation
Description
Describe the bug
When a third-party plugin renderer (PrebidMobilePluginRenderer) renders an interstitial or rewarded ad, Prebid never sends the win notice. The bid's nurl, ext.prebid.events.win and the cache URLs built from hb_cache_* and hb_uuid are not called.
Banners do get it. DisplayView.createBannerAdView runs WinNotifier first and only then asks PluginRendererFactory for the plugin's view (3.4.0 DisplayView.java:80-82; MediationBannerView.java:64-65 does the same). This matches the design in #507.
Fullscreen does not. On the fullscreen path, the only WinNotifier call is inside Prebid's own InterstitialController.loadAd (3.4.0 InterstitialController.java:124-125). BaseInterstitialAdUnit.loadPrebidAd asks the plugin for its own controller and calls that controller's loadAd (BaseInterstitialAdUnit.java:249-260), so Prebid's controller and its win notice never run. This gap has existed since plugin renderers were added in #543. The code is the same in 3.3.1, 3.3.4, 3.4.0 and master.
3.4.0 widens the impact. #946 routes the AdMob and AppLovin MAX fullscreen adapters through PluginRendererFactory (PrebidInterstitialAdapter.java:57, PrebidRewardedAdapter.java:60, MaxInterstitialManager.java:58, MaxRewardedManager.java:64). In 3.3.x they always built Prebid's own InterstitialController, so the win notice was sent on those paths. Now it is not sent when a plugin renders.
To Reproduce
- Register a plugin renderer that supports interstitial, and whose
createInterstitialControllerreturns its own controller. - Load an
InterstitialAdUnitorRewardedAdUnitwith a winning bid that has anurland is routed to that plugin. For routing, the bid'sext.prebid.meta.rendererNameandrendererVersionmust match the plugin, and the plugin must support the format. - The plugin renders the ad, but no request goes to the bid's
nurlorevents.win. - Do the same with a
BannerView.nurlandevents.winare called before the plugin's view is created.
We confirmed this on 3.4.0 with the Chartboost plugin renderer against a mock auction that logs each URL. The banner bid called nurl and events.win. The interstitial and rewarded bids called neither, although both rendered and recorded an impression.
Expected behavior
The win notice does not depend on which renderer draws the ad. Fullscreen should behave like banner: send the win notice once, before the bid goes to a plugin controller.
Some points for a fix:
- The plugin hand-off happens in
BaseInterstitialAdUnit.loadPrebidAdand in the four AdMob and MAX call sites above. A fix only inloadPrebidAdmisses the adapters. WinNotifieris async and can fetch a missingadmfirst (WinNotifier.java:122-130). Plugin creation andloadAdshould run inside its callback, with a destroy guard likeMediationBannerView.java:66-68.- A simpler option is one owner: move the notice out of Prebid's own
InterstitialController(built only atPrebidRenderer.java:87) and send it before any renderer is chosen, as Fix double tracking nurl for banner ads #816 did for banner. This avoids a double fire when Prebid's own renderer draws the ad. - A check on the name "PrebidRenderer" is fragile, because
registerPluginreplaces by name and the factory falls back to the default renderer when a plugin returns null.
Related: #443 (win and imp events in the rendering API), #1026 (another gap for plugin-rendered fullscreen ads).
Smartphone
- Prebid Mobile SDK: 3.4.0 (runtime test); same code in 3.3.1, 3.3.4 and master
- Device: Android emulator, Android 16 (API 36)
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
Send the win notice when a plugin renderer creates an interstitial or…