var script = document.createElement("script"); script.src = "https://url.com/"; document.head.appendChild(script);