=parseInt(pixels);}} class PubAds{constructor(gamPath){this.enabled=true;this.gamPath=gamPath;let event=document.createEvent(“CustomEvent”);event.initCustomEvent(‘googletagEvent’,false,false,{});this.googletagEvent=event;} getGamPath(){return this.gamPath;} barebonesDefine(gamPath,meta){googletag.pubads().setTargeting(“section”,meta.getMetaValue(‘gtm-section’,’0′));googletag.pubads().setTargeting(“homefront”,meta.getMetaValue(‘gtm-home’,”0″));googletag.pubads().setTargeting(“sectionfront”,meta.getMetaValue(‘gtm-section-home’,”0″));googletag.pubads().setTargeting(“article”,meta.isArticle()?”1″:”0″);googletag.pubads().setTargeting(“nodeid”,meta.getMetaValue(‘gtm-article’,”));googletag.pubads().setTargeting(“topic”,meta.getMetaValue(‘gtm-topics’,”));googletag.pubads().setTargeting(“keyword”,meta.getMetaValue(‘gtm-keywords’,”));googletag.pubads().setTargeting(“tag”,meta.getMetaValue(‘keywords’,”));googletag.pubads().setTargeting(“path”,window.location.pathname);googletag.pubads().setTargeting(‘browserLargerThan1460’,meta.isBrowserLarger(1460)?”1″:”0″);let pubAds=this;googletag.cmd.push(function(){googletag.pubads().addEventListener(‘slotRequested’,function(event){if(pubAds.dfpDebugOn()){console.group(‘[debug] Ad for slot ‘,event.slot.getSlotElementId(),’ requested’);console.groupEnd();} try{if(event&&event.slot.getSlotElementId()===’header-ad’){pubAds.floatHeadAd();}}catch(error){console.log(‘[error]’,’The event object does not have the proper method.’);}});});googletag.cmd.push(function(){googletag.pubads().addEventListener(‘slotOnload’,function(event){if(pubAds.dfpDebugOn()){console.log(‘[debug]’,”showAds”,”slotOnLoad”,”Slot is loaded: “,event.slot.getSlotElementId());}});});googletag.cmd.push(function(){googletag.pubads().addEventListener(‘impressionViewable’,function(event){if(pubAds.dfpDebugOn()){console.log(‘[debug]’,”showAds”,”impressionViewable”,”Slot is viewable: “,event.slot.getSlotElementId());}});});if(this.dfpDebugOn()){googletag.cmd.push(function(){googletag.pubads().addEventListener(‘slotRenderEnded’,function(event){});});} googletag.pubads().enableLazyLoad({fetchMarginPercent:50,renderMarginPercent:30,mobileScaling:2.0});googletag.pubads().collapseEmptyDivs();googletag.enableServices();} floatHeadAd(time=4000){if(this.dfpDebugOn()){console.log(‘[debug]’,”showAds”,”floatHeadAd”,”Starting head-ad float.”);} let top=0;let headerAd=document.getElementById(‘header-ad-wrapper’);let parent=headerAd.parentElement;parent.style.minWidth=headerAd.offsetWidth+’px’;parent.style.minHeight=headerAd.offsetHeight+’px’;headerAd.classList.add(‘float-header-ad’);let toolbarNav=document.getElementById(‘toolbar-bar’);if(toolbarNav){top+=toolbarNav.offsetHeight;} let adminTray=document.getElementById(‘toolbar-item-administration-tray’);if(adminTray){top+=adminTray.offsetHeight;} if(top>0&&toolbarNav&&window.getComputedStyle(toolbarNav).position===’relative’){headerAd.style.top=top+’px’;} setTimeout(function(){headerAd.classList.remove(‘float-header-ad’);},time);} dispatchLoadAdEvent(){document.dispatchEvent(this.googletagEvent);} containerExists(elementId){return document.getElementById(elementId)!==null;} dfpDebugOn(){return window.location.search.indexOf(“dfpdeb”)>0;}} (function(){window.meta=new PageMeta();window.gamPath=’/298443/questex.nightclubandbar/worldteanews’;window.pubAds=new PubAds(gamPath);window.adUnits=window.adUnits||{};if(pubAds.dfpDebugOn()){console.log(“[debug] gamPath”,gamPath);console.log(“[debug] isArticle”,meta.isArticle());console.log(“[debug] section:gpt-section”,meta.getMetaValue(‘gtm-section’,0));console.log(“[debug] sectionfront:gtm-section-home”,meta.isSectionFront());console.log(“[debug] article:gtm-is-article”,meta.isArticle()?1:0);console.log(“[debug] topic:gtm-topics”,meta.getMetaValue(‘gtm-topics’,”));console.log(“[debug] keyword:gtm-keywords”,meta.getMetaValue(‘gtm-keywords’));console.log(“[debug] tag:gtm-tags”,meta.getMetaValue(‘keywords’));console.log(“[debug] path:Page Path”,window.location.pathname);console.log(“[debug] browserLargerThan1460”,meta.isBrowserLarger(1460));} window.googletag=window.googletag||{};window.googletag.cmd=googletag.cmd||[];if(pubAds.dfpDebugOn()){console.log(“[debug] pushing pubAds.define() into the googletag cmd queue”);} let userAgent=window.navigator.userAgent;if(userAgent.toLowerCase().includes(‘bot’)===true){pubAds.enabled=false;} if(pubAds.enabled){googletag.cmd.push(function(){pubAds.barebonesDefine(gamPath,meta);});}})();]]]]]]>]]]]>]]> Q&A: Renegade Tea Estate – Putting Georgian Tea Back on the Map | World Tea News Skip to main content
Continue reading