Implementation
<html>
<head>
<script src="https://ds.viewpkg.com/device-scan-2-0-1.js"></script>
</head>
<script>
var deviceScan = new vPkg.DeviceScan('web_token', 'session_id')
deviceScan.setSandbox()
deviceScan.setGeoLocation(true)
deviceScan.info('event_type', 'event_id')
.then((res) => console.log(res))
.catch((error) => console.log(error))
</script>
</html>
The library performs a user analysis through a call to the .info() function, which belongs to the DeviceScan class, contained in our vPkg library, as shown in the example above. The variables web_token, session_id, event_type (optional) and event_id (optional) must be replaced with their actual real values. On success, the library will return a String indicating successful collection; on failure, it will return a String indicating the error type.