> ## Documentation Index
> Fetch the complete documentation index at: https://www.cashfree.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Device Intelligence Web SDK

> Use the Cashfree Device Intelligence Web SDK to capture browser fingerprints, device traits, and security signals that help merchants detect online risk.

The Device Intelligence Software Development Kit (SDK) is a user-friendly solution that allows businesses to gather important data directly from users browsers. This SDK captures essential information about user browsing behaviour, device characteristics, and security properties, providing businesses with valuable insights.

By leveraging this comprehensive data collection, businesses can optimise their services, personalise user experiences, enhance fraud detection, and make informed decisions based on accurate and reliable information.

## Quick start

Get started with the Device Intelligence SDK in just a few steps:

1. Include the SDK in your HTML document
2. Initialise the device intelligence service
3. Collect device and risk data from users

### HTML setup

```html theme={"dark"}
<html>
  <head>
    <title>demo app</title>
    <script src="https://vssdk-prod.cashfree.com/device-intel-js-sdk/1.1.5/index.mjs"></script>
  </head>
  <body>
    <div id="cashfree-vs"></div>
  </body>
</html>
```

## Integration steps

Choose from multiple integration approaches based on your development environment and requirements.

### Available options

1. **Script Tag Integration**: Include the hosted JavaScript SDK directly in your HTML document
2. **NPM Package**: Install and import the SDK as a dependency in your project - [Device Intelligence JS SDK](https://www.npmjs.com/package/@cashfreepayments/deviceintel-js-sdk)
3. **ES Module Import**: Load the SDK dynamically using modern JavaScript module syntax

### Sample usage

Explore different implementation methods for the Device Intelligence SDK across various development environments.

<CodeGroup>
  ```javascript ES Module Import theme={"dark"}
  import DeviceIntelligence from 'https://vssdk-prod.cashfree.com/device-intel-js-sdk/1.1.5/index.mjs'

  // Initialize the agent
  const agent = await DeviceIntelligence.load()

  // Get unified device and risk data
  const data = await agent.get({
    taskTimeout: 500,
    overallTimeout: 1000,
    options: { user_ip: false }
  })

  console.log(data) // Contains all 80+ unified data fields
  ```

  ```html Script Tag theme={"dark"}
  <script src="https://vssdk-prod.cashfree.com/device-intel-js-sdk/1.1.5/index.mjs"></script>
  <script>
    (async () => {
      // Initialize the agent
      const agent = await window.DeviceIntelligence.load()
      
      // Collect comprehensive unified device intelligence data
      const data = await agent.get({
        taskTimeout: 500,
        overallTimeout: 1000,
        options: { user_ip: false }
      })
      
      console.log(data) // 80+ unified fields including device, browser, and risk data
    })()
  </script>
  ```

  ```javascript NPM Package theme={"dark"}
  import { load } from '@cashfreepayments/deviceintel-js-sdk'

  // Initialize the agent
  const agent = await load()

  // Collect comprehensive unified device intelligence data
  const data = await agent.get({
    taskTimeout: 500,
    overallTimeout: 1000,
    options: { user_ip: false }
  })

  console.log(data) // Complete unified data structure
  ```
</CodeGroup>

## Build structure

Understanding the different file formats and their intended use cases for the Device Intelligence SDK distribution.

* **index.d.ts:** TypeScript declaration file.
* **index.js:** CommonJS version for Node.js.
* **index.mjs:** ES module version for modern browsers.
* **index.umd.js:** UMD version compatible with multiple environments.

## Methods

Available SDK methods for collecting different types of device and browser intelligence data.

| Method                 | Description                                                                |
| ---------------------- | -------------------------------------------------------------------------- |
| `getBrowserData`       | Fetches data about the user's browser.                                     |
| `getRiskData`          | Gathers risk-related device and network properties.                        |
| `getDeviceData`        | Combines `getBrowserData` and `getRiskData`.                               |
| `getEncodedDeviceData` | Retrieves and Base64-encodes the combined device data for secure transfer. |

## getBrowserData keys

Comprehensive list of browser-specific data points collected by the getBrowserData method, including device characteristics and user environment details.

| Key                         | Info                       | Value                                                            |
| --------------------------- | -------------------------- | ---------------------------------------------------------------- |
| `device_type`               | Screen Information         | Desktop                                                          |
| `device_hash`               | Unique Identifier          | 3610851045751326452526200607540625753820592235180891750619814363 |
| `os_name`                   | Operating System Name      | Mac OS                                                           |
| `os_version`                | OS Version                 | 10.15.7                                                          |
| `user_agent`                | Browser User Agent         | Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7)...             |
| `browser_name`              | Browser Application Name   | Google Chrome                                                    |
| `browser_version`           | Browser Version            | 130.0                                                            |
| `cookie_enabled`            | Cookies Enabled            | true                                                             |
| `screen_width`              | Device Screen Width        | 1512                                                             |
| `screen_height`             | Device Screen Height       | 982                                                              |
| `region_timezone`           | Timezone Data              | Asia/Calcutta                                                    |
| `region_timezone_offset`    | Timezone Offset            | +05:30                                                           |
| `region_language`           | Browser Language           | en-GB                                                            |
| `installed_fonts`           | Installed Fonts            | Arial Unicode MS, Gill Sans...                                   |
| `installed_plugins`         | Installed Plugins          | PDF Viewer, Chrome PDF Viewer...                                 |
| `gpu_renderer`              | GPU Information            | WebKit WebGL                                                     |
| `cookie_hash`               | Hash of Browser Cookies    | 0d8c0ae86aa36887b6f889eb382fb5ef79e288c25bc280a44b8e356f14d1a282 |
| `browser_hash`              | Hash of Browser User Agent | 37c9e0fb5195ca4e93ba77829bfa87f3a97724aded19df77669186d8714f49fc |
| `private_mode`              | Incognito Mode             | false                                                            |
| `battery_percentage`        | Battery Percentage         | 100.00%                                                          |
| `canvas_device_fingerprint` | Canvas Fingerprint         | 206184060                                                        |
| `audio_fingerprint`         | Audio Fingerprint          | 124.04346607114712                                               |
| `private_browser`           | Private Browser Detection  | false                                                            |
| `web_rtc_ips`               | Web RTC IPs                |                                                                  |

## getRiskData keys

Security and risk assessment data points collected by the getRiskData method for fraud detection and user behaviour analysis.

| Key                                      | Info                          | Value                                         |
| ---------------------------------------- | ----------------------------- | --------------------------------------------- |
| `installed_bots`                         | List of Installed Bots        | false                                         |
| `high_activity`                          | Device Activity               | true                                          |
| `vpn_time_zone_mismatch_ist`             | VPN Detection                 | false                                         |
| `user_ip`                                | User IP                       | 103.153.105.199, 130.176.165.155              |
| `tampering_detection`                    | Tampering Detection           | false                                         |
| `virtual_machine_detection`              | Virtual Machine Detection     | Inconclusive                                  |
| `privacy_settings`                       | Privacy Settings              | `{"doNotTrack":false,"cookiesDisabled":true}` |
| `privacy_browsers`                       | Privacy Browsers              | false                                         |
| `visitor_id`                             | Unique Visitor ID             | 92596184-cf35-4d7b-ee3a-2accc48dc9ab          |
| `session_id`                             | Unique Session ID             | 68d428fc8a20c417701a40e377df13e0              |
| `browser_anti_finger_printing_extension` | Anti Fingerprinting Extension |                                               |
| `internet_type`                          | Internet Type                 | 4g                                            |

## Consistent values

Browser fingerprinting behaviour across different browsers in normal and private browsing modes, showing how data consistency varies by browser and privacy settings.

| Attribute | Firefox                                                | Chrome                                 | Edge                                   | Safari                                         | Brave                                         | Tor                           | DuckDuckGo                             | Vivaldi                                | Opera                                          |
| --------- | ------------------------------------------------------ | -------------------------------------- | -------------------------------------- | ---------------------------------------------- | --------------------------------------------- | ----------------------------- | -------------------------------------- | -------------------------------------- | ---------------------------------------------- |
| Canvas    | Standard: Consistent. Private: Obfuscated (Strict ETP) | Consistent in both modes               | Consistent in both modes               | Consistent. Private: No additional obfuscation | Randomised in both modes                      | Standardised across all users | Limited obfuscation                    | Consistent in both modes               | Consistent. Private: No additional obfuscation |
| Audio     | Consistent in both modes                               | Consistent in both modes               | Consistent in both modes               | Consistent in both modes                       | Consistent with limited noise in private mode | Standardised across all users | Consistent in both modes               | Consistent in both modes               | Consistent in both modes                       |
| WebGL     | Consistent. Private: Obfuscated (Strict ETP)           | Consistent in both modes               | Consistent in both modes               | Consistent. Private: No additional obfuscation | Randomised in both modes                      | Standardised across all users | Consistent in both modes               | Consistent in both modes               | Consistent in both modes                       |
| Timezone  | Matches system settings. Private: No change            | Matches system settings in both modes  | Matches system settings in both modes  | Matches system settings. Private: No change    | Matches system settings. Private: No change   | Standardised across all users | Matches system settings in both modes  | Matches system settings in both modes  | Matches system settings in both modes          |
| Fonts     | Consistent. Private: Obfuscated (Strict ETP)           | Consistent in both modes               | Consistent in both modes               | Consistent. Private: No change                 | Randomised in both modes                      | Standardised across all users | Consistent in both modes               | Consistent in both modes               | Consistent in both modes                       |
| Languages | Matches browser settings in both modes                 | Matches browser settings in both modes | Matches browser settings in both modes | Matches browser settings. Private: No change   | Matches browser settings. Private: No change  | Matches browser settings      | Matches browser settings in both modes | Matches browser settings in both modes | Matches browser settings in both modes         |
| Platform  | Matches system settings. Private: No change            | Matches system settings in both modes  | Matches system settings in both modes  | Matches system settings. Private: No change    | Matches system settings. Private: No change   | Standardised across all users | Matches system settings in both modes  | Matches system settings in both modes  | Matches system settings in both modes          |

## Browser IDs

Unique identification hashes generated for different browsers in both normal and private browsing modes, useful for device fingerprinting and user tracking.

| Browser    | Normal mode ID                   | Private mode ID                  | Unique |
| ---------- | -------------------------------- | -------------------------------- | ------ |
| Chrome     | f74c2157b0146e764f04ca5769f5cdf9 | f74c2157b0146e764f04ca5769f5cdf9 | yes    |
| Firefox    | f761b27d3eab579a8816455c49cb6368 | f761b27d3eab579a8816455c49cb6368 | yes    |
| Safari     | 7869269fdc8fce0198a8dd818221aa64 | 7869269fdc8fce0198a8dd818221aa64 | yes    |
| Opera      | f74c2157b0146e764f04ca5769f5cdf9 | f74c2157b0146e764f04ca5769f5cdf9 | yes    |
| DuckDuckGo | ede2c6282b9ca540a39e992faedd9e09 | ede2c6282b9ca540a39e992faedd9e09 | yes    |
| Edge       | 4ee7b22aeed7d5c504ef5f7816cfb829 | 4ee7b22aeed7d5c504ef5f7816cfb829 | yes    |
| Brave      | f74c2157b0146e764f04ca5769f5cdf9 | f74c2157b0146e764f04ca5769f5cdf9 | yes    |

## Next steps

After integrating the Device Intelligence SDK, consider these next steps:

1. **Test your integration**: Verify data collection in your development environment
2. **Configure data handling**: Set up server-side processing for collected device intelligence
3. **Implement fraud rules**: Use the risk data to create custom fraud detection logic
4. **Monitor performance**: Track SDK load times and data collection success rates
5. **Production deployment**: Configure your production domain and deploy with HTTPS

### Related topics

* [Fraud Detection API](/docs/api-reference/payments/latest/risk/submit-risk-details) - Process device intelligence data on your server
* [Risk Assessment Guide](/docs/payouts/payout-protect/risky-transfers) - Learn how to interpret and use risk data
* [Integration Troubleshooting](/docs/api-reference/integration-troubleshooting/sdk-ts) - Common issues and solutions
