In my opinion, a good approach would be to store a JavaScript file on a server that you have control over. You can then include this file on your webpage even if it's outside of your domain.
<script type="text/javascript" src="http://mydomain.com/trackingscript.js"></script>
If you're unsure about whether the script will run on "http" or "https":
<script type="text/javascript>
var scHost = (("https:" == document.location.protocol) ? "https://" : "http://");
document.write(unescape("%3Cscript src='" + scHost + "mydomain.com/trackingscript.js"' type='text/javascript'%3E%3C/script%3E"));
</script>
You can use this file for GA tracking, your own custom tracking, or any other purposes you may have in mind.
If you want to track users who do not have JavaScript enabled, consider using a <noscript>
tag with an image inside to capture their data.
Setting up your own tracking server with a simple tracking pixel might require some effort, but could provide valuable insights.