Prebid Core: use gptSlot.updateTargetingFromMap than gptSlot.setTargeting in targeting.resetPresetTargeting#7552
Conversation
|
Hello @ChrisHuie , |
|
Thank you @ChrisHuie , |
|
@osazos can you please review the PR? |
|
Hello @patmmccann , |
|
I defer to @r-schweitzer on this one, as he has done more research on it than myself |
|
Hi @r-schweitzer , |
src/targeting.js
Outdated
| } | ||
| }); | ||
| // reset only registered adunits | ||
| adUnits.forEach(function(unit) { |
There was a problem hiding this comment.
I realize the code was previously like this but since we're updating here do we want to be consistent and use arrow functions? Is there a reason we wouldn't want to use the arrow function here and in the other instances where we're updating?
There was a problem hiding this comment.
@r-schweitzer , changed the functions to arrow functions 👍
There was a problem hiding this comment.
Hey sorry I didn't get back to you on this sooner. I wasn't working by the time you responded and was out yesterday. I see it got merged and reviewed though 👍
|
Thank you @ChrisHuie and @osazos ! |
…ting in targeting.resetPresetTargeting (prebid#7552) * added support for pubcommon, digitrust, id5id * added support for IdentityLink * changed the source for id5 * added unit test cases * changed source param for identityLink * import utils functions as needed and not the whole module * import utils functions as needed and not the whole module * import utils functions as needed and not the whole module * Revert "import utils functions as needed and not the whole module" This reverts commit bc6c9f6. * Revert "import utils functions as needed and not the whole module" This reverts commit ef500ab. * Revert "import utils functions as needed and not the whole module" This reverts commit 7e3fa3f. * use updateTargetingFromMap than setTargeting in targeting.resetPresetTargeting * indent * using arrow functions
Type of change
Description of change
gptSlot.updateTargetingFromMapcan be used to set multiple targeting key-value pairs using an object.It is better than calling
gptSlot.setTargetingmultiple times.This PR makes change in targeting.resetPresetTargeting to use
gptSlot.updateTargetingFromMapRelates to #7416 and #7453