var objBody = document.querySelector("div.page__content__row"); var objAdv = document.createElement("div"); var tag = document.createElement('script'); tag.src = "https://www.googletagservices.com/tag/js/gpt.js"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); objAdv.setAttribute("id", "div-gpt-ad-1528314885911-0"); objAdv.setAttribute("style", "height:1px; width:1px;"); objBody.appendChild(objAdv); var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; googletag.cmd.push(function() { googletag.defineSlot('\/1249652\/Huffpo_OSV_Desktop_SIDE_1x1', [ 1.0 , 1.0 ], 'div-gpt-ad-1528314885911-0').addService(googletag.pubads()); googletag.pubads().enableSingleRequest(); googletag.enableServices(); }); googletag.cmd.push(function() { googletag.display('div-gpt-ad-1528314885911-0'); });