Orca Fraud device fingerprinting for advanced fraud detection.
Orca Fraud device fingerprinting for advanced fraud detection.
> Note: To use this package you need an Orca Fraud account
``shell`
npm install @orcafraud/devicesense
`javascript
// page-script.ts
import { DeviceSense } from '@orcafraud/devicesense';
export async function initDeviceSense(): Promise
const deviceSense = new DeviceSense({
// This needs to be a valid URI and be contained within window.location.href
siteUrl: window.location.href,
// either integration or production
environment: 'integration',
// this will be given to you during onboarding
authKey: '
// You can opt in to logging errors - this could help debug issues during development
logErrors: true,
});
// The instance has to be initialised to function correctly
await deviceSense.init();
return deviceSense;
}
// This makes it easier to access directly in a frontend script in this example but is not required
Object.assign(globalThis, { initDeviceSense });
`
`html``
type="module"
src="./dist/page-script.js"
onload="setupDeviceSense()"
>
Hello 👋