defaultBidderSettings question
Hi,
we've looked for a way how a custom adapter (not shipped with prebid dist) can self register its defaultBidderSettings. The bidmanager @ Line220 offers a great way to register default bidder settings (registerDefaultBidderSetting), but the problem is that i do not know the current bidderCode within the adapter implementation.
In a previous version (https://github.com/prebid/Prebid.js/pull/349/files#diff-48ea3f8ed102d50a45c9bdf68efd3021L33 @ Line33) there was a way to define defaultBidderSettings which were propagated on adapter registration.
What is the best way to self register defaultBidderSettings from a adapter itself?
@derdeka Why doesn't the adapter know it's bidderCode? That would be the way to do it...
Our publishers register our prebid adapter programmatically with pbjs.registerBidAdapter(bidderImpl, bidderCode) which registers the adapter in adaptermanager with the given name (which we are not aware of).
How do we get the bidderCode within the adapter implementation to set our defaultBidderSettings? Before Refactoring in [PR349](https://github.com/prebid/Prebid.js/pull/349/files#diff-48ea3f8ed102d50a45c9bdf68efd3021L33 @ Line33) it was not neccessary to know the adapters bidderCode because the defaultBidderSettings were propagated automatically on bidder registration.
@mkendall07 Do you suggest to iterate through the adaptermanager's bidderRegistry to find our own adapter? Or is there a alternative/direct way to get the bidder's name(s)?
@derdeka I see what you mean. I don't think there is a method to do that now. I'll mark this as a feature to add the bidder identifier to the adapter registered externally.
@jaiminpanchal27 Does registering a bidder adapter at runtime work in prebid 1.0?
No, $$PREBID_GLOBAL$$.registerBidAdapter needs small update to support that. It seems one line change.
Closing this as the way going forward would be to include your adapter the prebid repo. 1.0 will not support runtime additions of adapters.