Prebid.js icon indicating copy to clipboard operation
Prebid.js copied to clipboard

Question about native rendering

Open bjorn-lw opened this issue 3 years ago • 9 comments

Type of issue

Question about native rendering

Description

Several of our customers who run native ads don't use GAM/AppNexus or sometimes not even an ad server at all.

This makes the proposed rendering techniques (https://docs.prebid.org/prebid/native-implementation.html) unnecessary complicated since they often already have existing functionality for rendering native ads via JavaScript from before header bidding when they had direct integrations with Native ad providers.

To simplify setup, we use the existing render functionality in Prebid.js by setting

mediatypes.native.renderer = { url: 'someurl', render: ...renderfunction on customer's site }

which works really well with only minor modifications to the customer's already existing rendering code.

We used to set url to only '//' since the rendering code was already present on site and no external script needed to be loaded, but this seem to have stopped working with https://github.com/prebid/Prebid.js/pull/6422. Now we simply point to a minimal CDN-hosted js file, which works even though it's not really optimal.

So the question(s):

  1. Is this way of rendering native ads something that will continue to be supported by Prebid or are we abusing the renderer functionality and it may break at any time? My main concern is that everywhere, even though this practically works for native, it's only mentioned together with "outstream". In Renderer.js, it explicitly tests for 'mediatypes.video.renderer', but not 'mediatypes.native.renderer'. The Renderer.js moduleCode is also set to "outstream".
  2. If this functionality is OK to continue using, would it be acceptable to make it possible to omit the url parameter if the rendering code is already present/loaded on site?
  3. And finally, if it will continue to be supported it would be nice to also document it.

I could certainly volunteer to do some/all changes required (if any) above, but if it's against prebid's design principles I guess it's not a good idea to start working on it.

bjorn-lw avatar May 04 '21 15:05 bjorn-lw

I would generally agree with you and argue that the custom renderer should be consistently implemented and supported on all mediatypes . I also think it would make sense that if renderer.render provides a function without a renderer.url then prebid should assume that the function is available to prebid from the page.

naegelin avatar May 06 '21 14:05 naegelin

Same issue for us. We are using the renderer for native ads without url.

vlouppe avatar Jun 29 '21 15:06 vlouppe

@bjorn-lw we have been talking about splitting off a sub-committee for native to get more expertise focused on issues like this. Sounds like this would be a +1 for that on learning more how native is actually being used in the wild.

ChrisHuie avatar Aug 02 '21 13:08 ChrisHuie

@guiann you know more about prebid native rendering than I do. Is this a problem you come across also?

ChrisHuie avatar Aug 02 '21 13:08 ChrisHuie

Magnite is currently reviewing the native rendering implementation as well as other native implementation challenges of pbjs and will be submitting a comprehensive proposal for the community to review in the coming weeks. Once submitted this would probably be an opportune time to form a sub-committee if others deem it to be necessary / meaningful .

naegelin avatar Aug 02 '21 14:08 naegelin

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[bot] avatar Jan 08 '22 23:01 stale[bot]

@naegelin curious for an update?

patmmccann avatar Apr 28 '22 18:04 patmmccann

Hey @patmmccann I am no longer with Magnite - I would check with @caitlinwright123

naegelin avatar Apr 29 '22 17:04 naegelin

The src/Renderer.js file is for outstream videos. I do not think this should be permitted. I propose a check that allows this "renderer" only for videos here.

I do think however enabling native to check for a render function is fine, but only when the mediaType is native.

jlustig11 avatar Jul 20 '22 13:07 jlustig11

The src/Renderer.js file is for outstream videos. I do not think this should be permitted. I propose a check that allows this "renderer" only for videos here.

I should mention that we're also using mediaTypes.native.renderer as it simplifies integration on sites a lot and works well with existing prebid line items without having to use special native creatives.

So while it might make sense to add another method to implement the same behavior, I for sure hope that support of mediaTypes.native.renderer isn't "suddenly" dropped.

(apologize if I misunderstood the suggestion)

looks to be solved by https://github.com/prebid/Prebid.js/pull/9769

patmmccann avatar Jul 25 '23 21:07 patmmccann