Repository navigation
Send the win notice when a plugin renderer creates an interstitial or rewarded ad - #1028
Merged
Merged
Conversation
… 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>
This was referenced Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1027
Summary
PluginRendererFactory.createInterstitialControllernow sends the bid's win notice throughWinNotifier: both Prebid Cache URLs,nurlandext.prebid.events.win. Prebid's ownInterstitialControllerstill sends it inloadAd(), so the factory skips it when it gets one back.BaseInterstitialAdUnit.loadPrebidAdnow goes throughPluginRendererFactoryinstead of calling the plugin directly, soInterstitialAdUnit,RewardedAdUnitand the AdMob and MAX adapters share one path. The renderer is resolved the same way as before (the bid response carries the sameconfiginstance). 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.sendsWinNotice()onPrebidMobilePluginRenderer, returningfalse. A renderer that sends the win notice itself, or whose ad SDK does, returnstrue, and Prebid skips its own notice:DisplayViewandMediationBannerViewcreate the view without runningWinNotifierfirst. 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
InterstitialController.loadAd()as the owner for Prebid's renderer and adds the notice only for plugin controllers. That keeps the change in the factory and the ad unit, and leaves the AdMob, MAX and GAM call sites as they are.nurlto the Teads SDK, which presumably sends it. A plugin like that can now opt out instead of sending the notice twice. Android banners have sent the notice for every plugin since Intent to implement Rendering Delegation on Prebid #507; the flag also lets a plugin opt out there.sendsWinNotice()is a default method, andpreferredRendererSendsWinNoticeis a new public static helper onPluginRendererFactory.Test plan
PluginRendererFactoryTest: 9 new tests. A plugin's own interstitial controller triggersWinNotifier. Prebid'sInterstitialController, the default renderer, the null fallback, and a plugin withsendsWinNotice() == truedo not. The banner factory sends nothing when the container already did, and sends for the fallback after an opted-out plugin returns null.preferredRendererSendsWinNoticefollows the preferred renderer.MediationBannerViewTest: runsWinNotifierbefore 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,WinNotifierruns and the controller loads the ad.: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 getsFLAG_ACTIVITY_NEW_TASK).:PrebidMobile-admobAdapters:testDebugUnitTest: 54 tests, 0 failures.:PrebidMobile-maxAdapters:testDebugUnitTest: 122 tests, 0 failures.🤖 Generated with Claude Code