I'm trying to use copyFromWindow to get the read only screen.width and screen.height properties from within a custom template in GTM.
In the code I have used copyFromWindow('screen.width'), and in the permissions tab I have tried to add screen.width to the keys, but I get the error:
The value must not start with any key predefined on global scope (i.e. in Window), or any JavaScript keywords.
I've also tried adding just width to the permissions tab but then I get a permissions error thrown by the tag itself when it runs:
failed access_globals permission check. Prohibited read on global variable: screen.width
How do I get access to these built in global variables from the sandboxed JS?