# JavaScript SDK Guide
### Requirements
before starting the integration, ensure you have:
- Access to ADO Technologies' JavaScript SDK files
### Integration Steps
**1-.Include SDK and Assets**: Incorporate the JavaScript SDK and related assets into your web project. This involves linking to the SDK's scripts files.
**Ex:** ``
` // optional`
**2-. initializing the SDK (Optional if you have added the configuration script):** if you have not imported the config.js file you must initialize the SDK manually. Then add the following code to do so
**Parameter**
**Type**
**Description**
cid
string
this is your identifier in Ado we will grant you a cid upon POC / going live
baseURL
string
This is our Ado URL - all of the data will be sent into this location (+configuration will be taken from there)
```javascript
(async () => {
const cid = "YOUR_CID_PROVIDED_BY_ADO"
const baseURL = "YOUR_DOMAIN_PROVIDED_BY_ADO"
const options = {cid: cid, baseURL: baseURL, csid: CSID};
const document.collector = new Collector(options);
await document.collector.initialize();
})();
```
**3-. Set user ID (userID):**
In order to set the userID so we will be able to track users and to detect fraudulent activity based on the user history static and dynamic data we will need to you to set the user id, if you don’t want to send us the real user id - it’s possible to send Ado the hash of it
- Please use the following setUserID function at the moment you will have the userID
- The user id should be consistent at any time that the same user is log in
```javascript
const userID = bank_user_id || bank_user_id_hashed
document.collector.setUserID(userID)
```
**4-. Set Customer session ID (csid):**
If the session ID changes or a new session is created, you’ll need to call this function with the new session ID (string)
```javascript
const CSID = bank_session_id
document.collector.setCsid(CSID);
```
**5-. Send Context (sendContext):**
Contexts helps us to understand what is happening within the session and what action the user made, we will need you to send a context (String) before a button press / movement to another section of the application
***For example** if the user enters into transfer money page - we will want you to send us a String “**TRANSFER\_MONEY**” with the sendContext function*
**Parameter**
**Type**
**Description**
context
string
The activity which the user went through
```javascript
const CONTEXT = "TRANSFER_MONEY"
document.collector.sendContext(CONTEXT);
```
console.log hola mundo
### Full example implementation
Below is an example HTML structure that demonstrates how to configure the SDK in your web application. This example includes links to the SDK and assets, configuration entries and the emit context button.
```html
// index.html
Demo ADO Collector
Collector js
Init set user data
Send context
```
```javascript
// ComponentsManager.js
let collector
async function setConfigUser (userID, CSID) {
document.collector.setUserID(userID)
document.collector.setCsid(CSID);
}
async function emitContext(msg) {
document.collector.sendContext(msg);
}
```