closeSession

The closeSession command immediately closes a session.

By default, NeuroID will wait for 30-minutes of inactivity before a session is closed. You may optionally call the closeSession command to immediately close the current session.

  nid('closeSession');

Parameters

  • closeSession: command
  • No other parameters.

When the closeSession command is called, you signal to NeuroID that the current session is complete and should be closed and processed immediately. For certain use cases, this may be the preferred approach in order to eliminate latency in analyzing signals collected from the page associated with either:

  1. The publish interval of events to the NeuroID collector or
  2. End-of-session processing for the dashboard associated with waiting for the session to close due to inactivity.

πŸ“˜

The NeuroID dashboard updates with crowd insights on an hourly basis so the closeSession command will not make events immediately available in the dashboard.

The location of this tag will vary depending on your application. For example, if an application is considered complete when a user clicks submit, add the tag after the submit.

πŸ‘

Data Availability

API signals about the session are available regardless of whether this command is called. However, calling this command will immediately flush the event queue, which may result in decreased time from the signal collection in your application to score availability in the NeuroID API. This is because you eliminate queuing delays and reduce latency to only network and system processing.

See also: How a session is defined at NeuroID