Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bidder specific renderer #5375

Closed
MarcelloVertemati opened this issue Jun 15, 2020 · 12 comments
Closed

Bidder specific renderer #5375

MarcelloVertemati opened this issue Jun 15, 2020 · 12 comments

Comments

@MarcelloVertemati
Copy link

Hello. I am new here, but I have an issue and I read some related articles about this: 4312, 2668, 1924 and a few others.

My situation is: I need to put together 3 bidders in an outstream format: rubicon, appnexus and teads. Rubicon doesn't have its own renderer, so I need to specify my own. Appnexus have its own renderer, but I can choose between using its renderer, or defining my own. Teads have its renderer, and I can't use my own, I am forced to use theirs. If I define my own renderer for teads, it won't work.

So, if I define a renderer, rubicon and appnexus work, but teads doesn't. If I don't define a player, appneus and teads work, but rubicon doesn't. The way to make them all work together is by defining a renderer for rubicon only (or rubicon and appnexus), but not for teads. The problem is that the renderer is defined at the adunit level, not the bidder level. It wouldn't be a problem if we could define renderers by bidder level.

My first question is, was this solved, or is it still under development?

I made a test page to show the issue. My test page has 2 parameters for better testing, teste and url.

teste=true uses a test ID from appnexus, it always returns an ad.
teste=false uses a normal appnexus ID. In this case, teads usually bids and wins.
url=true uses my custom renderer.
url=false uses no custom renderer. renderer { url: '' } (empty renderer.url)

This makes for 4 cases:

Test 1: teste=true e url=true: using appnexus test ID and my custom render, I can see appnexus being delivered with my custom renderer:

https://opec.itdg.com.br/opec/teste/teste_prebid/teste-sal.html?teste=true&url=true

Test 2: teste=true e url=false: using appnexus test ID and no custom render, I can see appnexus being delivered with its own renderer:

https://opec.itdg.com.br/opec/teste/teste_prebid/teste-sal.html?teste=true&url=false

Test 3: teste=false e url=false: teads usually wins and works because it uses its own renderer.

https://opec.itdg.com.br/opec/teste/teste_prebid/teste-sal.html?teste=false&url=false

Test 4: teste=false e url=true: teads usually wins, but it doesn't work because I am defining my own renderer.

https://opec.itdg.com.br/opec/teste/teste_prebid/teste-sal.html?teste=false&url=true

If this issue is still under development, I'd like to make a few suggestions:

  1. Define the renderer inside pbjs.bidderSetting

pbjs.bidderSetting = { standard: { renderer: { url: '', render: function (bid) { render function here } } }, rubicon: { renderer: { url: '', render: function (bid) { render function here } } }, etc }

  1. Define the renderer inside the bidders array, as a sibling object to bidder and params.

bidders: [ { bidder: "rubicon", params: { etc }, renderer: { etc } }, { bidder2, etc } ]

My solution for now, as suggested by another member, is defining the same adunit twice. One of the instances have rubicon and appnexus, and the second instance has teads alone. The first instance has a custom renderer, and the second has no renderer.

adUnits = [{ code: 'outstream', mediaTypes: { mediaTypes here } bids: [{ bidder: "rubicon", },{ bidder: "appnexus", }], renderer: { url: 'urlhere', render: function(bid) { function here } } },{ code: 'outstream', mediaTypes: { mediaTypes here } bids: [{ bidder: "teads", }] }]

pbjs.adUnits registers the same adunit twice, but only one AdServer call is made, the key-values seems alright and the adserver answers only once, so it doesn't look like there is any side effects, but still, it would be nice to have this feature.

@mike-chowla
Copy link
Contributor

One option is to have a config flag where the ad unit renderer is only used where a bidder renderer is not present

@patmmccann
Copy link
Collaborator

patmmccann commented Jun 22, 2020

@mike-chowla this is the same as the #2668 proposal

@robertrmartinez
Copy link
Collaborator

@MarcelloVertemati

Yeah this is an interesting use case, and as adapters begin to support outstream more and more this will need to be something we need to support.

We will take this up as a topic in the next Prebid.org meeting.

For now, can you try the following workaround and let me know if it works?

#2668 (comment)

@MarcelloVertemati
Copy link
Author

@mike-chowla , is there a way to automatically tell if a bidder has or doesn't have a renderer? Or I would have to know it beforehand?

@robertrmartinez yes, it works. The format appears twice inside pbjs.adUnits, but apart from that, everything seems to work fine. There is only one adserver call with all keywords from all the bidders. I use sendallbidders, so I am not sure what would happen if I sent only the winner bidder.

@patmmccann
Copy link
Collaborator

I think the problem is line 42 here https://github.com/prebid/Prebid.js/blob/master/src/Renderer.js

@patmmccann
Copy link
Collaborator

patmmccann commented Jun 23, 2020

Perhaps line 118 could be changed to add a config option check? Currently is checks for if the ad unit renderer is defined by: ``` return !!(adUnit && adUnit.renderer && adUnit.renderer.url && adUnit.renderer.render);

@mike-chowla
Copy link
Contributor

@patmmccann I started working on this but haven't had time to finish it and have not been able to get tests working either though I think that's a problem with the tests and not actual code

mike-chowla@d0509f9

@patmmccann
Copy link
Collaborator

@stale
Copy link

stale bot commented Jul 11, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 11, 2020
@patmmccann
Copy link
Collaborator

As a note, this was discussed in both the js and video committees this week and is seen as quite important

@stale stale bot removed the stale label Jul 11, 2020
@stale
Copy link

stale bot commented Jul 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 25, 2020
@stale stale bot closed this as completed Aug 1, 2020
@patmmccann
Copy link
Collaborator

@mike-chowla can we put the feature req flag on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants