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

no NURL field in bidResponse #9486

Closed
ahmadlob opened this issue Jan 31, 2023 · 5 comments
Closed

no NURL field in bidResponse #9486

ahmadlob opened this issue Jan 31, 2023 · 5 comments

Comments

@ahmadlob
Copy link
Contributor

Type of issue

There is no dedicated field for passing the nurl in the bidResponse Object.
I passed it anyway although no documentation or guide mentioning it and I need to use it in the onBidWon function.

This is the PR

#9482

@dgirardi
Copy link
Collaborator

Prebid does not have a dedicated field for nurl. The PBS adapter and the ORTB conversion library treat nurl as either bidResponse.adUrl, or as something to be appended to the markup:

if (bidResponse.mediaType === BANNER) {
if (bid.adm && bid.nurl) {
bidResponse.ad = bid.adm;
bidResponse.ad += createPixel(bid.nurl);
} else if (bid.adm) {
bidResponse.ad = bid.adm;
} else if (bid.nurl) {
bidResponse.adUrl = bid.nurl;
}
}

This does not look like great practice, but I am not sure if there's a practical difference between it and what you do in your PR; I believe you would still get the link fetched once your bid wins. @patmmccann ?

@patmmccann
Copy link
Collaborator

patmmccann commented Jan 31, 2023

It's not apparent to me everyone wants to be notified on either of prebid winner vs ad server win with a nurl field. I would assume the latter as line 32 does

@dgirardi
Copy link
Collaborator

Actually, it looks like we are following the spec:

For each bid, the nurl attribute contains the win notice URL. If the bidder wins the impression, the
exchange calls this notice URL to inform the bidder of the win [...] The win notice return or the adm
attribute can be used to serve markup (see Section 4.3).
4.3.1 Markup Served on the Win Notice
In this method, ad markup is returned to the exchange is via the win notice. In this case, the response
body of the win notice call (i.e., invoking the bid.nurl attribute) contains the ad markup and only the
ad markup; there must be no other structured data in the response body.

For banner at least, it looks to me like appending nurl to the markup would be equivalent to triggering it from onBidWon. native has its own separate impression tracking mechanism. There's a gap for video (we treat nurl as vastUrl, which does not sound quite correct), but have more trouble figuring out video bid winners in general.

@ahmadlob
Copy link
Contributor Author

@dgirardi yes, the fetch is working for my PR. Just to make sure - what is the best practice: what I did in the PR (adding nurl anyway and calling it later) or to override theadUrlas the conversion library ?

@dgirardi
Copy link
Collaborator

If your adapter never uses nurl to serve the ad markup, they should be equivalent. I personally would prefer putting it in the markup (like the conversion library does) because there's fewer steps it has to go through for you to get the notice: as soon as the ad is rendered you should see the hit; while with onBidWon the creative frame has to notify Prebid which has to call your adapter, it's more likely for something to go wrong along the way.

@ChrisHuie ChrisHuie moved this from Triage to Needs OP in Prebid.js Tactical Issues table Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants