-
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
Permutive RTD Module: merge external submodule params #8881
Conversation
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.
j
const customModuleConfig = { params: { acBidders: ['789'], maxSegs: 499 } } | ||
const config = getModuleConfig(customModuleConfig) | ||
|
||
const configMergedInPriorityOrder = mergeDeep(defaultConfig, liftToParams(cachedConfig), liftToParams(permutiveRtdConfig), customModuleConfig) |
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.
you want the configuration coming from window.permutive to override how the publisher configures the module in prebid?
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.
The name is misleading here, the configs are merged in reverse priority order as configs are merged left to right. The priority is,
customModuleConfig
<- set by publisher withpbjs.setConfig
permutiveRtdConfig
<- set by the publisher using Permutive.defaultConfig
Therefore, anything set by the publisher will take priority over what is set within Permutive. I'll add some comments explaining this.
- add docs
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.
thanks!
2958a6c
to
5bbb8b7
Compare
@AntonioGargaro the integration tests don't appear to have ran on this pr. This is usually because the submitter is following a fork of prebid inside of CircleCI instead of the main Prebid project. You should be able to unfollow your fork in CircleCI and that should kick off testing. |
24e6e61
to
c3890f8
Compare
@ChrisHuie Should be running now 👍 |
c3890f8
to
ee1674d
Compare
* fix(permutive-rtd): merge external submodule params * fix(permutive-rtd): use ls storage wrapper
* fix(permutive-rtd): merge external submodule params * fix(permutive-rtd): use ls storage wrapper
Type of change
Description of change
Cohort activation within Permutive's RTD module is failing to be applied with option 1, which let publishers set
acBidders
through Permutive's platform. We require this fix where the RTD module attempts to retrieve this config from LS or our Permutive SDK. This lets publishers modify theirPermutive <-> Prebid
integration without code changes.We read from LS on initialisation in the event that the Permutive SDK has not initialised before the config is required. Every call to retrieve our config will attempt to interact with Permutive's prebid addon which will have this config available in memory, otherwise fallback to cache.
Config Priority
The configuration module is deeply merged in reverse priority order. This means that the highest priority config (
customModuleConfig
) defined by.setConfig
within Prebid will be merged last and overwrite other configurations.Other information
N/A