Any idea why the piece of code below does not add the script element to the DOM?
var code = \"\"; $(\"#someElement\").append(cod
Try this may be helpful:
var fileref=document.createElement('script'); fileref.setAttribute("type","text/javascript"); fileref.setAttribute("src","scriptAnalytics.js"); document.getElementsByTagName("head")[0].appendChild(fileref);