Skip to content

Plugin renderers: no win notice (nurl, events.win) for interstitial and rewarded #1027

Closed

Description

@chauduyphanvu

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

  1. Register a plugin renderer that supports interstitial, and whose createInterstitialController returns its own controller.
  2. Load an InterstitialAdUnit or RewardedAdUnit with a winning bid that has a nurl and is routed to that plugin. For routing, the bid's ext.prebid.meta.rendererName and rendererVersion must match the plugin, and the plugin must support the format.
  3. The plugin renders the ad, but no request goes to the bid's nurl or events.win.
  4. Do the same with a BannerView. nurl and events.win are 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.loadPrebidAd and in the four AdMob and MAX call sites above. A fix only in loadPrebidAd misses the adapters.
  • WinNotifier is async and can fetch a missing adm first (WinNotifier.java:122-130). Plugin creation and loadAd should run inside its callback, with a destroy guard like MediationBannerView.java:66-68.
  • A simpler option is one owner: move the notice out of Prebid's own InterstitialController (built only at PrebidRenderer.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 registerPlugin replaces 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions