JavaScript Agregar script en la cabeza mediante programación
var my_awesome_script = document.createElement('script');
my_awesome_script.setAttribute('src','http://example.com/site.js');
document.head.appendChild(my_awesome_script);
Diz Andriana