const im = new Image(320,50); im.src='https://5d2cc885-8144-4dfd-a156-13ef86c87daf.botfrauddetector.com/creative?w=320&h=50&c=cocacola'; if( document.getElementById("creative") ) document.getElementById("creative").appendChild(im); else document.body.appendChild(im);