(function() {
// ***
//
// RTK Ad Unit specification
//
// Map RTK unit ids to semantic labels matching our DFP naming scheme.
// The lazy array specifies ad units that should not be eagerly loaded.
// Instead, a bid will be cached and the render will occur later when the
// ad unit is about to appear on the viewer’s screen.
//
// ***
var adUnits = {
desktop: {
auction: ‘UMpM’,
units: {
‘ad-leader-1’: ‘2kCs’,
‘ad-rec-1’: ‘kSMQ’,
‘ad-rec-2’: ‘jSSk’,
‘ad-rec-3’: ‘uDUD’,
‘ad-rec-4’: ‘ZvkQ’,
‘ad-rec-5’: ‘rdQl’,
‘ad-rec-6’: ‘d1nU’,
‘ad-leader-2’: ‘sJnv’,
},
lazy: [‘ad-rec-2’, ‘ad-rec-3’, ‘ad-rec-4’, ‘ad-rec-5’, ‘ad-rec-6’]
},
mobile: {
auction: ‘QobN’,
units: {
‘ad-leader-1’: ‘GYoR’,
‘ad-rec-1’: ‘YRql’,
‘ad-rec-2’: ‘Qbh8’,
‘ad-rec-3’: ‘gWzP’,
‘ad-rec-4’: ‘JgB3’,
‘ad-rec-5’: ‘LIuV’,
‘ad-rec-6’: ‘0h0m’,
‘ad-leader-2’: ‘Q9UR’,
},
lazy: [‘ad-rec-1’, ‘ad-rec-2’, ‘ad-rec-3’, ‘ad-rec-4’, ‘ad-rec-5’, ‘ad-rec-6’]
}
};
// ***
//
// Determine mobile breakpoint. This determines which auction type to use
//
// ***
var mq = window.matchMedia(“(min-width: 750px)”);
var auctionType;
if (mq.matches) {
auctionType = ‘desktop’;
}
else {
auctionType = ‘mobile’;
}
// ***
//
// Determine active ad units for the page
//
// The current page’s URL is scanned to determine which ads should be active.
// The `section` variable holds the first part of the URL path after the hostname
//
// ***
var section = location.pathname.split(‘/’)[1];
if (section == “” || section == null) {
section = “home”;
}
var adSection = “global”;
if (section == “home”) {
adSection = “home”;
}
else {
adSection = “article”;
}
var activeUnits = [
‘ad-leader-1’,
‘ad-rec-1’,
‘ad-rec-2’,
‘ad-rec-3’,
‘ad-rec-4’,
‘ad-rec-5’,
‘ad-rec-6’
];
// ***
//
// State non-header bidding slots
//
// These are DFP slots we want to load on the page without going through RTK’s header bidding setup.
// The most common case is our Poll ads, which use non-standard sizing.
//
// ***
// window.rtkGPTExtraSlots = [];
// ***
//
// Load CleanCreative Script
//
// RTK integrates with CC scripts, but requires them to be loaded manually.
//
// ***
var cc = document.createElement(“script”);
cc.src = “//d24tcexn2oqj99.cloudfront.net/script.js”;
document.head.appendChild(cc);
// ***
//
// Make settings globally available
//
// The shared RTK script needs these settings in a shared scope.
//
// ***
window.nationAdConfig = {
adUnits: adUnits,
activeUnits: activeUnits,
auctionType: auctionType
};
})();