Session Startup Event and System Log

Using v8.1.7, Trying to log when a Session Starts, but it seems to be intermittently working

All of the disconnects is when I close the session....

Am I missing something?

Tried different browsers....

My view and Session has a parameter each, tried starting with and without entering parameter in the URL, same... View opens fine every time.

My code:

Gateway Log:

Not sure if this is helpful but its a good explanation of debugging.

Event Configuration Print Out to debug - Ignition - Inductive Automation Forum