I simply include the bit of script in the template just before the call to get_footer(). The downside to your approach is you need to run PHP for each request to the "static" resource. Reply ↓
I simply include the bit of script in the template just before the call to get_footer(). The downside to your approach is you need to run PHP for each request to the "static" resource.