Advertisement
bozghiyy

CHIB - head

Feb 5th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 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 = '127208727';
  33.  
  34. /* Start: defining adunits*/
  35.  
  36.  
  37. /* End: defining adunits*/
  38.  
  39.  
  40. googletag.cmd.push(function() {
  41. if(adUnits){
  42. for (var i = 0, len = adUnits.length; i < len; i++) {
  43. googletag.defineSlot('/'+adUnits[i].network+'/'+adUnits[i].adunit, adUnits[i].size, adUnits[i].code).addService(googletag.pubads());
  44. }
  45. }
  46. });
  47. googletag.cmd.push(function() {
  48. pbjs.que.push(function() {pbjs.setTargetingForGPTAsync();});
  49.  
  50. googletag.pubads().collapseEmptyDivs();
  51. googletag.pubads().enableSingleRequest();
  52. googletag.enableServices();
  53. });
  54. </script>
  55. <script type="text/javascript" async="true" src="//cdn.adapex.io/hb/aaw.chib.js"></script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement