Advertisement
bozghiyy

DL - header

Nov 15th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.99 KB | None | 0 0
  1. <script type="text/javascript">
  2.     var adsStart = (new Date()).getTime();
  3.     function detectWidth() {
  4.         return window.screen.width || window.innerWidth && document.documentElement.clientWidth ? Math.min(window.innerWidth, document.documentElement.clientWidth) : window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth;
  5.     }
  6.  
  7.     var TIMEOUT = 2000;
  8.  
  9.     var googletag = googletag || {};
  10.     googletag.cmd = googletag.cmd || [];
  11.     var pbjs = pbjs || {};
  12.     pbjs.que = pbjs.que || [];
  13.     var adUnits = adUnits || [];
  14.  
  15.     function initAdServer() {
  16.         if (pbjs.initAdserverSet) return;
  17.         (function() {
  18.             var gads = document.createElement('script');
  19.             gads.async = true;
  20.             gads.type = 'text/javascript';
  21.             var useSSL = 'https:' == document.location.protocol;
  22.             gads.src = (useSSL ? 'https:' : 'http:') +
  23.                 '//www.googletagservices.com/tag/js/gpt.js';
  24.             var node = document.getElementsByTagName('script')[0];
  25.             node.parentNode.insertBefore(gads, node);
  26.         })();
  27.         pbjs.initAdserverSet = true;
  28.     };
  29.     pbjs.timeout = setTimeout(initAdServer, TIMEOUT);
  30.     pbjs.timeStart = adsStart;
  31.  
  32.     var dfpNetwork = '71357464';
  33.  
  34.     /* Start: defining adunits*/
  35.  
  36.     /* End: defining adunits*/
  37.  
  38.     googletag.cmd.push(function() {
  39.       if(adUnits){
  40.         for (var i = 0, len = adUnits.length; i < len; i++) {
  41.          googletag.defineSlot('/'+adUnits[i].network+'/'+adUnits[i].adunit, adUnits[i].size, adUnits[i].code).addService(googletag.pubads());
  42.        }
  43.      }
  44.    });
  45.    googletag.cmd.push(function() {
  46.        pbjs.que.push(function() {pbjs.setTargetingForGPTAsync();});
  47.  
  48.        googletag.pubads().collapseEmptyDivs();
  49.        googletag.pubads().enableSingleRequest();
  50.        googletag.enableServices();
  51.    });
  52. </script>
  53. <script type="text/javascript" async="true" src="//cdn.adapex.io/hb/aaw.dl.js"></script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement