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

Hi James,

I will take some advice on this and reply asap.

Mark P.

Morning James,

There is currently no native support to achieve this, however, I will put this forward as a suggestion, as I can see this would be useful audit information.

Can I ask what version of MATS you are using?

If you are using 10.2, we could create you a presenter which could prefil a hidden field and collect this information, however, the user would have to interact with a form for you to collect this information. Would that fit your requirements in any way?


Hi Adam and Mark

Thanks for looking into this! The public pages all use forms, at least to start, and we are using 10.2 so that presenter would be great if possible.

Best wishes

@adam.mills don’t forget to share the presenter with the Community so everyone benefits!

1 Like

Thank you James, will hopefully have something with you shortly.


We have created a simple presenter which will return you the User Agent, this will be uploaded to the app share shortly. Were there any additional functions on top of windows.navigator that would be of use to you?


Brilliant, thanks Adam! There is nothing that is needed at the moment but I’ll be keen to see how it has been created as I haven’t done anything with presenters yet and see other ways we can use them.

Best wishes

Afternoon James,

Just to let you know the presenter has now been published and you can download it here:

If you have any feedback or suggestions please let me know.