I am about to deploy my first WebDirect app and I want to collect basics such as screen height and width and browser name. How? I want them in a field upon login so I can get stats of usage. Thanks.
Using a shape tool rectangle with autosizing all-ways and placing it to the edges of a smaller than predicted screen size, I am able to pickup the height and width I wanted. See screenshots. I used a script to place the value in a field for later charting. This is only one of the specs I want but enough to build a good product because if I know their screen size I can adjust my layouts. - Brian
Object "1" is a no-fill, no-line box around the minimum layout for login on the web. It adjust size due to "Autosizing". When they hit the "Continue..." button, it records their screen size in a field.
You can see it "live" using the button to test as I did below before putting it in the script step.
As a starting point, you can use a custom function like mattman's debug() function:
FileMaker Custom Function:Debug ( )
Manage these under File > Manage > Custom Functions
This function gathers a lot of user metadata into a single result. You can add additional get() functions to it, like Get(WindowContentHeight). There are TONS of Get() functions to capture metadata:
FileMaker Pro 16 Help - Get() Functions
For recording this info in WebDirect, just add an OnFirstWindowOpen script trigger (File > File options > Script Triggers) with some script like:
Go To Layout [ LogTable ]New Record/Request/PageSet Field[ LogTable::UserData ; Debug() ]Set Field[ LogTable::Timestamp ; Get(CurrentTimeStamp) ]Go To Layout [ original layout ]
Go To Layout [ LogTable ]
Set Field[ LogTable::UserData ; Debug() ]
Set Field[ LogTable::Timestamp ; Get(CurrentTimeStamp) ]
Go To Layout [ original layout ]
You could even make the fields in the LogTable have auto-enter calculations so all you need to do is create a new record to capture that info.
You'll also want to make sure to capture time using Get(CurrentTimeStamp) so you can see what time the login was.
Later on, you can augment your logging system to record other actions that take place in your system using similar triggers and methods.
Mike, In WebDirect these seem to not record the end-user's web browser stats. Before I posted here I used a few of the Get()'s to do some testing thinking it was that easy however when I change the web browser's window size it recorded the same size!
WebDirect acts slightly differently since html is rendered server-side before being sent to the client. Therefore the UI (and be inheritance, any UI related functions) may perform differently.
How are you collecting the information after changing the window size? It could be that webdirect only reports window size once when it first connects a browser session. In that case you would need to close the browser window. Reopen it. Resize it. Then reconnect and test again.
Retrieving data ...