1
I’m trying to insert a value I’m taking from the url inside the HTML attribute, as follows:
I’ve done this job
function urlId() {
    document.getElementsByTagName("BUTTON")[0].setAttribute("data-channel-external-id", "qs.id"); 
}
I want to enter the value of this variable qs.id (qs.id is the variable of a function I made to get a value from the url ex: meusite.com/pagina.php? id=VALUE I want to pick up and set inside the HTML attribute. 
 So I made this code above and put the following in my attribute data-channel-external-id="urlId()" but it’s not working ... 
Unfortunately it is not yet setting the url id inside the attribute
– Charlie Sheen
"qs.id"is a string...– Sergio