Diff
checker
文本
文本
圖像
文檔
Excel
文件夾
Legal
Enterprise
桌面版
定價
登入
下載 Diffchecker 桌面版
比較文本
尋找兩個文字檔案之間的差異
工具
歷史
即時編輯器
隱藏空白變更
摺疊未變更行
關閉換行
檢視
拆分
統一
比對精度
智能
單詞
字符
文字樣式
變更外觀
語法突出顯示
選擇語法
忽略
文字轉換
前往第一個差異
編輯輸入
Diffchecker Desktop
執行Diffchecker最安全的方式。取得Diffchecker桌面應用程式:您的差異永遠不會離開您的電腦!
取得桌面版
ad-scripts.js
建立於
5 年前
差異永不過期
清除
匯出
分享
解釋
636 刪除
行
總計
刪除
字符
總計
刪除
要繼續使用此功能,請升級到
Diff
checker
Pro
查看價格
845 行
全部複製
446 新增
行
總計
新增
字符
總計
新增
要繼續使用此功能,請升級到
Diff
checker
Pro
查看價格
806 行
全部複製
複製
已複製
複製
已複製
//I
nterstitial
ads
var billboard1, billboard2, billboard3, skyscraper1, skyscraper2, MPU1, MPU2, MPU3, leaderboard1, leaderboard2, stickyFooter, i
nterstitial
Slot;
window.googletag = window.googletag || {
window.googletag = window.googletag || {
cmd: [] };
cmd: []
googletag.cmd.push(function () {
};
//Setting up responsive ads size mapping
var interstitialSlot, staticSlot;
var billboardSizes = googletag.sizeMapping()
googletag.cmd.push(function() {
.addSize([992, 0], [[970, 90], [970, 250], [728, 90]]) //desktop
.addSize([768, 0], [[728, 90], [468, 60]]) //tablet
.addSize([320, 0], [[320, 50], [320, 100], [300, 50]]) //mobile
Text moved from lines 710-743
.addSize([0, 0], [])
.build();
var skyscraperSizes = googletag.sizeMapping()
.addSize([768, 0], [
[300, 600],
[160, 600],
[120, 600]
]) //desktop & tablet
.build();
var rectangleSizes = googletag.sizeMapping()
.addSize([768, 0], [
[300, 250],
[336, 280],
[250, 250],
[200, 200]
]) //desktop & tablet
.addSize([320, 0], [
[300, 250],
[250, 250],
[200, 200]
]) //mobile
.addSize([0, 0], [])
.build();
var leaderboardSizes = googletag.sizeMapping()
.addSize([768, 0], [
[728, 90],
[468, 60]
]) //desktop & tablet
.addSize([320, 0], [
[320, 50],
[320, 100]
]) //mobile
.addSize([0, 0], [])
.build();
Text moved from lines 745-793
//Responsive Billboard slots initialization
billboard1 = googletag.defineSlot("/22367406785/billboard1", [728, 90], "billboard-1")
.defineSizeMapping(billboardSizes)
.setTargeting('pos', ['billboard1'])
.addService(googletag.pubads());
billboard2 = googletag.defineSlot("/22367406785/billboard2", [728, 90], "billboard-2")
.defineSizeMapping(billboardSizes)
.setTargeting('pos', ['billboard2'])
.addService(googletag.pubads());
billboard3 = googletag.defineSlot("/22367406785/billboard3", [728, 90], "billboard-3")
.defineSizeMapping(billboardSizes)
.setTargeting('pos', ['billboard3'])
.addService(googletag.pubads());
//Responsive Skyscraper slots initialization
skyscraper1 = googletag.defineSlot("/22367406785/skyscraper1", [160, 600], "skyscraper-1")
.defineSizeMapping(skyscraperSizes)
.setTargeting('pos', ['skyscraper1'])
.addService(googletag.pubads());
skyscraper2 = googletag.defineSlot("/22367406785/skyscraper2", [160, 600], "skyscraper-2")
.defineSizeMapping(skyscraperSizes)
.setTargeting('pos', ['skyscraper2'])
.addService(googletag.pubads());
//Responsive MPU slots initialization
MPU1 = googletag.defineSlot("/22367406785/MPU1", [300, 250], "MPU-1")
.defineSizeMapping(rectangleSizes)
.setTargeting('pos', ['MPU1'])
.addService(googletag.pubads());
MPU2 = googletag.defineSlot("/22367406785/MPU2", [300, 250], "MPU-2")
.defineSizeMapping(rectangleSizes)
.setTargeting('pos', ['MPU2'])
.addService(googletag.pubads());
MPU3 = googletag.defineSlot("/22367406785/MPU3", [300, 250], "MPU-3")
.defineSizeMapping(rectangleSizes)
.setTargeting('pos', ['MPU3'])
.addService(googletag.pubads());
//Responsive Leaderboard slots initialization
leaderboard1 = googletag.defineSlot("/22367406785/leaderboard1", [320, 50], "leaderboard-1")
.defineSizeMapping(leaderboardSizes)
.setTargeting('pos', ['leaderboard1'])
.addService(googletag.pubads());
leaderboard2 = googletag.defineSlot("/22367406785/leaderboard2", [320, 50], "leaderboard-2")
.defineSizeMapping(leaderboardSizes)
.setTargeting('pos', ['leaderboard2'])
.addService(googletag.pubads());
//Responsive sticky footer slot initialization
stickyFooter = googletag.defineSlot("/22367406785/sticky-footer", [320, 50], "sticky-footer")
.defineSizeMapping(leaderboardSizes)
.setTargeting('pos', ['sticky-footer'])
.addService(googletag.pubads());
interstitialSlot = googletag.defineOutOfPageSlot('/22367406785/adi-interstitial', googletag.enums.OutOfPageFormat.INTERSTITIAL);
interstitialSlot = googletag.defineOutOfPageSlot('/22367406785/adi-interstitial', googletag.enums.OutOfPageFormat.INTERSTITIAL);
if (interstitialSlot) {
if (interstitialSlot) {
interstitialSlot.setTargeting('site', ['usanewstoday.club']).addService(googletag.pubads());
interstitialSlot.setTargeting('site', ['usanewstoday.club']).addService(googletag.pubads());
複製
已複製
複製
已複製
googletag.pubads().addEventListener('slotOnload', function(event) {});
}
}
複製
已複製
複製
已複製
Text moved with changes from lines 794-808 (98.4% similarity)
//Display calls for the initialized slots
window.addEventListener('load', function () {
googletag.display('billboard-1');
googletag.display('billboard-2');
googletag.display('billboard-3');
googletag.display('skyscraper-1');
googletag.display('skyscraper-2');
googletag.display('MPU-1');
googletag.display('MPU-2');
googletag.display('MPU-3');
googletag.display('leaderboard-1');
googletag.display('leaderboard-2');
googletag.display('sticky-footer');
});
//Lazy Load Removed
// The code which implements GPT+Prebid refresh functionality
Text moved with changes from lines 818-832 (97.4% similarity)
var SECONDS_TO_WAIT_AFTER_VIEWABILITY = 30; //sets the refresh interval in seconds
googletag.pubads().addEventListener("impressionViewable", function (e) {
var a = e.slot; // GPT slot
var pa = adUnits.find(u => u.code === a.getSlotElementId()); // Prebid ad unit which complements a GPT slot
setTimeout((function () {
if (pa !== undefined) {
refreshBid(a, pa);
} else {
googletag.pubads().refresh([a]);
}
}), SECONDS_TO_WAIT_AFTER_VIEWABILITY * 1000);
});
googletag.pubads().setTargeting('site', 'usanewstoday.club');
googletag.pubads().collapseEmptyDivs();
googletag.pubads().disableInitialLoad();
googletag.enableServices();
googletag.enableServices();
});
});
複製
已複製
複製
已複製
googletag.cmd.push(function() {
googletag.display(interstitialSlot);
});
//Adds default css for ad slots
//Adds default css for ad slots
var css = '.ads {text-align: center; padding-top: 10px; padding-bottom: 5px;}',
var css = '.ads {text-align: center; padding-top: 10px; padding-bottom: 5px;}',
head = document.head || document.getElementsByTagName('head')[0],
head = document.head || document.getElementsByTagName('head')[0],
style = document.createElement('style');
style = document.createElement('style');
if (style.styleSheet) {
if (style.styleSheet) {
// This is required for IE8 and below.
// This is required for IE8 and below.
style.styleSheet.cssText = css;
style.styleSheet.cssText = css;
} else {
} else {
style.appendChild(document.createTextNode(css));
style.appendChild(document.createTextNode(css));
}
}
head.appendChild(style);
head.appendChild(style);
//Adds AdsStar.In link to a slot
//Adds AdsStar.In link to a slot
複製
已複製
複製
已複製
window.addEventListener("load", function
() {
window.addEventListener("load", function
() {
var adSlot = document.getElementsByClassName("ads-star");
var adSlot = document.getElementsByClassName("ads-star");
var adSlotLength = adSlot.length;
var adSlotLength = adSlot.length;
for (var i = 0; i < adSlotLength; i++) {
for (var i = 0; i < adSlotLength; i++) {
adSlot[i].style.cssText = "z-index: 9999;display: inline-block; width: 100%; text-align: center; padding-bottom: 10px;"
adSlot[i].style.cssText = "z-index: 9999;display: inline-block; width: 100%; text-align: center; padding-bottom: 10px;"
var adsLink = document.createElement("a");
var adsLink = document.createElement("a");
adSlot[i].appendChild(adsLink);
adSlot[i].appendChild(adsLink);
adsLink.style.cssText = "text-align: right; clear: both; text-decoration: none; color:black; font-size: 10px; font-family: Tahoma;"
adsLink.style.cssText = "text-align: right; clear: both; text-decoration: none; color:black; font-size: 10px; font-family: Tahoma;"
adsLink.href = 'https://adsstar.in';
adsLink.href = 'https://adsstar.in';
var text = document.createTextNode("Powered by AdsStar");
var text = document.createTextNode("Powered by AdsStar");
adsLink.appendChild(text);
adsLink.appendChild(text);
}
}
});
});
//Adds styles for Sticky Footer (Banner)
//Adds styles for Sticky Footer (Banner)
var banner = '.ad-sticky-banner {display: inline-block; z-index: 10001 ;}',
var banner = '.ad-sticky-banner {display: inline-block; z-index: 10001 ;}',
head = document.head || document.getElementsByTagName('head')[0],
head = document.head || document.getElementsByTagName('head')[0],
style = document.createElement('style');
style = document.createElement('style');
if (style.styleSheet) {
if (style.styleSheet) {
// This is required for IE8 and below.
// This is required for IE8 and below.
style.styleSheet.cssText = banner;
style.styleSheet.cssText = banner;
} else {
} else {
style.appendChild(document.createTextNode(banner));
style.appendChild(document.createTextNode(banner));
}
}
head.appendChild(style);
head.appendChild(style);
//Adds styles for Sticky Footer (Slot container)
//Adds styles for Sticky Footer (Slot container)
var stickySlot = '.ad-sticky-slot {position: fixed; height: auto; width: 100%; text-align: center; bottom: 0; left: 0; z-index: 9999; background-color: rgba(237,237,237,.7);}',
var stickySlot = '.ad-sticky-slot {position: fixed; height: auto; width: 100%; text-align: center; bottom: 0; left: 0; z-index: 9999; background-color: rgba(237,237,237,.7);}',
head = document.head || document.getElementsByTagName('head')[0],
head = document.head || document.getElementsByTagName('head')[0],
style = document.createElement('style');
style = document.createElement('style');
if (style.styleSheet) {
if (style.styleSheet) {
// This is required for IE8 and below.
// This is required for IE8 and below.
style.styleSheet.cssText = stickySlot;
style.styleSheet.cssText = stickySlot;
} else {
} else {
style.appendChild(document.createTextNode(stickySlot));
style.appendChild(document.createTextNode(stickySlot));
}
}
head.appendChild(style);
head.appendChild(style);
//Adds styles for Sticky Footer (Close button)
//Adds styles for Sticky Footer (Close button)
var stickyButton = '.ad-sticky-close-button {position:absolute; cursor: pointer; width:28px; height:28px; top:-28px; right:0; color: #000; font-weight: bolder; background: rgba(237,237,237, .7); box-shadow:0 -1px 1px 0 rgba(0,0,0,0.2); border:none; border-radius:12px 0 0 0; font-size:20px; font-family: monospace;}',
var stickyButton = '.ad-sticky-close-button {position:absolute; cursor: pointer; width:28px; height:28px; top:-28px; right:0; color: #000; font-weight: bolder; background: rgba(237,237,237, .7); box-shadow:0 -1px 1px 0 rgba(0,0,0,0.2); border:none; border-radius:12px 0 0 0; font-size:20px; font-family: monospace;}',
head = document.head || document.getElementsByTagName('head')[0],
head = document.head || document.getElementsByTagName('head')[0],
style = document.createElement('style');
style = document.createElement('style');
if (style.styleSheet) {
if (style.styleSheet) {
// This is required for IE8 and below.
// This is required for IE8 and below.
style.styleSheet.cssText = stickyButton;
style.styleSheet.cssText = stickyButton;
} else {
} else {
style.appendChild(document.createTextNode(stickyButton));
style.appendChild(document.createTextNode(stickyButton));
}
}
head.appendChild(style);
head.appendChild(style);
//Prebid wrapper
//Prebid wrapper
複製
已複製
複製
已複製
var PREBID_TIMEOUT = 1000;
var PREBID_TIMEOUT = 1000;
var FAILSAFE_TIMEOUT = 2000;
var FAILSAFE_TIMEOUT = 2000;
var adUnits = [{
var adUnits = [{
複製
已複製
複製
已複製
code: "
div-gpt-ad-
billboard-1",
code: "
billboard-1",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[728, 90]
[728, 90]
]
]
}
}
},
labelAny: ["display", "tablet"],
bids: [{
bidder: 'eplanning',
params: {
ci: '49762'
}
}]
},
},
複製
已複製
複製
已複製
{
labelAny: ["display", "tablet"],
code: "div-gpt-ad-
billboard-1",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[320, 50]
}
]
}]
}
},
},
{
labelAny: ["phone"],
code: "
billboard-1",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[320, 50]
}
]
}]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["phone"],
code: "div-gpt-ad-billboard-1",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[320, 100]
}
]
}]
}
},
},
{
labelAny: ["phone"],
code: "billboard-1",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[320, 100]
}
]
}
]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["phone"],
code: "div-gpt-ad-
billboard-2",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[728, 90]
}
]
}]
}
},
},
{
labelAny: ["display", "tablet"],
code: "
billboard-2",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[728, 90]
}
]
}]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["display", "tablet"],
code: "div-gpt-ad-
billboard-2",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[320, 50]
}
]
}]
}
},
},
{
labelAny: ["phone"],
code: "
billboard-2",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[320, 50]
}
]
}]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["phone"],
code: "div-gpt-ad-billboard-2",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[320, 100]
}
]
}]
}
},
},
{
labelAny: ["phone"],
code: "billboard-2",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[320, 100]
}
]
}
]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["phone"],
code: "div-gpt-ad-
billboard-3",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[728, 90]
}
]
}]
}
},
},
{
labelAny: ["display", "tablet"],
code: "
billboard-3",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[728, 90]
}
]
}]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["display", "tablet"],
code: "div-gpt-ad-
billboard-3",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[320, 50]
}
]
}]
}
},
},
{
labelAny: ["phone"],
code: "
billboard-3",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[320, 50]
}
]
}]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["phone"],
code: "div-gpt-ad-billboard-3",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[320, 100]
}
]
}]
}
},
},
{
labelAny: ["phone"],
code: "billboard-3",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[320, 100]
}
]
}
}
]
},
},
複製
已複製
複製
已複製
{
labelAny: ["phone"],
code: "div-gpt-ad-
skyscraper-1",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[300, 600]
}
]
}
}
]
},
},
labelAny: ["display"],
{
bids: [{
code: "
skyscraper-1",
bidder: 'eplanning',
mediaTypes: {
params: {
banner: {
ci: '49762'
sizes: [
}
[300, 600]
}]
]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["display"],
code: "div-gpt-ad-skyscraper-1",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[160, 600]
}
]
}]
}
},
},
{
labelAny: ["display"],
code: "skyscraper-1",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[160, 600]
}
]
}
]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["display"],
code: "div-gpt-ad-skyscraper-1",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[120, 600]
}
]
}]
}
},
},
{
labelAny: ["display"],
code: "skyscraper-1",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[120, 600]
}
]
}
]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["display"],
code: "div-gpt-ad-
skyscraper-2",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[300, 600]
}
]
}]
}
},
},
{
labelAny: ["display", "tablet"],
code: "
skyscraper-2",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[300, 600]
}
]
}]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["display", "tablet"],
code: "div-gpt-ad-
skyscraper-2",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[160, 600]
}
]
}]
}
},
},
{
labelAny: ["display"],
code: "
skyscraper-2",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[160, 600]
}
]
}]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["display"],
code: "div-gpt-ad-skyscraper-2",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[120, 600]
}
]
}]
}
},
},
{
labelAny: ["display"],
code: "skyscraper-2",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[120, 600]
}
]
}
]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["display"
],
code: "div-gpt-ad-MPU-1",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[300, 250]
}
]
}]
}
},
},
{
labelAny: ["display"
, "tablet", "phone"
],
code: "MPU-1",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[300, 250]
}
]
}
]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["display", "tablet", "phone"],
code: "div-gpt-ad-MPU-1",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[336, 280]
}
]
}]
}
},
},
{
labelAny: ["display", "tablet", "phone"],
code: "MPU-1",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[336, 280]
}
]
}
]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["display", "tablet", "phone"],
code: "div-gpt-ad-MPU-2",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[300, 250]
}
]
}]
}
},
},
{
labelAny: ["display", "tablet", "phone"],
code: "MPU-2",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[300, 250]
}
]
}
]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["display", "tablet", "phone"],
code: "div-gpt-ad-MPU-2",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[336, 280]
}
]
}]
}
},
},
{
labelAny: ["display", "tablet", "phone"],
code: "MPU-2",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[336, 280]
}
]
}
]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["display", "tablet", "phone"],
code: "div-gpt-ad-MPU-3",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[300, 250]
}
]
}]
}
},
},
{
labelAny: ["display", "tablet", "phone"],
code: "MPU-3",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[300, 250]
}
]
}
]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["display", "tablet", "phone"],
code: "div-gpt-ad-MPU-3",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[336, 280]
}
]
}]
}
},
},
{
labelAny: ["display", "tablet", "phone"],
code: "MPU-3",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[336, 280]
}
]
}
]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["display", "tablet", "phone"],
code: "div-gpt-ad-MPU-4",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[300, 250]
}
]
}]
}
},
},
{
labelAny: ["display", "tablet", "phone"],
code: "MPU-4",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[300, 250]
}
]
}
]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["display", "tablet", "phone"],
code: "div-gpt-ad-MPU-4",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[336, 280]
}
]
}]
}
},
},
{
labelAny: ["display", "tablet", "phone"],
code: "MPU-4",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[336, 280]
}
]
}
]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["display", "tablet"
, "phone"
],
code: "div-gpt-ad-leaderboard-1",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[728, 90]
}
]
}]
}
},
},
{
labelAny: ["display", "tablet"
],
code: "leaderboard-1",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[728, 90]
}
]
}
]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["display", "tablet"],
code: "div-gpt-ad-
leaderboard-1",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[320, 50]
}
]
}]
}
},
},
{
labelAny: ["phone"],
code: "
leaderboard-1",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[320, 50]
}
]
}]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["phone"],
code: "div-gpt-ad-leaderboard-1",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[320, 100]
}
]
}]
}
},
},
{
labelAny: ["phone"],
code: "leaderboard-1",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[320, 100]
}
]
}
}
]
},
},
複製
已複製
複製
已複製
{
labelAny: ["phone"],
code: "div-gpt-ad-
leaderboard-2",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[728, 90]
}
]
}
}
]
},
},
labelAny: ["display", "tablet"],
{
bids: [{
code: "
leaderboard-2",
bidder: 'eplanning',
mediaTypes: {
params: {
banner: {
ci: '49762'
sizes: [
}
[728, 90]
}]
]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["display", "tablet"],
code: "div-gpt-ad-
leaderboard-2",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[320, 50]
}
]
}]
}
},
},
{
labelAny: ["phone"],
code: "
leaderboard-2",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[320, 50]
}
]
}]
}
},
},
複製
已複製
複製
已複製
{
labelAny: ["phone"],
code: "div-gpt-ad-leaderboard-2",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[320, 100]
}
]
}]
}
},
},
{
labelAny: ["phone"],
code: "leaderboard-2",
bids: [{
mediaTypes: {
bidder: 'eplanning',
banner: {
params: {
sizes: [
ci: '49762'
[320, 100]
}
]
}
]
}
},
},
複製
已複製
複製
已複製
labelAny: ["phone"],
bids: [{
bidder: 'eplanning',
params: {
ci: '49762'
}
}]
},
];
];
const customConfigObject = {
const customConfigObject = {
"buckets": [{
"buckets": [{
"precision": 2, //default is 2 if omitted - means 2.1234 rounded to 2 decimal places = 2.12
"precision": 2, //default is 2 if omitted - means 2.1234 rounded to 2 decimal places = 2.12
"min": 0,
"min": 0,
"max": 1500, //add here the highest price of the created line item in GAM
"max": 1500, //add here the highest price of the created line item in GAM
"increment": 0.75
"increment": 0.75
複製
已複製
複製
已複製
},
]
},
]
};
};
var pbjs = pbjs || {};
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
pbjs.que = pbjs.que || [];
pbjs.setConfig({
pbjs.setConfig({
複製
已複製
複製
已複製
debug: false,
sizeConfig: [{
sizeConfig: [{
mediaQuery: '(min-width: 992px)',
mediaQuery: '(min-width: 992px)',
sizesSupported: [
sizesSupported: [
[970, 250],
[970, 250],
[970, 90],
[970, 90],
[728, 90],
[728, 90],
[300, 250],
[300, 250],
[300, 600],
[300, 600],
[336, 280],
[336, 280],
[160, 600],
[160, 600],
[120, 600],
[120, 600],
[250, 250],
[250, 250],
[200, 200]
[200, 200]
],
],
labels: ["display"]
labels: ["display"]
}, {
}, {
mediaQuery: '(min-width: 768px) and (max-width: 991px)',
mediaQuery: '(min-width: 768px) and (max-width: 991px)',
sizesSupported: [
sizesSupported: [
[728, 90],
[728, 90],
[300, 250],
[300, 250],
[336, 280],
[336, 280],
[160, 600],
[160, 600],
[250, 250],
[250, 250],
[200, 200]
[200, 200]
],
],
labels: ["tablet"]
labels: ["tablet"]
}, {
}, {
mediaQuery: '(min-width: 320px) and (max-width: 767px)',
mediaQuery: '(min-width: 320px) and (max-width: 767px)',
sizesSupported: [
sizesSupported: [
[320, 50],
[320, 50],
[320, 100],
[320, 100],
[300, 250],
[300, 250],
[250, 250],
[250, 250],
[200, 200]
[200, 200]
],
],
labels: ["phone"]
labels: ["phone"]
}],
}],
priceGranularity: 'customConfigObject',
priceGranularity: 'customConfigObject',
userSync: {
userSync: {
iframeEnabled: true
iframeEnabled: true
},
},
"currency": {
"currency": {
"adServerCurrency": "INR",
"adServerCurrency": "INR",
// "granularityMultiplier": 75,
// "granularityMultiplier": 75,
"conversionRateFile": "https://cdn.jsdelivr.net/gh/prebid/currency-file@1/latest.json",
"conversionRateFile": "https://cdn.jsdelivr.net/gh/prebid/currency-file@1/latest.json",
"defaultRates": {
"defaultRates": {
"USD": {
"USD": {
"INR": 75
"INR": 75
}
}
}
}
}
}
});
});
複製
已複製
複製
已複製
pbjs.onEvent('bidWon', function
(data) {
pbjs.onEvent('bidWon', function
(data) {
console.log('==Prebid==', data.bidderCode + ' won the ad server auction for ad unit ' + data.adUnitCode + ' at ' + data.cpm + ' CPM');
console.log('==Prebid==', data.bidderCode + ' won the ad server auction for ad unit ' + data.adUnitCode + ' at ' + data.cpm + ' CPM');
});
});
複製
已複製
複製
已複製
pbjs.que.push(function
() {
pbjs.que.push(function
() {
pbjs.addAdUnits(adUnits);
pbjs.addAdUnits(adUnits);
pbjs.requestBids({
pbjs.requestBids({
bidsBackHandler: initAdserver,
bidsBackHandler: initAdserver,
timeout: PREBID_TIMEOUT
timeout: PREBID_TIMEOUT
});
});
});
});
function initAdserver() {
function initAdserver() {
if (pbjs.initAdserverSet) return;
if (pbjs.initAdserverSet) return;
pbjs.initAdserverSet = true;
pbjs.initAdserverSet = true;
複製
已複製
複製
已複製
googletag.cmd.push(function
() {
googletag.cmd.push(function
() {
pbjs.que.push(function
() {
pbjs.que.push(function
() {
pbjs.setTargetingForGPTAsync();
pbjs.setTargetingForGPTAsync();
googletag.pubads().refresh();
googletag.pubads().refresh();
});
});
});
});
}
}
// GPT+Prebid refresh function
// GPT+Prebid refresh function
function refreshBid(slot, adUnit) {
function refreshBid(slot, adUnit) {
複製
已複製
複製
已複製
pbjs.que.push(function
() {
pbjs.que.push(function
() {
pbjs.addAdUnits([adUnit]);
pbjs.addAdUnits([adUnit]);
pbjs.requestBids({
pbjs.requestBids({
timeout: PREBID_TIMEOUT,
timeout: PREBID_TIMEOUT,
bidsBackHandler: () => {
bidsBackHandler: () => {
複製
已複製
複製
已複製
googletag.cmd.push(function
() {
googletag.cmd.push(function
() {
pbjs.setTargetingForGPTAsync();
pbjs.setTargetingForGPTAsync();
googletag.pubads().refresh([slot]);
googletag.pubads().refresh([slot]);
});
});
}
}
});
});
});
});
}
}
複製
已複製
複製
已複製
setTimeout(function
() {
setTimeout(function
() {
initAdserver();
initAdserver();
}, FAILSAFE_TIMEOUT);
}, FAILSAFE_TIMEOUT);
//End of the Prebid wrapper
//End of the Prebid wrapper
複製
已複製
複製
已複製
//GPT init calls
//GPT init calls
複製
已複製
複製
已複製
window.googletag = window.googletag || {
cmd: []
};
//Variables for ad units to display in the Quize plugin
//Variables for ad units to display in the Quize plugin
複製
已複製
複製
已複製
var billboard1;
var billboard2;
var billboard3;
var skyscraper1;
var skyscraper2;
var MPU1;
var MPU2;
var MPU3;
var leaderboard1;
var leaderboard2;
var stickyFooter;
googletag.cmd.push(function() {
//Setting up responsive ads size mapping
var billboardSizes = googletag.sizeMapping()
.addSize([992, 0], [
[970, 90],
[970, 250],
[728, 90]
]) //desktop
.addSize([768, 0], [
[728, 90],
[468, 60]
]) //tablet
.addSize([320, 0], [
[320, 50],
[320, 100],
[300, 50]
]) //mobile
Text moved to lines 9-42
.addSize([0, 0], [])
.build();
var skyscraperSizes = googletag.sizeMapping()
.addSize([768, 0], [
[300, 600],
[160, 600],
[120, 600]
]) //desktop & tablet
.build();
var rectangleSizes = googletag.sizeMapping()
.addSize([768, 0], [
[300, 250],
[336, 280],
[250, 250],
[200, 200]
]) //desktop & tablet
.addSize([320, 0], [
[300, 250],
[250, 250],
[200, 200]
]) //mobile
.addSize([0, 0], [])
.build();
var leaderboardSizes = googletag.sizeMapping()
.addSize([768, 0], [
[728, 90],
[468, 60]
]) //desktop & tablet
.addSize([320, 0], [
[320, 50],
[320, 100]
]) //mobile
.addSize([0, 0], [])
.build();
var SECONDS_TO_WAIT_AFTER_VIEWABILITY = 30; //sets the refresh interval in seconds
Text moved to lines 43-91
//Responsive Billboard slots initialization
billboard1 = googletag.defineSlot("/22367406785/billboard1", [728, 90], "billboard-1")
.defineSizeMapping(billboardSizes)
.setTargeting('pos', ['billboard1'])
.addService(googletag.pubads());
billboard2 = googletag.defineSlot("/22367406785/billboard2", [728, 90], "billboard-2")
.defineSizeMapping(billboardSizes)
.setTargeting('pos', ['billboard2'])
.addService(googletag.pubads());
billboard3 = googletag.defineSlot("/22367406785/billboard3", [728, 90], "billboard-3")
.defineSizeMapping(billboardSizes)
.setTargeting('pos', ['billboard3'])
.addService(googletag.pubads());
//Responsive Skyscraper slots initialization
skyscraper1 = googletag.defineSlot("/22367406785/skyscraper1", [160, 600], "skyscraper-1")
.defineSizeMapping(skyscraperSizes)
.setTargeting('pos', ['skyscraper1'])
.addService(googletag.pubads());
skyscraper2 = googletag.defineSlot("/22367406785/skyscraper2", [160, 600], "skyscraper-2")
.defineSizeMapping(skyscraperSizes)
.setTargeting('pos', ['skyscraper2'])
.addService(googletag.pubads());
//Responsive MPU slots initialization
MPU1 = googletag.defineSlot("/22367406785/MPU1", [300, 250], "MPU-1")
.defineSizeMapping(rectangleSizes)
.setTargeting('pos', ['MPU1'])
.addService(googletag.pubads());
MPU2 = googletag.defineSlot("/22367406785/MPU2", [300, 250], "MPU-2")
.defineSizeMapping(rectangleSizes)
.setTargeting('pos', ['MPU2'])
.addService(googletag.pubads());
MPU3 = googletag.defineSlot("/22367406785/MPU3", [300, 250], "MPU-3")
.defineSizeMapping(rectangleSizes)
.setTargeting('pos', ['MPU3'])
.addService(googletag.pubads());
//Responsive Leaderboard slots initialization
leaderboard1 = googletag.defineSlot("/22367406785/leaderboard1", [320, 50], "leaderboard-1")
.defineSizeMapping(leaderboardSizes)
.setTargeting('pos', ['leaderboard1'])
.addService(googletag.pubads());
leaderboard2 = googletag.defineSlot("/22367406785/leaderboard2", [320, 50], "leaderboard-2")
.defineSizeMapping(leaderboardSizes)
.setTargeting('pos', ['leaderboard2'])
.addService(googletag.pubads());
//Responsive sticky footer slot initialization
stickyFooter = googletag.defineSlot("/22367406785/sticky-footer", [320, 50], "sticky-footer")
.defineSizeMapping(leaderboardSizes)
.setTargeting('pos', ['sticky-footer'])
.addService(googletag.pubads());
Text moved with changes to lines 96-110 (98.4% similarity)
//Display calls for the initialized slots
window.addEventListener('load', function() {
googletag.display('billboard-1');
googletag.display('billboard-2');
googletag.display('billboard-3');
googletag.display('skyscraper-1');
googletag.display('skyscraper-2');
googletag.display('MPU-1');
googletag.display('MPU-2');
googletag.display('MPU-3');
googletag.display('leaderboard-1');
googletag.display('leaderboard-2');
googletag.display('sticky-footer');
});
//Lazy Load
googletag.pubads().enableLazyLoad({
// Fetch slots within 2 viewports.
fetchMarginPercent: 200,
// Render slots within 1 viewport.
renderMarginPercent: 100,
// Increase 1,5 times the above values on mobile, where viewports are smaller
// and users tend to scroll faster.
mobileScaling: 1.5
});
Text moved with changes to lines 113-127 (97.4% similarity)
// The code which implements GPT+Prebid refresh functionality
googletag.pubads().addEventListener("impressionViewable", function(e) {
var a = e.slot; // GPT slot
var pa = adUnits.find(u => u.code === a.getSlotElementId()); // Prebid ad unit which complements a GPT slot
setTimeout((function() {
if (pa !== undefined) {
refreshBid(a, pa);
} else {
googletag.pubads().refresh([a]);
}
}), SECONDS_TO_WAIT_AFTER_VIEWABILITY * 1000);
});
googletag.pubads().setTargeting('site', 'usanewstoday.club');
googletag.pubads().collapseEmptyDivs();
googletag.pubads().disableInitialLoad();
googletag.enableServices();
});
// Close button for sticky footer banner
// Close button for sticky footer banner
function closeAdFooterStick() {
function closeAdFooterStick() {
var slots = googletag.pubads().getSlots();
var slots = googletag.pubads().getSlots();
var slot = slots.find(slot => {
var slot = slots.find(slot => {
return slot.slotID === 'sticky-footer';
return slot.slotID === 'sticky-footer';
});
});
if (slot) {
if (slot) {
googletag.destroySlots(slot);
googletag.destroySlots(slot);
}
}
document.querySelector("#ad-sticky-footer-container").remove();
document.querySelector("#ad-sticky-footer-container").remove();
}
}
已保存差異
原始文本
開啟檔案
//Interstitial ads window.googletag = window.googletag || { cmd: [] }; var interstitialSlot, staticSlot; googletag.cmd.push(function() { interstitialSlot = googletag.defineOutOfPageSlot('/22367406785/adi-interstitial', googletag.enums.OutOfPageFormat.INTERSTITIAL); if (interstitialSlot) { interstitialSlot.setTargeting('site', ['usanewstoday.club']).addService(googletag.pubads()); googletag.pubads().addEventListener('slotOnload', function(event) {}); } googletag.enableServices(); }); googletag.cmd.push(function() { googletag.display(interstitialSlot); }); //Adds default css for ad slots var css = '.ads {text-align: center; padding-top: 10px; padding-bottom: 5px;}', head = document.head || document.getElementsByTagName('head')[0], style = document.createElement('style'); if (style.styleSheet) { // This is required for IE8 and below. style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); } head.appendChild(style); //Adds AdsStar.In link to a slot window.addEventListener("load", function() { var adSlot = document.getElementsByClassName("ads-star"); var adSlotLength = adSlot.length; for (var i = 0; i < adSlotLength; i++) { adSlot[i].style.cssText = "z-index: 9999;display: inline-block; width: 100%; text-align: center; padding-bottom: 10px;" var adsLink = document.createElement("a"); adSlot[i].appendChild(adsLink); adsLink.style.cssText = "text-align: right; clear: both; text-decoration: none; color:black; font-size: 10px; font-family: Tahoma;" adsLink.href = 'https://adsstar.in'; var text = document.createTextNode("Powered by AdsStar"); adsLink.appendChild(text); } }); //Adds styles for Sticky Footer (Banner) var banner = '.ad-sticky-banner {display: inline-block; z-index: 10001 ;}', head = document.head || document.getElementsByTagName('head')[0], style = document.createElement('style'); if (style.styleSheet) { // This is required for IE8 and below. style.styleSheet.cssText = banner; } else { style.appendChild(document.createTextNode(banner)); } head.appendChild(style); //Adds styles for Sticky Footer (Slot container) var stickySlot = '.ad-sticky-slot {position: fixed; height: auto; width: 100%; text-align: center; bottom: 0; left: 0; z-index: 9999; background-color: rgba(237,237,237,.7);}', head = document.head || document.getElementsByTagName('head')[0], style = document.createElement('style'); if (style.styleSheet) { // This is required for IE8 and below. style.styleSheet.cssText = stickySlot; } else { style.appendChild(document.createTextNode(stickySlot)); } head.appendChild(style); //Adds styles for Sticky Footer (Close button) var stickyButton = '.ad-sticky-close-button {position:absolute; cursor: pointer; width:28px; height:28px; top:-28px; right:0; color: #000; font-weight: bolder; background: rgba(237,237,237, .7); box-shadow:0 -1px 1px 0 rgba(0,0,0,0.2); border:none; border-radius:12px 0 0 0; font-size:20px; font-family: monospace;}', head = document.head || document.getElementsByTagName('head')[0], style = document.createElement('style'); if (style.styleSheet) { // This is required for IE8 and below. style.styleSheet.cssText = stickyButton; } else { style.appendChild(document.createTextNode(stickyButton)); } head.appendChild(style); //Prebid wrapper var PREBID_TIMEOUT = 1000; var FAILSAFE_TIMEOUT = 2000; var adUnits = [{ code: "div-gpt-ad-billboard-1", mediaTypes: { banner: { sizes: [ [728, 90] ] } }, labelAny: ["display", "tablet"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-billboard-1", mediaTypes: { banner: { sizes: [ [320, 50] ] } }, labelAny: ["phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-billboard-1", mediaTypes: { banner: { sizes: [ [320, 100] ] } }, labelAny: ["phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-billboard-2", mediaTypes: { banner: { sizes: [ [728, 90] ] } }, labelAny: ["display", "tablet"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-billboard-2", mediaTypes: { banner: { sizes: [ [320, 50] ] } }, labelAny: ["phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-billboard-2", mediaTypes: { banner: { sizes: [ [320, 100] ] } }, labelAny: ["phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-billboard-3", mediaTypes: { banner: { sizes: [ [728, 90] ] } }, labelAny: ["display", "tablet"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-billboard-3", mediaTypes: { banner: { sizes: [ [320, 50] ] } }, labelAny: ["phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-billboard-3", mediaTypes: { banner: { sizes: [ [320, 100] ] } }, labelAny: ["phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } } ] }, { code: "div-gpt-ad-skyscraper-1", mediaTypes: { banner: { sizes: [ [300, 600] ] } }, labelAny: ["display"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-skyscraper-1", mediaTypes: { banner: { sizes: [ [160, 600] ] } }, labelAny: ["display"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-skyscraper-1", mediaTypes: { banner: { sizes: [ [120, 600] ] } }, labelAny: ["display"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-skyscraper-2", mediaTypes: { banner: { sizes: [ [300, 600] ] } }, labelAny: ["display", "tablet"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-skyscraper-2", mediaTypes: { banner: { sizes: [ [160, 600] ] } }, labelAny: ["display"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-skyscraper-2", mediaTypes: { banner: { sizes: [ [120, 600] ] } }, labelAny: ["display"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-MPU-1", mediaTypes: { banner: { sizes: [ [300, 250] ] } }, labelAny: ["display", "tablet", "phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-MPU-1", mediaTypes: { banner: { sizes: [ [336, 280] ] } }, labelAny: ["display", "tablet", "phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-MPU-2", mediaTypes: { banner: { sizes: [ [300, 250] ] } }, labelAny: ["display", "tablet", "phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-MPU-2", mediaTypes: { banner: { sizes: [ [336, 280] ] } }, labelAny: ["display", "tablet", "phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-MPU-3", mediaTypes: { banner: { sizes: [ [300, 250] ] } }, labelAny: ["display", "tablet", "phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-MPU-3", mediaTypes: { banner: { sizes: [ [336, 280] ] } }, labelAny: ["display", "tablet", "phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-MPU-4", mediaTypes: { banner: { sizes: [ [300, 250] ] } }, labelAny: ["display", "tablet", "phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-MPU-4", mediaTypes: { banner: { sizes: [ [336, 280] ] } }, labelAny: ["display", "tablet", "phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-leaderboard-1", mediaTypes: { banner: { sizes: [ [728, 90] ] } }, labelAny: ["display", "tablet"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-leaderboard-1", mediaTypes: { banner: { sizes: [ [320, 50] ] } }, labelAny: ["phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-leaderboard-1", mediaTypes: { banner: { sizes: [ [320, 100] ] } }, labelAny: ["phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } } ] }, { code: "div-gpt-ad-leaderboard-2", mediaTypes: { banner: { sizes: [ [728, 90] ] } }, labelAny: ["display", "tablet"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-leaderboard-2", mediaTypes: { banner: { sizes: [ [320, 50] ] } }, labelAny: ["phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "div-gpt-ad-leaderboard-2", mediaTypes: { banner: { sizes: [ [320, 100] ] } }, labelAny: ["phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, ]; const customConfigObject = { "buckets": [{ "precision": 2, //default is 2 if omitted - means 2.1234 rounded to 2 decimal places = 2.12 "min": 0, "max": 1500, //add here the highest price of the created line item in GAM "increment": 0.75 }, ] }; var pbjs = pbjs || {}; pbjs.que = pbjs.que || []; pbjs.setConfig({ debug: false, sizeConfig: [{ mediaQuery: '(min-width: 992px)', sizesSupported: [ [970, 250], [970, 90], [728, 90], [300, 250], [300, 600], [336, 280], [160, 600], [120, 600], [250, 250], [200, 200] ], labels: ["display"] }, { mediaQuery: '(min-width: 768px) and (max-width: 991px)', sizesSupported: [ [728, 90], [300, 250], [336, 280], [160, 600], [250, 250], [200, 200] ], labels: ["tablet"] }, { mediaQuery: '(min-width: 320px) and (max-width: 767px)', sizesSupported: [ [320, 50], [320, 100], [300, 250], [250, 250], [200, 200] ], labels: ["phone"] }], priceGranularity: 'customConfigObject', userSync: { iframeEnabled: true }, "currency": { "adServerCurrency": "INR", // "granularityMultiplier": 75, "conversionRateFile": "https://cdn.jsdelivr.net/gh/prebid/currency-file@1/latest.json", "defaultRates": { "USD": { "INR": 75 } } } }); pbjs.onEvent('bidWon', function(data) { console.log('==Prebid==', data.bidderCode + ' won the ad server auction for ad unit ' + data.adUnitCode + ' at ' + data.cpm + ' CPM'); }); pbjs.que.push(function() { pbjs.addAdUnits(adUnits); pbjs.requestBids({ bidsBackHandler: initAdserver, timeout: PREBID_TIMEOUT }); }); function initAdserver() { if (pbjs.initAdserverSet) return; pbjs.initAdserverSet = true; googletag.cmd.push(function() { pbjs.que.push(function() { pbjs.setTargetingForGPTAsync(); googletag.pubads().refresh(); }); }); } // GPT+Prebid refresh function function refreshBid(slot, adUnit) { pbjs.que.push(function() { pbjs.addAdUnits([adUnit]); pbjs.requestBids({ timeout: PREBID_TIMEOUT, bidsBackHandler: () => { googletag.cmd.push(function() { pbjs.setTargetingForGPTAsync(); googletag.pubads().refresh([slot]); }); } }); }); } setTimeout(function() { initAdserver(); }, FAILSAFE_TIMEOUT); //End of the Prebid wrapper //GPT init calls window.googletag = window.googletag || { cmd: [] }; //Variables for ad units to display in the Quize plugin var billboard1; var billboard2; var billboard3; var skyscraper1; var skyscraper2; var MPU1; var MPU2; var MPU3; var leaderboard1; var leaderboard2; var stickyFooter; googletag.cmd.push(function() { //Setting up responsive ads size mapping var billboardSizes = googletag.sizeMapping() .addSize([992, 0], [ [970, 90], [970, 250], [728, 90] ]) //desktop .addSize([768, 0], [ [728, 90], [468, 60] ]) //tablet .addSize([320, 0], [ [320, 50], [320, 100], [300, 50] ]) //mobile .addSize([0, 0], []) .build(); var skyscraperSizes = googletag.sizeMapping() .addSize([768, 0], [ [300, 600], [160, 600], [120, 600] ]) //desktop & tablet .build(); var rectangleSizes = googletag.sizeMapping() .addSize([768, 0], [ [300, 250], [336, 280], [250, 250], [200, 200] ]) //desktop & tablet .addSize([320, 0], [ [300, 250], [250, 250], [200, 200] ]) //mobile .addSize([0, 0], []) .build(); var leaderboardSizes = googletag.sizeMapping() .addSize([768, 0], [ [728, 90], [468, 60] ]) //desktop & tablet .addSize([320, 0], [ [320, 50], [320, 100] ]) //mobile .addSize([0, 0], []) .build(); var SECONDS_TO_WAIT_AFTER_VIEWABILITY = 30; //sets the refresh interval in seconds //Responsive Billboard slots initialization billboard1 = googletag.defineSlot("/22367406785/billboard1", [728, 90], "billboard-1") .defineSizeMapping(billboardSizes) .setTargeting('pos', ['billboard1']) .addService(googletag.pubads()); billboard2 = googletag.defineSlot("/22367406785/billboard2", [728, 90], "billboard-2") .defineSizeMapping(billboardSizes) .setTargeting('pos', ['billboard2']) .addService(googletag.pubads()); billboard3 = googletag.defineSlot("/22367406785/billboard3", [728, 90], "billboard-3") .defineSizeMapping(billboardSizes) .setTargeting('pos', ['billboard3']) .addService(googletag.pubads()); //Responsive Skyscraper slots initialization skyscraper1 = googletag.defineSlot("/22367406785/skyscraper1", [160, 600], "skyscraper-1") .defineSizeMapping(skyscraperSizes) .setTargeting('pos', ['skyscraper1']) .addService(googletag.pubads()); skyscraper2 = googletag.defineSlot("/22367406785/skyscraper2", [160, 600], "skyscraper-2") .defineSizeMapping(skyscraperSizes) .setTargeting('pos', ['skyscraper2']) .addService(googletag.pubads()); //Responsive MPU slots initialization MPU1 = googletag.defineSlot("/22367406785/MPU1", [300, 250], "MPU-1") .defineSizeMapping(rectangleSizes) .setTargeting('pos', ['MPU1']) .addService(googletag.pubads()); MPU2 = googletag.defineSlot("/22367406785/MPU2", [300, 250], "MPU-2") .defineSizeMapping(rectangleSizes) .setTargeting('pos', ['MPU2']) .addService(googletag.pubads()); MPU3 = googletag.defineSlot("/22367406785/MPU3", [300, 250], "MPU-3") .defineSizeMapping(rectangleSizes) .setTargeting('pos', ['MPU3']) .addService(googletag.pubads()); //Responsive Leaderboard slots initialization leaderboard1 = googletag.defineSlot("/22367406785/leaderboard1", [320, 50], "leaderboard-1") .defineSizeMapping(leaderboardSizes) .setTargeting('pos', ['leaderboard1']) .addService(googletag.pubads()); leaderboard2 = googletag.defineSlot("/22367406785/leaderboard2", [320, 50], "leaderboard-2") .defineSizeMapping(leaderboardSizes) .setTargeting('pos', ['leaderboard2']) .addService(googletag.pubads()); //Responsive sticky footer slot initialization stickyFooter = googletag.defineSlot("/22367406785/sticky-footer", [320, 50], "sticky-footer") .defineSizeMapping(leaderboardSizes) .setTargeting('pos', ['sticky-footer']) .addService(googletag.pubads()); //Display calls for the initialized slots window.addEventListener('load', function() { googletag.display('billboard-1'); googletag.display('billboard-2'); googletag.display('billboard-3'); googletag.display('skyscraper-1'); googletag.display('skyscraper-2'); googletag.display('MPU-1'); googletag.display('MPU-2'); googletag.display('MPU-3'); googletag.display('leaderboard-1'); googletag.display('leaderboard-2'); googletag.display('sticky-footer'); }); //Lazy Load googletag.pubads().enableLazyLoad({ // Fetch slots within 2 viewports. fetchMarginPercent: 200, // Render slots within 1 viewport. renderMarginPercent: 100, // Increase 1,5 times the above values on mobile, where viewports are smaller // and users tend to scroll faster. mobileScaling: 1.5 }); // The code which implements GPT+Prebid refresh functionality googletag.pubads().addEventListener("impressionViewable", function(e) { var a = e.slot; // GPT slot var pa = adUnits.find(u => u.code === a.getSlotElementId()); // Prebid ad unit which complements a GPT slot setTimeout((function() { if (pa !== undefined) { refreshBid(a, pa); } else { googletag.pubads().refresh([a]); } }), SECONDS_TO_WAIT_AFTER_VIEWABILITY * 1000); }); googletag.pubads().setTargeting('site', 'usanewstoday.club'); googletag.pubads().collapseEmptyDivs(); googletag.pubads().disableInitialLoad(); googletag.enableServices(); }); // Close button for sticky footer banner function closeAdFooterStick() { var slots = googletag.pubads().getSlots(); var slot = slots.find(slot => { return slot.slotID === 'sticky-footer'; }); if (slot) { googletag.destroySlots(slot); } document.querySelector("#ad-sticky-footer-container").remove(); }
更改後文本
開啟檔案
var billboard1, billboard2, billboard3, skyscraper1, skyscraper2, MPU1, MPU2, MPU3, leaderboard1, leaderboard2, stickyFooter, interstitialSlot; window.googletag = window.googletag || { cmd: [] }; googletag.cmd.push(function () { //Setting up responsive ads size mapping var billboardSizes = googletag.sizeMapping() .addSize([992, 0], [[970, 90], [970, 250], [728, 90]]) //desktop .addSize([768, 0], [[728, 90], [468, 60]]) //tablet .addSize([320, 0], [[320, 50], [320, 100], [300, 50]]) //mobile .addSize([0, 0], []) .build(); var skyscraperSizes = googletag.sizeMapping() .addSize([768, 0], [ [300, 600], [160, 600], [120, 600] ]) //desktop & tablet .build(); var rectangleSizes = googletag.sizeMapping() .addSize([768, 0], [ [300, 250], [336, 280], [250, 250], [200, 200] ]) //desktop & tablet .addSize([320, 0], [ [300, 250], [250, 250], [200, 200] ]) //mobile .addSize([0, 0], []) .build(); var leaderboardSizes = googletag.sizeMapping() .addSize([768, 0], [ [728, 90], [468, 60] ]) //desktop & tablet .addSize([320, 0], [ [320, 50], [320, 100] ]) //mobile .addSize([0, 0], []) .build(); //Responsive Billboard slots initialization billboard1 = googletag.defineSlot("/22367406785/billboard1", [728, 90], "billboard-1") .defineSizeMapping(billboardSizes) .setTargeting('pos', ['billboard1']) .addService(googletag.pubads()); billboard2 = googletag.defineSlot("/22367406785/billboard2", [728, 90], "billboard-2") .defineSizeMapping(billboardSizes) .setTargeting('pos', ['billboard2']) .addService(googletag.pubads()); billboard3 = googletag.defineSlot("/22367406785/billboard3", [728, 90], "billboard-3") .defineSizeMapping(billboardSizes) .setTargeting('pos', ['billboard3']) .addService(googletag.pubads()); //Responsive Skyscraper slots initialization skyscraper1 = googletag.defineSlot("/22367406785/skyscraper1", [160, 600], "skyscraper-1") .defineSizeMapping(skyscraperSizes) .setTargeting('pos', ['skyscraper1']) .addService(googletag.pubads()); skyscraper2 = googletag.defineSlot("/22367406785/skyscraper2", [160, 600], "skyscraper-2") .defineSizeMapping(skyscraperSizes) .setTargeting('pos', ['skyscraper2']) .addService(googletag.pubads()); //Responsive MPU slots initialization MPU1 = googletag.defineSlot("/22367406785/MPU1", [300, 250], "MPU-1") .defineSizeMapping(rectangleSizes) .setTargeting('pos', ['MPU1']) .addService(googletag.pubads()); MPU2 = googletag.defineSlot("/22367406785/MPU2", [300, 250], "MPU-2") .defineSizeMapping(rectangleSizes) .setTargeting('pos', ['MPU2']) .addService(googletag.pubads()); MPU3 = googletag.defineSlot("/22367406785/MPU3", [300, 250], "MPU-3") .defineSizeMapping(rectangleSizes) .setTargeting('pos', ['MPU3']) .addService(googletag.pubads()); //Responsive Leaderboard slots initialization leaderboard1 = googletag.defineSlot("/22367406785/leaderboard1", [320, 50], "leaderboard-1") .defineSizeMapping(leaderboardSizes) .setTargeting('pos', ['leaderboard1']) .addService(googletag.pubads()); leaderboard2 = googletag.defineSlot("/22367406785/leaderboard2", [320, 50], "leaderboard-2") .defineSizeMapping(leaderboardSizes) .setTargeting('pos', ['leaderboard2']) .addService(googletag.pubads()); //Responsive sticky footer slot initialization stickyFooter = googletag.defineSlot("/22367406785/sticky-footer", [320, 50], "sticky-footer") .defineSizeMapping(leaderboardSizes) .setTargeting('pos', ['sticky-footer']) .addService(googletag.pubads()); interstitialSlot = googletag.defineOutOfPageSlot('/22367406785/adi-interstitial', googletag.enums.OutOfPageFormat.INTERSTITIAL); if (interstitialSlot) { interstitialSlot.setTargeting('site', ['usanewstoday.club']).addService(googletag.pubads()); } //Display calls for the initialized slots window.addEventListener('load', function () { googletag.display('billboard-1'); googletag.display('billboard-2'); googletag.display('billboard-3'); googletag.display('skyscraper-1'); googletag.display('skyscraper-2'); googletag.display('MPU-1'); googletag.display('MPU-2'); googletag.display('MPU-3'); googletag.display('leaderboard-1'); googletag.display('leaderboard-2'); googletag.display('sticky-footer'); }); //Lazy Load Removed // The code which implements GPT+Prebid refresh functionality var SECONDS_TO_WAIT_AFTER_VIEWABILITY = 30; //sets the refresh interval in seconds googletag.pubads().addEventListener("impressionViewable", function (e) { var a = e.slot; // GPT slot var pa = adUnits.find(u => u.code === a.getSlotElementId()); // Prebid ad unit which complements a GPT slot setTimeout((function () { if (pa !== undefined) { refreshBid(a, pa); } else { googletag.pubads().refresh([a]); } }), SECONDS_TO_WAIT_AFTER_VIEWABILITY * 1000); }); googletag.pubads().setTargeting('site', 'usanewstoday.club'); googletag.pubads().collapseEmptyDivs(); googletag.pubads().disableInitialLoad(); googletag.enableServices(); }); //Adds default css for ad slots var css = '.ads {text-align: center; padding-top: 10px; padding-bottom: 5px;}', head = document.head || document.getElementsByTagName('head')[0], style = document.createElement('style'); if (style.styleSheet) { // This is required for IE8 and below. style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); } head.appendChild(style); //Adds AdsStar.In link to a slot window.addEventListener("load", function () { var adSlot = document.getElementsByClassName("ads-star"); var adSlotLength = adSlot.length; for (var i = 0; i < adSlotLength; i++) { adSlot[i].style.cssText = "z-index: 9999;display: inline-block; width: 100%; text-align: center; padding-bottom: 10px;" var adsLink = document.createElement("a"); adSlot[i].appendChild(adsLink); adsLink.style.cssText = "text-align: right; clear: both; text-decoration: none; color:black; font-size: 10px; font-family: Tahoma;" adsLink.href = 'https://adsstar.in'; var text = document.createTextNode("Powered by AdsStar"); adsLink.appendChild(text); } }); //Adds styles for Sticky Footer (Banner) var banner = '.ad-sticky-banner {display: inline-block; z-index: 10001 ;}', head = document.head || document.getElementsByTagName('head')[0], style = document.createElement('style'); if (style.styleSheet) { // This is required for IE8 and below. style.styleSheet.cssText = banner; } else { style.appendChild(document.createTextNode(banner)); } head.appendChild(style); //Adds styles for Sticky Footer (Slot container) var stickySlot = '.ad-sticky-slot {position: fixed; height: auto; width: 100%; text-align: center; bottom: 0; left: 0; z-index: 9999; background-color: rgba(237,237,237,.7);}', head = document.head || document.getElementsByTagName('head')[0], style = document.createElement('style'); if (style.styleSheet) { // This is required for IE8 and below. style.styleSheet.cssText = stickySlot; } else { style.appendChild(document.createTextNode(stickySlot)); } head.appendChild(style); //Adds styles for Sticky Footer (Close button) var stickyButton = '.ad-sticky-close-button {position:absolute; cursor: pointer; width:28px; height:28px; top:-28px; right:0; color: #000; font-weight: bolder; background: rgba(237,237,237, .7); box-shadow:0 -1px 1px 0 rgba(0,0,0,0.2); border:none; border-radius:12px 0 0 0; font-size:20px; font-family: monospace;}', head = document.head || document.getElementsByTagName('head')[0], style = document.createElement('style'); if (style.styleSheet) { // This is required for IE8 and below. style.styleSheet.cssText = stickyButton; } else { style.appendChild(document.createTextNode(stickyButton)); } head.appendChild(style); //Prebid wrapper var PREBID_TIMEOUT = 1000; var FAILSAFE_TIMEOUT = 2000; var adUnits = [{ code: "billboard-1", mediaTypes: { banner: { sizes: [ [728, 90] ] } }, labelAny: ["display", "tablet"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "billboard-1", mediaTypes: { banner: { sizes: [ [320, 50] ] } }, labelAny: ["phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "billboard-1", mediaTypes: { banner: { sizes: [ [320, 100] ] } }, labelAny: ["phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "billboard-2", mediaTypes: { banner: { sizes: [ [728, 90] ] } }, labelAny: ["display", "tablet"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "billboard-2", mediaTypes: { banner: { sizes: [ [320, 50] ] } }, labelAny: ["phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "billboard-2", mediaTypes: { banner: { sizes: [ [320, 100] ] } }, labelAny: ["phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "billboard-3", mediaTypes: { banner: { sizes: [ [728, 90] ] } }, labelAny: ["display", "tablet"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "billboard-3", mediaTypes: { banner: { sizes: [ [320, 50] ] } }, labelAny: ["phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "billboard-3", mediaTypes: { banner: { sizes: [ [320, 100] ] } }, labelAny: ["phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } } ] }, { code: "skyscraper-1", mediaTypes: { banner: { sizes: [ [300, 600] ] } }, labelAny: ["display"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "skyscraper-1", mediaTypes: { banner: { sizes: [ [160, 600] ] } }, labelAny: ["display"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "skyscraper-1", mediaTypes: { banner: { sizes: [ [120, 600] ] } }, labelAny: ["display"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "skyscraper-2", mediaTypes: { banner: { sizes: [ [300, 600] ] } }, labelAny: ["display", "tablet"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "skyscraper-2", mediaTypes: { banner: { sizes: [ [160, 600] ] } }, labelAny: ["display"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "skyscraper-2", mediaTypes: { banner: { sizes: [ [120, 600] ] } }, labelAny: ["display"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "MPU-1", mediaTypes: { banner: { sizes: [ [300, 250] ] } }, labelAny: ["display", "tablet", "phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "MPU-1", mediaTypes: { banner: { sizes: [ [336, 280] ] } }, labelAny: ["display", "tablet", "phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "MPU-2", mediaTypes: { banner: { sizes: [ [300, 250] ] } }, labelAny: ["display", "tablet", "phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "MPU-2", mediaTypes: { banner: { sizes: [ [336, 280] ] } }, labelAny: ["display", "tablet", "phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "MPU-3", mediaTypes: { banner: { sizes: [ [300, 250] ] } }, labelAny: ["display", "tablet", "phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "MPU-3", mediaTypes: { banner: { sizes: [ [336, 280] ] } }, labelAny: ["display", "tablet", "phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "MPU-4", mediaTypes: { banner: { sizes: [ [300, 250] ] } }, labelAny: ["display", "tablet", "phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "MPU-4", mediaTypes: { banner: { sizes: [ [336, 280] ] } }, labelAny: ["display", "tablet", "phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "leaderboard-1", mediaTypes: { banner: { sizes: [ [728, 90] ] } }, labelAny: ["display", "tablet"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "leaderboard-1", mediaTypes: { banner: { sizes: [ [320, 50] ] } }, labelAny: ["phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "leaderboard-1", mediaTypes: { banner: { sizes: [ [320, 100] ] } }, labelAny: ["phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } } ] }, { code: "leaderboard-2", mediaTypes: { banner: { sizes: [ [728, 90] ] } }, labelAny: ["display", "tablet"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "leaderboard-2", mediaTypes: { banner: { sizes: [ [320, 50] ] } }, labelAny: ["phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, { code: "leaderboard-2", mediaTypes: { banner: { sizes: [ [320, 100] ] } }, labelAny: ["phone"], bids: [{ bidder: 'eplanning', params: { ci: '49762' } }] }, ]; const customConfigObject = { "buckets": [{ "precision": 2, //default is 2 if omitted - means 2.1234 rounded to 2 decimal places = 2.12 "min": 0, "max": 1500, //add here the highest price of the created line item in GAM "increment": 0.75 },] }; var pbjs = pbjs || {}; pbjs.que = pbjs.que || []; pbjs.setConfig({ sizeConfig: [{ mediaQuery: '(min-width: 992px)', sizesSupported: [ [970, 250], [970, 90], [728, 90], [300, 250], [300, 600], [336, 280], [160, 600], [120, 600], [250, 250], [200, 200] ], labels: ["display"] }, { mediaQuery: '(min-width: 768px) and (max-width: 991px)', sizesSupported: [ [728, 90], [300, 250], [336, 280], [160, 600], [250, 250], [200, 200] ], labels: ["tablet"] }, { mediaQuery: '(min-width: 320px) and (max-width: 767px)', sizesSupported: [ [320, 50], [320, 100], [300, 250], [250, 250], [200, 200] ], labels: ["phone"] }], priceGranularity: 'customConfigObject', userSync: { iframeEnabled: true }, "currency": { "adServerCurrency": "INR", // "granularityMultiplier": 75, "conversionRateFile": "https://cdn.jsdelivr.net/gh/prebid/currency-file@1/latest.json", "defaultRates": { "USD": { "INR": 75 } } } }); pbjs.onEvent('bidWon', function (data) { console.log('==Prebid==', data.bidderCode + ' won the ad server auction for ad unit ' + data.adUnitCode + ' at ' + data.cpm + ' CPM'); }); pbjs.que.push(function () { pbjs.addAdUnits(adUnits); pbjs.requestBids({ bidsBackHandler: initAdserver, timeout: PREBID_TIMEOUT }); }); function initAdserver() { if (pbjs.initAdserverSet) return; pbjs.initAdserverSet = true; googletag.cmd.push(function () { pbjs.que.push(function () { pbjs.setTargetingForGPTAsync(); googletag.pubads().refresh(); }); }); } // GPT+Prebid refresh function function refreshBid(slot, adUnit) { pbjs.que.push(function () { pbjs.addAdUnits([adUnit]); pbjs.requestBids({ timeout: PREBID_TIMEOUT, bidsBackHandler: () => { googletag.cmd.push(function () { pbjs.setTargetingForGPTAsync(); googletag.pubads().refresh([slot]); }); } }); }); } setTimeout(function () { initAdserver(); }, FAILSAFE_TIMEOUT); //End of the Prebid wrapper //GPT init calls //Variables for ad units to display in the Quize plugin // Close button for sticky footer banner function closeAdFooterStick() { var slots = googletag.pubads().getSlots(); var slot = slots.find(slot => { return slot.slotID === 'sticky-footer'; }); if (slot) { googletag.destroySlots(slot); } document.querySelector("#ad-sticky-footer-container").remove(); }
尋找差異