In general, if the JavaScript library you want to use is located on a CDN or server external to your application, the answer is no, since Windows applications written using HTML / JavaScript cannot load external JavaScript libraries ... if you try, a security exception will occur.
Many libraries will work fine if you copy the JS file to your project and run it locally. For example, jQuery works just fine. I have not tried the Google Analytics library, so you can just test it and see if it will work with the local copy.
Something else to consider, however, is that, unlike a website, a Windows application written in HTML / JavaScript format can sometimes be disabled, in which case a library written with the assumption of a network connection is more likely total will not work. Therefore, in this particular case, you may not receive the data that you are hoping for.
Hope this helps.
source share