‘); //In presentation mode } else { googletag.cmd.push(function() { var doubleClickMapping = googletag.sizeMapping(). addSize([500,0], [[980,120],[980,150],[980,300],[980,600]]). addSize([0, 0], [[300,90],[468,115],[468,200],[468,300],[468,400],[468,600]]).build(); //Define slot var slot = googletag.defineSlot(‘/5374/TV2no/nyheter/innenriks’, [[980,120],[980,150],[980,300],[980,600]], “lNSPYbVq”); //increment ‘p’ for each 980-wide ad if (lab_ad_isMobile || (“980″ == “980″ && !lab_ad_isMobile)) { //Set targeting for all ads starting from top if (!(typeof(doubleClickAdPosition) === “undefined”)) { $ (‘#lNSPYbVq’).addClass(“adPosition”+doubleClickAdPosition); slot.setTargeting(‘p’, doubleClickAdPosition); doubleClickAdPosition++; } } //set targeting based on parameters from apps (special ads for Apps) var wf = getParameterByName(‘wf’); var appid = getParameterByName(‘appid’); if ((wf.length > 0 && (wf == ‘iphoneapp’ || wf == ‘androidapp’ || wf == ‘ipadapp’)) || appid.length > 0) { slot.setCategoryExclusion(‘disabledForApps’); if(wf.length > 0) slot.setTargeting(‘wf’, wf); if(appid.length > 0) slot.setTargeting(‘appid’, appid); } //add the ad to GPT slot.defineSizeMapping(doubleClickMapping).addService(googletag.pubads()); }); } //add classes to parents in labrador for styling $ (‘#lNSPYbVq’).parents(‘.lab-bdz-left-small, .lab-bdz-right-small’).addClass(‘ad-dz’);
No comments:
Post a Comment