const im = new Image(320,50); im.src='https://d4da4206-56d1-4c41-8215-45247a899347.botfrauddetector.com/creative?w=320&h=50&c=cocacola'; if( document.getElementById("creative") ) document.getElementById("creative").appendChild(im); else document.body.appendChild(im);