How a session is defined at NeuroID
Overview
A session is a group of visitor interactions with your website within a given time frame. For example, a single session can contain multiple mouse movements, page clicks, and form-field interactions.
A session can be thought of as a container for the actions a visitor takes on your website.
A single visitor can open multiple sessions. Those sessions can occur on the same day, over several days, or over months. As soon as one session ends, there is an opportunity to start another. There are two methods to end a session:
- Time-based Expiration - After 30-minutes of inactivity
- Manual Session Close
Time-based Expiration
How long does a session last?
A session lasts until there are 30-minutes of inactivity. When a visitor arrives on your website, NeuroID collects data about that visitor's activity. Every time the visitor interacts with an element on the page, the time expiration is updated to 30-minutes from the timestamp of the latest event. If 30-minutes pass without any interaction from the visitor, the session ends.
Example
When collection is started, and we see an event, the session is set to expire at 14:31. As the visitor continues through your site, viewing pages and triggering events, each of these additional visitor events moves the expiration so it will always be 30-minutes from the last interaction.
What happens to a session if, during a visit to my site, a visitor leaves open a page for 31-minutes, then returns to the site?
In this scenario, the first session that was opened when the Visitor arrived on the site ends 30-minutes after their last interaction. When they return and continue interacting with the website, a new session is created with a new 30-minute expiration.
What happens to a session if, during a visit to my site, a visitor leaves open a page for 29-minutes, then returns to the site?
When the Visitor returns, the current session continues and the idle timeout will be set to 30-minutes from this latest return event.

Manual Session Close
When an application is considered complete, you should call the closeSession command. The closeSession command signals NeuroID that the session is complete and should be closed and processed immediately.
nid('closeSession');
Where you place this tag depends on your application flow. For example, if an application is considered complete when a visitor clicks submit, add the close session tag after submit.
Time-based Expiration Session Close
If you do not manually close the session, you must wait 30-minutes for the idle session timeout to occur. Please note that this delay may impact your ability to call our API and retrieve results for a session that hasn’t closed yet. To ensure the most rapid data availability, we recommend you manually close the session.
What is a billable session?
NeuroID considers a session to be a “billable session” when the session contains at least one focus event, e.g., a visitor clicks on a form field. We look for these focus events to ensure we only charge for sessions that contain visitor behavior instead of billing for a session that is related to an idle tab open in the background of the visitor’s browser while the visitor does something else.
Tab Duplication Behavior
If a visitor to your website begins interacting with your form after session start and then duplicates the tab, an additional session will be created, i.e., each tab is treated as a separate session. The identity_id assignment for these two tabs will vary depending on your implementation.
What is an “Identity ID”?
The NeuroID Identity ID is an identifier, or a hash of an identifier, that already exists in your system to distinguish individual visitors and track applicants in your workflow. In your system, you may call this an “Application Identifier”, “Applicant Id”, “User Id”, “Customer Id”, or something similar. This identifier will be used to retrieve Confidence Scores and Attributes from the NeuroID API. The identity_id should be set as soon as your system identifies the application being filled out. The identity_id must be set as soon as it is available in order to associate visitor behavior collected by NeuroID to the identifier. The identifier is set using the nid('identify', identity_id);
command where identity_id
is your unique identifier.
nid('identify', identity_id);
- You should never use PII as your identifier.
- The identity_id can be any string or numeric value.
- The identity_id minimum length is 3-characters.
- The identity_id maximum length is 100-characters.
- This identifier was known as
user_id
prior to version 5 of our JavaScript.
Are “Sessions” and “Users” the same?
Sessions and Users are not the same. You will have multiple sessions associated with a single visitor if that visitor goes idle for more than 30-minutes. This is not reflected by the Total Users figure displayed in the dashboard, which shows the total number of distinct Users, i.e., the total number of different identity_id values, regardless of how many times they appear in the dataset. Additionally, Sessions may be created that do not have a User associated with them because the integration may assign an identity_id to the session late in the application flow. These “abandons” are included in the session count because visitor behavior was collected and tracked while the visitor was on your website but left before the identity_id value was set.