@brndts/brndts-ads 1.14.9 → 1.14.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -72312,7 +72312,7 @@ var PrebidGAM = /*#__PURE__*/ function() {
|
|
72312
72312
|
key: "configure",
|
72313
72313
|
value: function configure(context, options) {
|
72314
72314
|
var _window_pbjs_que, _window_pbjs;
|
72315
|
-
if (window.
|
72315
|
+
if (typeof window.__tcfapi === "function") {
|
72316
72316
|
var _window___tcfapi, _window, _window___tcfapi1, _window1;
|
72317
72317
|
(_window___tcfapi = (_window = window).__tcfapi) === null || _window___tcfapi === void 0 ? void 0 : _window___tcfapi.call(_window, "getTCData", 2, handleTCFApiEvent);
|
72318
72318
|
(_window___tcfapi1 = (_window1 = window).__tcfapi) === null || _window___tcfapi1 === void 0 ? void 0 : _window___tcfapi1.call(_window1, "addEventListener", 2, handleTCFApiEvent);
|
@@ -72471,6 +72471,16 @@ var PrebidGAM = /*#__PURE__*/ function() {
|
|
72471
72471
|
value: function request(slotId, containerId, callback) {
|
72472
72472
|
var _window_pbjs;
|
72473
72473
|
var PREBID_TIMEOUT = 1e3;
|
72474
|
+
if (!tcf_ready) {
|
72475
|
+
console.warn("TCF not ready, waiting for consent data.");
|
72476
|
+
var container = document.createElement("div");
|
72477
|
+
container.id = containerId;
|
72478
|
+
var script = document.createElement("script");
|
72479
|
+
script.innerHTML = '\n window.googletag.cmd.push(function() {\n googletag.pubads().refresh(googletag.pubads().getSlots().filter(slot => slot.getSlotElementId() === "'.concat(containerId, '"));\n });');
|
72480
|
+
container.appendChild(script);
|
72481
|
+
callback(container);
|
72482
|
+
return;
|
72483
|
+
}
|
72474
72484
|
(_window_pbjs = window.pbjs) === null || _window_pbjs === void 0 ? void 0 : _window_pbjs.que.push(function() {
|
72475
72485
|
var _window_pbjs;
|
72476
72486
|
(_window_pbjs = window.pbjs) === null || _window_pbjs === void 0 ? void 0 : _window_pbjs.requestBids({
|