-
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
clearTargeting #391
Comments
I couldn't find a way to do this, if you provide a clear method for clearing just the Prebid targeting I can make a PR |
The use case you describe is accommodated by Then Are you seeing incorrect behavior for this? |
I'll check and re-open if I see any incorrect behavior. Thanks. |
I am also seeing targeting being lost. I am new to prebid.js so may be doing something wrong. But it looks like |
@brondsem |
We've taken the current simple example (with "instant load") and integrated it to our site. There's a lot of other resources (and ad setup) on our site, but I think the problem comes down to timing in which the I've tried to replicate this in a jsfiddle, but I think part of the problem is all the other resources on our page causing scripts to load slower or in nondeterministic order. I've taken the sample fiddle and made some changes, including adding a 200 ms delay around Perhaps something is needed to synchronize the two queues, similar to how |
Hi, I believe we seeing behaviour related to this too. We use the disableInitialLoad on GPT feature but we also load ads up in groups depending on the device, so we load a leadboard and an mpu in the head as they exist on all devices and then on desktop we might load an additional mpu and a sky ad as they are drawn on screen. In 0.8.1 this behaviour works fine, however in 0.9.2 the leaderboard in failing in renderAd with "ERROR: Error trying to write ad. Cannot find ad by given id : 31fe525abd64c6" and the MPU is not having it's bid parameters passed. I can see the two slots having their key values reset immediately after the additional slots are invoked with pbjs.addAdUnits |
Further to my previous comment this behaviour is coming about as the reset calls here: It appears to me that the behaviour here is slightly presumptive that you would only call requestBids once. If you call it more than once there's no guarantee that previous requests have been completed since pbjs.clearAuction() is called in the bids back callback but the _bidsRequested could be used in a renderAd coming back from DFP at some time in the future. e.g. |
For my issue, I believe this is a regression from bf06c0b as the original reporter mentioned it adds the |
@gramorris @brondsem & @CarsonBanov we'll take a look at your code. |
Thanks Matt, I'll start a new issue |
@brondsem |
Found the issue. The slots are cleared initially if DFP is loaded first with this line here: https://github.com/prebid/Prebid.js/blob/master/src/prebid.js#L110 Fix in the works. |
This is resolved with #415 |
Thanks, latest version from master seems to be working for me. |
@gramorris Did you create a new issue for what you were seeing or did you find a resolution? I'm seeing the same thing in 0.11.0 that you were |
@jalbersmead I didn't in the end as we were going to refactor some of our code to account for it. I'm happy to start on though and be a part of the discussion. |
@jalbersmead |
@mkendall07 @jalbersmead I've tested with 0.11.0 to make sure it's still present as we've experienced it and created an issue |
Due to the recent efforts to enable
refresh
through Prebid this line of code: https://github.com/prebid/Prebid.js/blob/master/src/prebid.js#L110 has been added. The line encapsulates the notion that Prebid should clear existing targeting before re-setting it from the new bids. However, it is too heavy-handed in the case that users are either 1) using code/scripts outside of Prebid for header-bidding or 2) are setting their own custom slot-level targeting. What should actually happen is that Prebid should callclearTargeting("key")
multiple times where"key"
is all of the Prebid targeting KVP. As it exists currently, other non-Prebid targeting will be wiped out!Example: a user sets some targeting
name: adBanner
on their first ad slot. On the firstrefresh
this will be removed by the call toclearTargeting
and that refreshed ad impression will not have the targeting that the publisher expects..cc @mkendall07 @nanek @mmilleruva
The text was updated successfully, but these errors were encountered: