# Overview

The `drs` module allows you to integrate [Fraud Prevention](/guides/risk/overview) services into your application.

When the SDK is initialized, it automatically starts to collect and submit telemetry data to Mosaic—including information of the user journey using various JS events, browser data, and user interactions. Once specific user actions are performed on the client side (such as login), this SDK module should be called in order to track those action events. The data collected by the SDK can then be queried for recommendations using [Recommendations](/openapi/risk/recommendations.openapi) backend API.

## Installation

Load the SDK:

npm
```bash
npm install @transmitsecurity/platform-web-sdk@^2
```

yarn
```bash
yarn add @transmitsecurity/platform-web-sdk@^2
```

script tag
```html
<script src="https://platform-websdk.transmitsecurity.io/platform-websdk/2.x/ts-platform-websdk.js" id="ts-platform-script"></script>
```

## Initialization

To initialize, use the following code:

```js
// Import Fraud Prevention module
import { drs, initialize } from '@transmitsecurity/platform-web-sdk';

// Initialize SDK
// If SDK was loaded via script tag, use window.tsPlatform.initialize({ ... })
initialize({
  clientId: 'your-client-id',
  drs: {
    serverPath: 'https://api.transmitsecurity.io/risk-collect/', // Required: Set serverPath based on your region or custom domain
    enableSessionToken: true
  }
});
```

Customizations:

| Name | Type | Description |
|  --- | --- | --- |
| `enabled` | `boolean` | Fraud Prevention is enabled when initialized. Set to `false` to explicitly disable the module. |
| `serverPath` | `string` | **(Required)** The Fraud Prevention module should be configured to work with your region or custom domain by setting `serverPath` to: - `https://api.transmitsecurity.io/risk-collect/` (for US)  - `https://api.eu.transmitsecurity.io/risk-collect/` (for EU)  - `https://api.ca.transmitsecurity.io/risk-collect/` (for Canada)  - `https://api.au.transmitsecurity.io/risk-collect/` (for Australia)  - `https://api.sbx.transmitsecurity.io/risk-collect/` (for sandbox)  - `https://<your_custom_domain>/risk-collect/` (for custom domain) For the SDK modules to work properly together, the regions must match. |
| `enableSessionToken` | `boolean` | When set to `true`, generates a session token required for reporting action events from the backend. See [getSessionToken()](/sdk-ref/platform/modules/drs#getsessiontoken). |