Skip to content

Send the win notice when a plugin renderer creates an interstitial or rewarded ad - #1028

Merged
mdanylov-sigma merged 1 commit into
masterfrom
fix/1027-plugin-win-notice
Oct 7, 2026
Merged

mdanylov-sigma merged 1 commit into
masterfrom
fix/1027-plugin-win-notice

Conversation

@mdanylov-sigma

@mdanylov-sigma mdanylov-sigma commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #1027

Summary

  • When a third-party plugin renderer creates an interstitial or rewarded controller, PluginRendererFactory.createInterstitialController now sends the bid's win notice through WinNotifier: both Prebid Cache URLs, nurl and ext.prebid.events.win. Prebid's own InterstitialController still sends it in loadAd(), so the factory skips it when it gets one back.
  • BaseInterstitialAdUnit.loadPrebidAd now goes through PluginRendererFactory instead of calling the plugin directly, so InterstitialAdUnit, RewardedAdUnit and the AdMob and MAX adapters share one path. The renderer is resolved the same way as before (the bid response carries the same config instance). As a side effect, the ad unit now falls back to Prebid's renderer when a plugin returns null, as the adapters already do, instead of failing the load.
  • New default method sendsWinNotice() on PrebidMobilePluginRenderer, returning false. A renderer that sends the win notice itself, or whose ad SDK does, returns true, and Prebid skips its own notice:
    • Interstitial and rewarded: the factory does not send it.
    • Banner: DisplayView and MediationBannerView create the view without running WinNotifier first. If that renderer then returns null and the factory falls back to Prebid's banner view, which does not send the notice, the factory sends it.

Notes for reviewers

Test plan

  • PluginRendererFactoryTest: 9 new tests. A plugin's own interstitial controller triggers WinNotifier. Prebid's InterstitialController, the default renderer, the null fallback, and a plugin with sendsWinNotice() == true do not. The banner factory sends nothing when the container already did, and sends for the fallback after an opted-out plugin returns null. preferredRendererSendsWinNotice follows the preferred renderer.
  • MediationBannerViewTest: runs WinNotifier before creating a plugin view, and skips it for an opted-out plugin. DisplayViewTest: skips it for an opted-out plugin.
  • InterstitialAdUnitTest: on a Prebid win with a plugin's own controller, WinNotifier runs and the controller loads the ad.
  • With the factory's notice disabled, exactly the 3 "sends" tests fail.
  • :PrebidMobile-core:testDebugUnitTest: 1449 tests, 1 failure: MraidInternalBrowserActionTest.handleInternalBrowserActionFollowUrlSuccessAndIsMraid_StartActionViewActivity, which also fails on master (it expects no intent flags in debug builds, but the debug unit-test build gets FLAG_ACTIVITY_NEW_TASK).
  • :PrebidMobile-admobAdapters:testDebugUnitTest: 54 tests, 0 failures. :PrebidMobile-maxAdapters:testDebugUnitTest: 122 tests, 0 failures.

🤖 Generated with Claude Code

… rewarded ad (#1027)

PluginRendererFactory.createInterstitialController now runs WinNotifier when a third-party plugin renderer returns its own controller. Prebid's InterstitialController still sends the notice in loadAd(), so the factory skips it. BaseInterstitialAdUnit.loadPrebidAd now goes through the factory, so the ad units and the AdMob and MAX adapters share one path.

A new default method sendsWinNotice() on PrebidMobilePluginRenderer lets a renderer that sends the win notice itself opt out, for banners as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@YuriyVelichkoPI YuriyVelichkoPI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mdanylov-sigma
mdanylov-sigma merged commit d828059 into master Oct 7, 2026
6 checks passed
@mdanylov-sigma
mdanylov-sigma deleted the fix/1027-plugin-win-notice branch October 7, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants