Diff
checker
Text
Text
Images
Documents
Excel
Folders
Legal
Enterprise
Desktop
Pricing
Sign in
Download Diffchecker Desktop
Compare text
Find the difference between two text files
Tools
History
Display
Layout
Split
Unified
Real-time editor
Hide whitespace changes
Hide unchanged lines
Disable line wrap
Diff precision
Smart
Syntax
None
Change appearance
Process
Ignore
Transform text
Go to first change
Edit input
Diffchecker Desktop
The most secure way to run Diffchecker. Get the Diffchecker Desktop app: your diffs never leave your computer!
Get Desktop
ad-scripts.js
Created
5 years ago
Diff never expires
Clear
Export
Share
Explain
692 removals
Lines
Total
Removed
Characters
Total
Removed
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
845 lines
Copy
137 additions
Lines
Total
Added
Characters
Total
Added
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
806 lines
Copy
Copy
Copied
Copy
Copied
//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());
Copy
Copied
Copy
Copied
googletag.pubads().addEventListener('slotOnload', function(event) {});
}
}
Copy
Copied
Copy
Copied
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
var SECONDS_TO_WAIT_AFTER_VIEWABILITY = 30; //sets the refresh interval in seconds
Text moved with changes from lines 819-832 (99.8% similarity)
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();
});
});
Copy
Copied
Copy
Copied
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
Copy
Copied
Copy
Copied
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
Copy
Copied
Copy
Copied
var PREBID_TIMEOUT = 1000;
var PREBID_TIMEOUT = 1000;
var FAILSAFE_TIMEOUT = 2000;
var FAILSAFE_TIMEOUT = 2000;
var adUnits = [{
var adUnits = [{
Copy
Copied
Copy
Copied
code: "
div-gpt-ad-
billboard-1",
code: "
billboard-1",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[728, 90]
[728, 90]
]
]
}
}
},
},
labelAny: ["display", "tablet"],
labelAny: ["display", "tablet"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
billboard-1",
code: "
billboard-1",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[320, 50]
[320, 50]
]
]
}
}
},
},
labelAny: ["phone"],
labelAny: ["phone"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
billboard-1",
code: "
billboard-1",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[320, 100]
[320, 100]
]
]
}
}
},
},
labelAny: ["phone"],
labelAny: ["phone"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
billboard-2",
code: "
billboard-2",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[728, 90]
[728, 90]
]
]
}
}
},
},
labelAny: ["display", "tablet"],
labelAny: ["display", "tablet"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
billboard-2",
code: "
billboard-2",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[320, 50]
[320, 50]
]
]
}
}
},
},
labelAny: ["phone"],
labelAny: ["phone"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
billboard-2",
code: "
billboard-2",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[320, 100]
[320, 100]
]
]
}
}
},
},
labelAny: ["phone"],
labelAny: ["phone"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
billboard-3",
code: "
billboard-3",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[728, 90]
[728, 90]
]
]
}
}
},
},
labelAny: ["display", "tablet"],
labelAny: ["display", "tablet"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
billboard-3",
code: "
billboard-3",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[320, 50]
[320, 50]
]
]
}
}
},
},
labelAny: ["phone"],
labelAny: ["phone"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
billboard-3",
code: "
billboard-3",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[320, 100]
[320, 100]
]
]
}
}
},
},
labelAny: ["phone"],
labelAny: ["phone"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}
}
]
]
},
},
{
{
code: "
div-gpt-ad-
skyscraper-1",
code: "
skyscraper-1",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[300, 600]
[300, 600]
]
]
}
}
},
},
labelAny: ["display"],
labelAny: ["display"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
skyscraper-1",
code: "
skyscraper-1",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[160, 600]
[160, 600]
]
]
}
}
},
},
labelAny: ["display"],
labelAny: ["display"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
skyscraper-1",
code: "
skyscraper-1",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[120, 600]
[120, 600]
]
]
}
}
},
},
labelAny: ["display"],
labelAny: ["display"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
skyscraper-2",
code: "
skyscraper-2",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[300, 600]
[300, 600]
]
]
}
}
},
},
labelAny: ["display", "tablet"],
labelAny: ["display", "tablet"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
skyscraper-2",
code: "
skyscraper-2",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[160, 600]
[160, 600]
]
]
}
}
},
},
labelAny: ["display"],
labelAny: ["display"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
skyscraper-2",
code: "
skyscraper-2",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[120, 600]
[120, 600]
]
]
}
}
},
},
labelAny: ["display"],
labelAny: ["display"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
MPU-1",
code: "
MPU-1",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[300, 250]
[300, 250]
]
]
}
}
},
},
labelAny: ["display", "tablet", "phone"],
labelAny: ["display", "tablet", "phone"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
MPU-1",
code: "
MPU-1",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[336, 280]
[336, 280]
]
]
}
}
},
},
labelAny: ["display", "tablet", "phone"],
labelAny: ["display", "tablet", "phone"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
MPU-2",
code: "
MPU-2",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[300, 250]
[300, 250]
]
]
}
}
},
},
labelAny: ["display", "tablet", "phone"],
labelAny: ["display", "tablet", "phone"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
MPU-2",
code: "
MPU-2",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[336, 280]
[336, 280]
]
]
}
}
},
},
labelAny: ["display", "tablet", "phone"],
labelAny: ["display", "tablet", "phone"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
MPU-3",
code: "
MPU-3",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[300, 250]
[300, 250]
]
]
}
}
},
},
labelAny: ["display", "tablet", "phone"],
labelAny: ["display", "tablet", "phone"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
MPU-3",
code: "
MPU-3",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[336, 280]
[336, 280]
]
]
}
}
},
},
labelAny: ["display", "tablet", "phone"],
labelAny: ["display", "tablet", "phone"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
MPU-4",
code: "
MPU-4",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[300, 250]
[300, 250]
]
]
}
}
},
},
labelAny: ["display", "tablet", "phone"],
labelAny: ["display", "tablet", "phone"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
MPU-4",
code: "
MPU-4",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[336, 280]
[336, 280]
]
]
}
}
},
},
labelAny: ["display", "tablet", "phone"],
labelAny: ["display", "tablet", "phone"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
leaderboard-1",
code: "
leaderboard-1",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[728, 90]
[728, 90]
]
]
}
}
},
},
labelAny: ["display", "tablet"],
labelAny: ["display", "tablet"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
leaderboard-1",
code: "
leaderboard-1",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[320, 50]
[320, 50]
]
]
}
}
},
},
labelAny: ["phone"],
labelAny: ["phone"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
leaderboard-1",
code: "
leaderboard-1",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[320, 100]
[320, 100]
]
]
}
}
},
},
labelAny: ["phone"],
labelAny: ["phone"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}
}
]
]
},
},
{
{
code: "
div-gpt-ad-
leaderboard-2",
code: "
leaderboard-2",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[728, 90]
[728, 90]
]
]
}
}
},
},
labelAny: ["display", "tablet"],
labelAny: ["display", "tablet"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
leaderboard-2",
code: "
leaderboard-2",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[320, 50]
[320, 50]
]
]
}
}
},
},
labelAny: ["phone"],
labelAny: ["phone"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
ci: '49762'
}
}
}]
}]
},
},
{
{
code: "
div-gpt-ad-
leaderboard-2",
code: "
leaderboard-2",
mediaTypes: {
mediaTypes: {
banner: {
banner: {
sizes: [
sizes: [
[320, 100]
[320, 100]
]
]
}
}
},
},
labelAny: ["phone"],
labelAny: ["phone"],
bids: [{
bids: [{
bidder: 'eplanning',
bidder: 'eplanning',
params: {
params: {
ci: '49762'
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
Copy
Copied
Copy
Copied
},
]
},
]
};
};
var pbjs = pbjs || {};
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
pbjs.que = pbjs.que || [];
pbjs.setConfig({
pbjs.setConfig({
Copy
Copied
Copy
Copied
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]
Saved diffs
Original text
Open file
//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(); }
Changed text
Open file
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(); }
Find difference