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

RTD Modules: segments added to a request persist into additional requests #9141

Closed
patmmccann opened this issue Oct 21, 2022 · 10 comments · Fixed by #9355
Closed

RTD Modules: segments added to a request persist into additional requests #9141

patmmccann opened this issue Oct 21, 2022 · 10 comments · Fixed by #9355
Assignees
Labels

Comments

@patmmccann
Copy link
Collaborator

patmmccann commented Oct 21, 2022

Type of issue

Bug

Description

JW rtd module adding segments to ortb2 persist beyond the auction they were added on. The JW RTD module should only add segments to video requests, but when they do, it seems the method they use persists the segments into all subsequent requests.

Steps to reproduce

Examine prebid server outgoing requests for AdThrive_Content_1 unit

Test page

https://cafedelites.com/chicken-tikka-masala/

Expected results

JW segments added to the video request

Actual results

JW segments added to the video request and all other subsequent auctions

@patmmccann patmmccann added the bug label Oct 21, 2022
@patmmccann patmmccann moved this from Triage to Ready for Dev in Prebid.js Tactical Issues table Oct 21, 2022
@patmmccann patmmccann changed the title JW RTD Module: video segments added to outstream units RTD Modules: segments added to a request persist Oct 21, 2022
@patmmccann patmmccann changed the title RTD Modules: segments added to a request persist RTD Modules: segments added to a request persist into additional requests Oct 21, 2022
@karimMourra
Copy link
Collaborator

@patmmccann thanks for submitting this. Could you please provide more detailed reproduction steps ? On my end i've scrolled down and interacted with the video but I don't see a AdThrive_Content_1 ad unit, i see a AdThrive_Content_1_Desktop banner ad unit.
Screen Shot 2022-10-21 at 4 48 22 PM

Is this the right ad unit ?

@patmmccann
Copy link
Collaborator Author

Can you look for requests that occur after the video request?

@dgirardi
Copy link
Collaborator

@patmmccann, I am also trying to reproduce and asking for better steps. That page makes a ton of requests and I am having trouble finding a video request for AdThrive_Content_1

@karimMourra
Copy link
Collaborator

karimMourra commented Oct 26, 2022

@dgirardi my guess is that since the JW RTD module is writing to ortb2Fragments.global, those changes are persisting after the auction. Should the JW RTD module have to clean the ortb2Fragments.global after the auction ?

@dgirardi
Copy link
Collaborator

@karimMourra no, ortb2Fragments is generated anew each auction - or at least it should.

@patmmccann
Copy link
Collaborator Author

@mmoschovas can you please full steps to reproduce?

@patmmccann patmmccann moved this from Ready for Dev to Needs Req in Prebid.js Tactical Issues table Nov 1, 2022
@mmoschovas
Copy link
Contributor

mmoschovas commented Dec 13, 2022

Just to clarify, the issue impacts any ad unit after the JW targeting is applied. For example, we only apply the adunit targeting to the instream video unit but the segments are applied globally to every ad unit regardless if it has video mediatype or not. Here is an example that shows the Footer ad unit configuration (via the console) and the jw segments that are being applied to the network requests. The initial footer request (prior to the video request) does not contain the targeting. But once the targeting is applied for the instream request, it continues to persist for all ad units.

Screen Shot 2022-10-28 at 4 07 34 PM

@patmmccann patmmccann moved this from Needs Req to Ready for Dev in Prebid.js Tactical Issues table Dec 13, 2022
@dgirardi
Copy link
Collaborator

dgirardi commented Dec 15, 2022

It would help to have steps to reproduce. That page is very busy and serves me a different bundle on each load which makes things really hard to debug.

@karimMourra, I suspect the issue might be that the jwplayer segments are added to ortb2Fragments.global if any adUnit in the request is related to a player:

const jwTargeting = extractPublisherParams(adUnit, fpdFallback);

But, if the pub does:

pbjs.addAdUnits([{code: 'video'}])
pbjs.requestBids({adUnitCodes: ['video']});
pbjs.addAdUnits([{code: 'banner'}]);
pbjs.requestBids({adUnitCodes: ['banner']})

then in the request you'd get both ad units, even though the pub does not intend to use the video one; you would need to filter them using request.adUnitCodes.

It may be better for core to do the filtering, but I'm not completely sure that it wouldn't break some other rtd modules - it's a larger project to double check that.

@dgirardi
Copy link
Collaborator

Discussed this with @bretg - we could not think of a reason why RTD modules should have access to adunits that have been added (through addAdUnits) but are not included in the current auction; we think it's OK to modify the RTD module API so that the adUnits and adUnitCodes they get as input only contain those adUnits that are relevant. It's still technically an API change though; what do you think @patmmccann - safe enough, or should it wait for version 8?

@patmmccann
Copy link
Collaborator Author

As discussed, the fix is not breaking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
4 participants