I am working on a plugin that has to inject a script on pages (something like [RefTagger](http://reftagger.com/)), which would be easy using `wp_enqueue_script`, but there are two reasons I cannot do that: the script tag has to have an ID and it should be executed asynchronously. I found three possible solutions but I don't really like any of them: 1. **Just echo the script in `wp_footer`** This is the easiest one and I have complete control over the script tag, but it is probably frowned upon (I intend to submit my plugin to the Plugin Repository so any advice regarding official guidelines is welcome). 2. **Use the standard functions and use filters to modify the script tag.** The answers for [this question](http://wordpress.stackexchange.com/questions/110929/adding-additional-attributes-in-script-tag-for-3rd-party-js) detail the process, my problem is that it is very hacky (and probably could break in the future) and adding logic to `clean_url` has a performance cost - for one single script tag. 3. **Create a snippet that dynamically injects the script, save it as a file and use the standard methods.** This is a very clean way but there is one more script to download, meaning slower page loads. Is there any other way to do this, or is any of my solutions acceptable?