-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
AdUnit defined native template #10006
Comments
Native rendering currently works only with prebid universal creative - not renderAd. I think the docs say so but maybe not explicitly enough. We have several open issues about improving rendering - with this one I'd like to get rid of most of the inconsistencies between |
@dgirardi I see, thanks for the clarification. We'd rather not use the PUC, so I'll watch the proposal. Any idea on the timeframe? I'm wondering whether to do the bidsBackHandler, figure out how to trigger the event of the ad being rendered (to trigger analytics adapters etc) and rework it once it becomes a feature... or just wait for it for a few weeks. :) |
@EskelCz I can't make any promises, but my best guess is in the order of a few months. |
@dgirardi That's ok, thanks a lot. One question about the workaround though. Is there a way to trigger the |
@EskelCz in your situation I'd probably use the same API that PUC uses, which is based on postMessage. If you craft messages in a particular way you can trigger adRenderSucceded / failed / bidWon and so on. I'm afraid you'll have to do some reading of the codebase though; there's no documentation outside of it since it's not public (but it's likely to remain stable because of how difficult it is for us to push PUC updates). |
@dgirardi One more question if you don't mind, so I don't have to open a new issue for a similar thing: For the direct/custom native rendering I used this postMessage, which works well: I ran into another use case for a custom rendering (rendering without an iframe), this time of a regular banner and I can't figure out how to trigger the same adRenderSucceded event in prebid. { message: 'Prebid Native', adId: winningBid.adId } // fails because regular banner doesn't have .native
{ message: 'Prebid Banner', adId: winningBid.adId } // nothing, doesn't trigger analytics
{ adId: winningBid.adId } // the same thing, doesn't work
{ message: 'Prebid Event', adId: winningBid.adId, event: 'adRenderSucceeded' } // nope Is there some other message that would work? |
Take a look at this PR:
https://github.com/prebid/Prebid.js/pull/9647/files
Esp. "crossDomain.js"; I am out of office currently so I won't get into
more details, but I believe you are asking for something very similar. Good
luck!
…On Wed, Jun 21, 2023, 8:23 AM David Spohr ***@***.***> wrote:
@dgirardi <https://github.com/dgirardi> One more question if you don't
mind, so I don't have to open a new issue for a similar thing:
For the direct/custom native rendering I used this postMessage, which
works well:
{ message: 'Prebid Native', adId: winningBid.adId }
I ran into another use case for a custom rendering (rendering without an
iframe), this time of a regular *banner* and I can't figure out how to
trigger the same adRenderSucceded event in prebid.
I tried these messages:
{ message: 'Prebid Native', adId: winningBid.adId } -- fails because regular banner doesn't have .native
{ message: 'Prebid Banner', adId: winningBid.adId } -- nothing, doesn't trigger analytics
{ adId: winningBid.adId } -- the same thing, doesn't work
Is there some other message that would work?
Thanks a lot.
—
Reply to this email directly, view it on GitHub
<#10006 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACNOLVKD3QSHTQ3IVWN6OZTXML7XLANCNFSM6AAAAAAYQMIHM4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Type of issue
Question
Description
I'm trying to set up native ads, using adUnit defined templates, without a custom renderer
https://docs.prebid.org/prebid/native-implementation.html#42-implementing-an-adunit-defined-template
Using literally this example from the documentation:
https://docs.prebid.org/prebid/native-implementation.html#421-prebidjs-adunit-setup
I'm getting bids from magnite, which have all the native data in
native
key, on the bid response.The issue is, it doesn't have an
ad
key, which means when I render it withpbjs.renderAd
, this means that it fails withError trying to write ad.
, here:Prebid.js/src/prebid.js
Line 583 in 5199712
I don't see where the native template rendering should kick in for this scenario. My template is there (in the mediaTypes.native), native data on the bidResponse is there, but renderAd doesn't seem to be made for that purpose. What am I missing?
Thanks
Expected results
Native ad being rendered
Actual results
MESSAGE: Calling renderAd with adId :7e523379a1127f
ERROR: Error trying to write ad. No ad for bid response id: 7e523379a1127f
Platform details
Mac OS, Chrome
Other information
Prebid 7.39.0
The text was updated successfully, but these errors were encountered: