Conversation
- explicit - percentage selection - automatic - Use pbjs.cmd to get later in the pipeline - Auto-configures storage based upon auctionDelay - Controllable via lipid
| if (LI_MODULE_ENABLED) { | ||
| (function () { | ||
| // start liveintent module init and measurement script v1.6 | ||
| const pbjs = (window.pbjs = window.pbjs || { cmd: [] }); |
There was a problem hiding this comment.
Would it be worth making it more explicit that pbjs should be replaced with whatever the global var name is in case it is a custom one?
For example by adding something like
// Replace with a different global name if needed
const prebidGlobalVarName = 'pbjs'
const pbjs = (window[prebidGlobalVarName] = window[prebidGlobalVarName] || { cmd: [] });
| // start liveintent module init and measurement script v1.6 | ||
| const pbjs = (window.pbjs = window.pbjs || { cmd: [] }); | ||
|
|
||
| pbjs.cmd.push(() => { |
There was a problem hiding this comment.
It looks like the script relies on Prebid configuration being present before this function is executed. For example, if
pbjs.que.push(function() {
pbjs.setConfig({...})
}
is executed after line 16 is executed to set the actual Prebid configuration, it will overwrite whatever config has been computed by this script. Do I see it correctly?
| params: Object.assign( | ||
| { | ||
| requestedAttributesOverrides: { | ||
| uid2: true, | ||
| bidswitch: true, | ||
| medianet: true, | ||
| magnite: true, | ||
| pubmatic: true, | ||
| index: true, | ||
| openx: true, | ||
| }, | ||
| }, | ||
| window.liModule.params |
There was a problem hiding this comment.
Is the intention to allow to provide params for configuring the module via a global variable? If so, what is the reason to have the hardcoded config here? Is it a fallback? What happens if it is not the list of IDs the customer wants? Would it make sense to require providing a config explicitly instead?
No description provided.