--- title: "Integrating the CDDC JavaScript for Modern UI" slug: "integrating-the-cddc-javascript-for-modern-ui" updated: 2025-07-04T10:07:15Z published: 2025-07-07T11:23:03Z canonical: "docs.onespan.com/integrating-the-cddc-javascript-for-modern-ui" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.onespan.com/llms.txt > Use this file to discover all available pages before exploring further. # Integrating the CDDC JavaScript for Modern UI The CDDC JavaScript file is available in the CDDC JavaScript for modern UI package on the [Risk Analytics resource download page](https://community.onespan.com/products/risk-analytics/sdks). The script is available as an ESM module (cddc.esm.js), as well as an UMD module (cddc.umd.js). If the solution in which you want to integrate CDDC JavaScript uses the Webpack or RollUp module bundler, use the ESM module. Example of using cddc.esm.js with the React and Webpack / RollUp module bundler: ```javascript //Retrieve raw fingerprint and store it into React state variable import React,{ Component } from 'react'; //including reference to CDDC JavaScript import { getJSON  } from '../lib/cddc.esm';   class Test extends Component {   constructor(props){     super(props);       this.state = {       fingerprint: ''     };   }     componentDidMount() {     //Retrieve browser fingerprint, without viewport information     const fingerprint = getJSON(false);     this.setState({       fingerprint: fingerprint     });   } } export default Test ``` If the solution uses older module loaders like AMD, RequireJS, or CommonJS, or does not use any module loader or bundler, use the UMD module. Example of using the cddc.umd.js script with the RequireJS module loader: ```javascript                  Document               ``` ```javascript //index.js requirejs(['./lib/cddc.umd.js'],function(cddc){   var fingerprint = cddc.getJSON();   var fingerprintHash= cddc.getHASH();   console.log('fingerprint is ' + fingerprint);   console.log('hashed fingerprint is ' + fingerprintHash); }); ``` You can also integrate the UMD module in a simple web page: ```xml                  Document                    ```