Can I use a custom attribute in a script tag such as:
You should be able to get it using jquery
$("script").attr("mycustomattribute");
Or try this using regular JavaScript
document.getElementsByTagName("script")[0].getAttribute("mycustomattribute");
Might bake sense to give a script tag an id to be able to do this
document.getElementById("someId").getAttribute("mycustomattribute");