Integrating Tracio
This guide covers integrating Tracio's behavioral fingerprinting into your web application.
Installation
Add the Tracio SDK to your frontend:
<script src="https://cdn.keepflow.ai/tracio/v1/sdk.js"></script>Or install via npm:
npm install @keepflow/tracioInitialization
const tracio = new Tracio({ projectId: 'your-project-id', apiKey: 'your-api-key', });
// Start collecting behavioral signals tracio.start(); ```
Identity resolution
When you need to identify a user (e.g., during login or checkout):
const identity = await tracio.identify();
console.log(identity.fingerprintId); // Unique device identifier
console.log(identity.riskScore); // 0-100, higher = more suspiciousBot detection
Tracio automatically detects bot traffic. Use the `isBot` flag:
const result = await tracio.check();
if (result.isBot) {
// Handle bot traffic
}