Where/how to include external JS files that can't/shouldn't be grabbed and stored locally

Let’s say I sign up for some service and they require me to reference their script like so:

<script src="//cdn.someservice.com/js/dynamicJsScript"></script>

How can I include this in my app? I’d like a solution that’s router-agnostic.

I believe you can put links to external js files in the <head> </head> part of your template

I tried that before and it didn’t work.

you can use $.getScript .

Thanks. I knew about that, but was wondering if there was another way. This is a script that has to be loaded extremely in the page loading process. But I’ll give this a shot and see if it works out.