-
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
Prebid Core: use gptSlot.updateTargetingFromMap than gptSlot.setTargeting in targeting.resetPresetTargeting #7552
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@r-schweitzer , changed the functions to arrow functions 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.updateTargetingFromMap
can be used to set multiple targeting key-value pairs using an object.It is better than calling
gptSlot.setTargeting
multiple times.This PR makes change in targeting.resetPresetTargeting to use
gptSlot.updateTargetingFromMap
Relates to #7416 and #7453