Fraud Telemetry
Introduction
The Fraud Telemetry collector is a crucial component of Autohost's ID Verification system that helps protect your platform against fraud and identity theft. It works by collecting and analyzing various device and browser characteristics to detect potential fraudulent behavior and suspicious patterns.
Why Use Fraud Telemetry?
When implementing ID Verification with Autohost SDK, the Fraud Telemetry collector provides an additional layer of security by:
- Detecting suspicious device patterns and behaviors
- Identifying potential automated attacks or bot activity
- Tracking geolocation anomalies
- Analyzing browsers for known fraud patterns
When to Collect Telemetry
For optimal fraud detection, we recommend triggering the fraud collector at least twice during a user session:
- Initial Session Start: When the user first accesses your ID verification flow
- Pre-Submission: Just before the user submits their ID verification documents
This dual-collection approach allows us to:
- Establish a baseline of user behavior at the start
- Detect any suspicious changes in device or location during the verification process
- Provide more accurate risk assessment
Installation
Add the Autohost SDK to your HTML file by including the following script tag in your head section:
<script src="https://sdk.autohost.ai/dist/AutohostSDK.v3.bundle.js"></script>
Usage
The SDK will be available globally as AutohostSDK
. There are two ways to use the fraud collector:
1. Using the Autohost Client (Recommended)
If you're already using the Autohost SDK client for other features, you can easily access all required parameters from the client object:
async function init() {
const client = await AutohostSDK.init({
reservationId: "autohost-reservation-id",
sandbox: true, // set to false for production
});
// Create the context object with required data
const context = {
reservationID: client.reservation?.get().id,
listingID: client.reservation?.get().lid,
userID: client.reservation?.get().hid,
};
// Optional configuration options
const options = {
sandbox: true, // set to false for production
disableGeolocation: false // set to true to disable location collection
};
window.AutohostSDK.fraudCollector(context, options)
.then(() => {
console.log("Fraud detection data sent successfully");
})
.catch((error) => {
console.error("Error sending fraud detection data:", error);
});
}
init();
2. Manual Configuration
Alternatively, you can manually create the context and options objects:
// Required context object with user profile data
const context = {
userID: "autohost-user-id", // Required
reservationID: "autohost-reservation-id", // Required
listingID: "autohost-listing-id", // Required
};
// Optional configuration options
const options = {
sandbox: false, // set to true for testing
disableGeolocation: false // set to true to disable location collection
};
Call the fraudCollector
function with both objects:
window.AutohostSDK.fraudCollector(context, options)
.then(() => {
console.log("Fraud detection data sent successfully");
})
.catch((error) => {
console.error("Error sending fraud detection data:", error);
});
Complete Example
Here's a complete example showing how to implement the fraud collector with the client object:
<!DOCTYPE html>
<html>
<head>
<script src="https://sdk.autohost.ai/dist/AutohostSDK.v3.bundle.js"></script>
</head>
<body>
<script>
async function init() {
// Initialize the client with your configuration
const client = await AutohostSDK.init({
reservationId: "autohost-reservation-id",
sandbox: true,
});
// Create the context object with required data
const context = {
reservationID: client.reservation.get().id,
listingID: client.reservation.get().lid,
userID: client.reservation.get().hid,
};
// Optional configuration options
const options = {
sandbox: true,
disableGeolocation: false
};
// Start the fraud collector
window.AutohostSDK.fraudCollector(context, options)
.then(() => {
console.log("Fraud detection data sent successfully");
})
.catch((error) => {
console.error("Error sending fraud detection data:", error);
});
}
init();
</script>
</body>
</html>