RespondoTracioCodeVeilTelmMeeto
من نحنالمدونةتواصل معنا

دمج Tracio

يغطّي هذا الدليل دمج بصمة السلوك (behavioral fingerprinting) من Tracio في تطبيق الويب الخاص بك.

التثبيت

أضِف Tracio SDK إلى الواجهة الأمامية:

<script src="https://cdn.keepflow.ai/tracio/v1/sdk.js"></script>

أو ثبِّته عبر npm:

npm install @keepflow/tracio

التهيئة

import { Tracio } from '@keepflow/tracio';

const tracio = new Tracio({
  projectId: 'your-project-id',
  apiKey: 'your-api-key',
});

// Start collecting behavioral signals
tracio.start();

تحديد الهوية

عندما تحتاج إلى تحديد هوية مستخدم (مثلًا أثناء تسجيل الدخول أو إتمام الشراء):

const identity = await tracio.identify();
console.log(identity.fingerprintId); // Unique device identifier
console.log(identity.riskScore);     // 0-100, higher = more suspicious

كشف البوتات

يكتشف Tracio حركة مرور البوتات تلقائيًا. استخدم الراية isBot:

const result = await tracio.check();
if (result.isBot) {
  // Handle bot traffic
}