Collecting device data

I was trying to use the code studio to get some stats on how users interact with our apps using window.navigator (to get userAgent, platform, etc) and log this data against records. The end goal is to debug issues on authenticated pages used by the public and in user research.

Unfortunately the code studio doesn’t allow access to window, but is there an alternative method to achieve this goal, or could there be a change to the code studio to expand the js abilities? Potentially, could we also include Google Analytics tracking in pages?

Best wishes