Account Opening
The NeuroID JavaScript Library is customized for your Site Id and hosted on NeuroID servers. It enables specific versions of the library as per your configuration.
Account Opening
The account opening integration should be used when users create an account on your website.
Authentication
Basic authentication is used, and your key will be integrated into your configuration, loaded by the JS snippet you're using. For any questions, contact our Implementation Engineering team at [email protected].
Integration Steps
The following steps will walk you through implementing the NeuroID JavaScript Library.
1. Install the JavaScript with the Collection SiteId
If this is the first time you are integrating with the JS library, you must load the collection snippet. If you already have configured a collection snippet on your application, you can skip to step 3.
<!-- The following Snippet is for Test Purposes Only -->
<script type="text/javascript">
(function(n,e,u,r,o,i,d){
n.nid=n.nid||function(){(n.nid.q=n.nid.q||[]).push(arguments)};
o=e.createElement(u);i=e.getElementsByTagName(u)[0];o.async=1;
o.src=r;i.parentNode.insertBefore(o,i);
})(window,document,'script','//scripts.neuro-id.com/c/nid-YOUR_COLLECTION_SITEID_HERE-test.js');
</script>
<!-- The following Snippet is for Production -->
<script type="text/javascript">
(function(n,e,u,r,o,i,d){
n.nid=n.nid||function(){(n.nid.q=n.nid.q||[]).push(arguments)};
o=e.createElement(u);i=e.getElementsByTagName(u)[0];o.async=1;
o.src=r;i.parentNode.insertBefore(o,i);
})(window,document,'script','//scripts.neuro-id.com/c/nid-YOUR_COLLECTION_SITEID_HERE.js');
</script>
Embed this JavaScript snippet within the <head>
section of your webpage. This snippet may be retrieved from the JavaScript Installation Settings page in the NeuroID Portal or copied from here.
2. Update the JavaScript with your Collection SiteId
The Collection SiteId is the siteId used to collect data across all flows of your web application.
If you copy the snippet from here, you must update your JavaScript snippet URL. Your URL will look similar to: //scripts.neuro-id.com/c/nid-abcde123.js
.
If you copied your snippet from the NeuroID Portal, please continue to Step 3.
If you receive a siteId from NeuroID in the format form_abcde123
, you need to remove form_
prefix before using for example the value e.g. abcde123
in your JS snippet.
A NeuroID
siteId
uniquely identifies the Application form for which behavioral data is collected. The format consists of the prefixform_
followed by five characters and then three numbers (e.g.,form_abcde123
). It is important that you do not reuse asiteId
across multiple forms or applications. Each must be unique.Collection SiteId - The siteId used to collect data across your web application
Use Case SiteId - The siteId used to designate different flows of your application. For example: onboarding, login, navigation, account details.
Your JavaScript snippet URL will look similar to
//scripts.neuro-id.com/c/nid-abcde123.js
.In this example, the
siteId
would beform_abcde123
.
3. Label Input Fields
Ensure you use descriptive names for your input fields. These will be used during configuration to identify each input field. If you do not have descriptive names, we recommend incorporating unique, stable, and descriptive data-nid-target
attributes into your input fields, e.g., data-nid-target="firstName"
if the input field is a first name field. Please refer to our data-nid-target documentation for more information.
4. Set LinkedSiteId with your Use Case siteId
The setLinkedSiteId
command sets data collection for a given use case.
nid('setLinkedSiteId', 'siteId');
5. Store NeuroID sessionId or Set a unique persistent Identifier
a. Store NeuroID sessionId
NeuroID sessionId
identifier is automatically generated as soon as the NeuroID JavaScript loads and data collection auto-start. You can retrieve this identifier programmatically using the following command:
nid.getUserId();
Storing NeuroID sessionId
The NeuroID dashboard and alerts use a generated NeuroID identifier as the primary key for user tracking and analytics.
Additionally, the NeuroID identifier (
nid_sid
) is stored as a cookie. You can access it directly from there if needed. Optionally NeuroID can configure to store NeuroID identifier (nid_sid
) in the browser's session storage.To ensure seamless tracking and integration, the NeuroID identifier must be linked to your internal customer identifier. This allows for a unified view across your internal systems and the NeuroID platform.
This identifier is essential for reviewing NeuroID dashboards and alerts.
b. Set a unique persistent Identifier
Use the identify
command to set a unique persistent identifier:
nid('identify', 'identity_id');
IdentityId must be valid
A customer set
identity_id
must meet all the following requirements:
- Must be a string value
- Must consist of only alphanumeric characters, dashes, underscores, or periods
- A minimum length of 3-characters
- A maximum length of 100-characters
- Must not contain any PII
The
identity_id
must be the same identifier used to persist an applicant's identity in your system. You may refer to this as an Application ID, an Applicant ID, a User ID, a Customer ID, or something similar. No matter what you call it, you must set anidentity_id
that is unique to the applicant and also exists in your system.If the unique identifier is unavailable in your database, persist the value used to your backend after creation and before calling the NeuroID Analytics API. You will use this value to call the NeuroID API for signals about the applicant.
6. (Optional): Application Submit
nid('applicationSubmit');
Call nid('applicationSubmit');
when the user effectively completes and sends the application at the conclusion of your application process.
JavaScript Installation Complete ๐
Your JavaScript installation is now complete.
Please contact NeuroID at [email protected] to complete your site's configuration.
Visit the Advanced Functions documentation to learn more about NeuroID JavaScript functions not covered here.
Updated 5 months ago