You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BidViewability: Refactored the init function (#13141)
* Refactored the init function
* Added new line for linting error
* removed the listener before firing the handler
* Removed event listener when module is disabled
---------
Co-authored-by: pm-azhar-mulla <[email protected]>
logWarn(`bid details could not be found for ${slot.getSlotElementId()}, probable reasons: a non-prebid bid is served OR check the prebid.AdUnit.code to GPT.AdSlot relation.`);
// do nothing if module-config.enabled is not set to true
86
-
// this way we are adding a way for bidders to know (using pbjs.getConfig('bidViewability').enabled === true) whether this module is added in build and is enabled
87
-
if(globalModuleConfig[CONFIG_ENABLED]!==true){
88
-
return;
89
-
}
90
-
// add the GPT event listener
91
-
window.googletag=window.googletag||{};
92
-
window.googletag.cmd=window.googletag.cmd||[];
82
+
consthandleSetConfig=(config)=>{
83
+
constglobalModuleConfig=config||{};
84
+
window.googletag=window.googletag||{};
85
+
window.googletag.cmd=window.googletag.cmd||[];
86
+
87
+
// do nothing if module-config.enabled is not set to true
88
+
// this way we are adding a way for bidders to know (using pbjs.getConfig('bidViewability').enabled === true) whether this module is added in build and is enabled
0 commit comments