const im = new Image(320,50); im.src='https://d00d9fcc-f790-48cd-80a6-fc741f112b4f.botfrauddetector.com/creative?w=320&h=50&c=cocacola'; if( document.getElementById("creative") ) document.getElementById("creative").appendChild(im); else document.body.appendChild(im);