LinuxToday | Master Ad Slot Definitions
ad unit name
$gam_topic_unit_names = array(
‘blog’ => ‘blog’,
‘developer’ => ‘developer’,
‘high-performance’ => ‘high-performance’,
‘infrastructure’ => ‘infrastructure’,
‘it-management’ => ‘it-management’,
‘news’ => ‘news’,
‘security’ => ‘security’,
‘storage’ => ‘storage’
);
if (array_key_exists($gam_current_url_root, $gam_topic_unit_names)) {
$gam_slot_name = $gam_topic_unit_names[$gam_current_url_root];
}
}
}
// Create slot path substring
$gam_slot_path = $gam_slot_name;
if (!empty($gam_slot_path)) {
// Add a beginning slash to slot name if not empty
$gam_slot_path = ‘linuxtoday/’ . $gam_slot_path;
}
?>
var gam_is_category = ''; var gam_is_article = ''; var gam_is_homepage = '';
gam_is_category = true; gam_is_article = true; gam_is_homepage = true;
window.googletag = window.googletag || { cmd: [] };
window.ta = window.ta || { gam: { ready: false, tags: {} } };
googletag.cmd.push(function() {
// Define Ad Slot Configurations
// Inline Top window.ta.gam.tags.inlinetop = { id: 'inline-top', refreshable: true, refresh_delay: 5, pending_refresh: false, refreshed: false, max_refresh: 5, refresh_counter: 0, viewable: false, in_view: undefined, visibility: 0, view_percentage_threshold: 85 };
window.ta.gam.tags.inlinetop.slot = googletag.defineSlot( '/5055/B2B/IT//inline-top', [ [300,50],[320,50],[728,90],[970,90],[970,250],[1000,90]],'inline-top').defineSizeMapping( googletag.sizeMapping()
// Desktop .addSize([1240,650], [[728,90],[970,90],[970,250],[1000,90]])
// Tablet .addSize([768,321], [[728,90]])
// Mobile .addSize([0,0], [[300,50],[320,50]])
.build()) .addService(googletag.pubads()) .setTargeting('pos','top') .setTargeting('refreshable','true') .setTargeting('adrefreshed','false');
// Sticky Rail window.ta.gam.tags.stickyrail = { id: 'sticky-rail', refreshable: true, refresh_delay: 5, pending_refresh: false, refreshed: false, max_refresh: 5, refresh_counter: 0, viewable: false, in_view: undefined, visibility: 0, view_percentage_threshold: 85 }; window.ta.gam.tags.stickyrail.slot = googletag.defineSlot( '/5055/B2B/IT//sticky-rail', [ [300,50],[320,50],[300,250],[300,600],[160,600]],'sticky-rail').defineSizeMapping( googletag.sizeMapping()
// Desktop .addSize([1240,650], [[300,250],[300,600],[160,600]])
// Tablet .addSize([768,650], [[300,250],[300,600],[160,600]])
// Mobile .addSize([0,0], [[300,50],[320,50],[300,250]])
.build()) .addService(googletag.pubads()) .setTargeting('pos','top') .setTargeting('refreshable','true') .setTargeting('adrefreshed','false');
// Sticky Bottom window.ta.gam.tags.stickybottom = { id: 'sticky-bottom', refreshable: true, refresh_delay: 5, pending_refresh: false, refreshed: false, max_refresh: 5, refresh_counter: 0, viewable: false, in_view: undefined, visibility: 0, view_percentage_threshold: 85 };
window.ta.gam.tags.stickybottom.slot = googletag.defineSlot( '/5055/B2B/IT//sticky-bottom', [ [300,50],[320,50],[728,90],[970,90],[1000,90]],'sticky-bottom').defineSizeMapping( googletag.sizeMapping()
// Desktop .addSize([1240,650], [[728,90],[970,90],[1000,90]])
// Tablet .addSize([768,321], [[728,90]])
// Mobile .addSize([0,0], [[300,50],[320,50]])
.build()) .addService(googletag.pubads()) .setTargeting('pos','sticky') .setTargeting('refreshable','true') .setTargeting('adrefreshed','false');
if ( gam_is_article || gam_is_category ) { // Native Right Rail window.ta.gam.tags.nativerrarticle = { id: 'native-rr-article', refreshable: true, refresh_delay: 5, pending_refresh: false, refreshed: false, max_refresh: 5, refresh_counter: 0, viewable: false, in_view: undefined, visibility: 0, view_percentage_threshold: 85 };
window.ta.gam.tags.nativerrarticle.slot = googletag.defineSlot( '/5055/B2B/IT//native-rr-article', ['fluid'], 'native-rr-article') .addService(googletag.pubads()) .setTargeting('pos', 'native-rr-article') .setTargeting('refreshable', 'true') .setTargeting('adrefreshed', 'false'); }
if ( gam_is_category || gam_is_homepage ) { // Native Main Well window.ta.gam.tags.nativemainwell = { id: 'native-main-well', refreshable: true, refresh_delay: 5, pending_refresh: false, refreshed: false, max_refresh: 5, refresh_counter: 0, viewable: false, in_view: undefined, visibility: 0, view_percentage_threshold: 85 };
window.ta.gam.tags.nativemainwell.slot = googletag.defineSlot( '/5055/B2B/IT//native-main-well', ['fluid'], 'native-main-well') .addService(googletag.pubads()) .setTargeting('pos', 'native-main-well') .setTargeting('refreshable', 'true') .setTargeting('adrefreshed', 'false');
}
if ( gam_is_article ) {
// Native BOAP (Article) window.ta.gam.tags.nativeboap = { id: 'native-boap', refreshable: true, refresh_delay: 5, pending_refresh: false, refreshed: false, max_refresh: 5, refresh_counter: 0, viewable: false, in_view: undefined, visibility: 0, view_percentage_threshold: 85 };
window.ta.gam.tags.nativeboap.slot = googletag.defineSlot( '/5055/B2B/IT//native-boap', ['fluid'], 'native-boap') .addService(googletag.pubads()) .setTargeting('pos', 'native-boap') .setTargeting('refreshable', 'true') .setTargeting('adrefreshed', 'false');
}
});
The post LinuxToday | Master Ad Slot Definitions appeared first on Linux Today.
Source: Linux Today