@brndts/brndts-ads 1.14.15 → 1.14.16
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 +16 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -72181,7 +72181,7 @@ var GPT = /*#__PURE__*/ function() {
|
|
72181
72181
|
},
|
72182
72182
|
{
|
72183
72183
|
key: "defineSlot",
|
72184
|
-
value: function defineSlot(slotId, size, containerId) {
|
72184
|
+
value: function defineSlot(slotId, size, containerId, targeting) {
|
72185
72185
|
window.googletag.cmd.push(function() {
|
72186
72186
|
if (window.googletag.pubads().getSlots().some(function(slot) {
|
72187
72187
|
return slot.getSlotElementId() === containerId;
|
@@ -72203,6 +72203,11 @@ var GPT = /*#__PURE__*/ function() {
|
|
72203
72203
|
0
|
72204
72204
|
], []).build();
|
72205
72205
|
mrec1 === null || mrec1 === void 0 ? void 0 : mrec1.defineSizeMapping(mrecmapping);
|
72206
|
+
if (targeting) {
|
72207
|
+
mrec1.setConfig({
|
72208
|
+
targeting: targeting
|
72209
|
+
});
|
72210
|
+
}
|
72206
72211
|
});
|
72207
72212
|
}
|
72208
72213
|
},
|
@@ -72232,7 +72237,6 @@ var GPT = /*#__PURE__*/ function() {
|
|
72232
72237
|
]);
|
72233
72238
|
return GPT;
|
72234
72239
|
}();
|
72235
|
-
var displayedSlots = /* @__PURE__ */ new Set();
|
72236
72240
|
var PrebidGAM = /*#__PURE__*/ function() {
|
72237
72241
|
function _PrebidGAM() {
|
72238
72242
|
_class_call_check(this, _PrebidGAM);
|
@@ -72376,9 +72380,16 @@ var PrebidGAM = /*#__PURE__*/ function() {
|
|
72376
72380
|
var _unitDefinition_mediaTypes_banner;
|
72377
72381
|
sizes = ((_unitDefinition_mediaTypes_banner = unitDefinition.mediaTypes.banner) === null || _unitDefinition_mediaTypes_banner === void 0 ? void 0 : _unitDefinition_mediaTypes_banner.sizes) || [];
|
72378
72382
|
}
|
72383
|
+
var targeting = void 0;
|
72384
|
+
if (unitDefinition.zoneId && options.reviveId) {
|
72385
|
+
targeting = {
|
72386
|
+
brndts_rid: options.reviveId,
|
72387
|
+
brndts_zid: unitDefinition.zoneId
|
72388
|
+
};
|
72389
|
+
}
|
72379
72390
|
GPT.defineSlot("/".concat(gamNetworkId, "/").concat(adName), [
|
72380
72391
|
sizes[0] || []
|
72381
|
-
], "".concat(containerId));
|
72392
|
+
], "".concat(containerId), targeting);
|
72382
72393
|
if (!((_window_pbjs = window.pbjs) === null || _window_pbjs === void 0 ? void 0 : _window_pbjs.adUnits.some(function(defUnit) {
|
72383
72394
|
return "".concat(containerId) === "".concat(defUnit.code);
|
72384
72395
|
}))) {
|
@@ -72430,17 +72441,11 @@ var PrebidGAM = /*#__PURE__*/ function() {
|
|
72430
72441
|
(_window_pbjs = window.pbjs) === null || _window_pbjs === void 0 ? void 0 : _window_pbjs.setTargetingForGPTAsync([
|
72431
72442
|
"".concat(containerId)
|
72432
72443
|
]);
|
72433
|
-
window.googletag.cmd.push(function() {
|
72434
|
-
if (!displayedSlots.has(containerId)) {
|
72435
|
-
window.googletag.display(containerId);
|
72436
|
-
displayedSlots.add(containerId);
|
72437
|
-
}
|
72438
|
-
});
|
72439
72444
|
window.googletag.cmd.push(function() {
|
72440
72445
|
var container = document.createElement("div");
|
72441
72446
|
container.id = containerId;
|
72442
72447
|
var script = document.createElement("script");
|
72443
|
-
script.innerHTML = '\n window.googletag.cmd.push(function() {\n googletag.pubads().refresh(googletag.pubads().getSlots().filter(slot => slot.getSlotElementId() === "'.concat(containerId, '"));\n });');
|
72448
|
+
script.innerHTML = '\n window.googletag.cmd.push(function() {\n googletag.pubads().refresh(googletag.pubads().getSlots().filter(slot => slot.getSlotElementId() === "'.concat(containerId, '"), { changeCorrelator: true });\n });');
|
72444
72449
|
container.appendChild(script);
|
72445
72450
|
callback(container);
|
72446
72451
|
});
|
@@ -73277,6 +73282,7 @@ var StaticAdRegion = /*#__PURE__*/ function(Region) {
|
|
73277
73282
|
_this.content.view.remove();
|
73278
73283
|
_this.content = new StaticRegionContent(_this.id, _this.plane, _this.box, ((_this_deps_config = _this.deps.config) === null || _this_deps_config === void 0 ? void 0 : (_this_deps_config_getAdsConfig_general = _this_deps_config.getAdsConfig().general) === null || _this_deps_config_getAdsConfig_general === void 0 ? void 0 : (_this_deps_config_getAdsConfig_general_debug_mode = _this_deps_config_getAdsConfig_general.debug_mode) === null || _this_deps_config_getAdsConfig_general_debug_mode === void 0 ? void 0 : _this_deps_config_getAdsConfig_general_debug_mode.value) ? _this.regionDescriptor.ctx : void 0);
|
73279
73284
|
_this.container.appendChild(_this.content.view);
|
73285
|
+
_this.container.style.pointerEvents = "all";
|
73280
73286
|
if (_this.deps.provider) {
|
73281
73287
|
_this.content.addContent(_this.deps.provider.contents());
|
73282
73288
|
}
|