tracio.aidocs

Getting Started

  • Overview
  • Quick Start
  • How It Works

SDK & API

  • Device Identification JS Agent
  • Trace API Reference
  • Trace Webhooks

Features

  • Device Identification Engine
  • Bot Detection
  • Trace Signals
  • IP Intelligence

Advanced

  • Cloud Deployment
  • Privacy & GDPR
  • Migration from FPJS

Reference

  • Changelog
  • Troubleshooting
  • Error Handling
  • Testing

Device Identification JS Agent

128KB browser SDK — load(), get(), configuration options, and signal collection lifecycle

Installation

npm install @tracio/client

Configuration

import Tracio from '@tracio/client';
const tracio = await Tracio.load({
apiKey: 'your-api-key',
endpoint: 'https://your-server.com/api',
region: 'eu', // 'us' | 'eu' | 'ap'
timeout: 10000, // ms
});

Options Reference

OptionTypeDefaultDescription
apiKeystringrequiredYour API key
endpointstringautoCustom server endpoint URL
regionstring"us"Server region
timeoutnumber10000Request timeout in milliseconds

API Methods

Tracio.load(options)

Initialize the SDK and begin signal collection. Returns a promise that resolves to the tracio.ai agent instance.

tracio.get(options?)

Collect signals and return identification results. Options:

OptionTypeDescription
extendedResultbooleanReturn additional metadata (bot detection, IP info, smart signals)
tagobjectCustom metadata attached to this event
linkedIdstringLink this event to an external identifier

Response Format

// Basic result
{
visitorId: "X7fh2Hg9LkQp3Nv",
confidence: { score: 0.995 },
requestId: "1710432000_abc123def",
}
// Extended result (extendedResult: true)
{
visitorId: "X7fh2Hg9LkQp3Nv",
confidence: { score: 0.995 },
requestId: "1710432000_abc123def",
bot: { result: "notDetected", probability: 0.0 },
ipLocation: {
city: { name: "Prague" },
country: { code: "CZ", name: "Czechia" },
latitude: 50.05,
longitude: 14.4,
},
incognito: false,
vpn: { result: false },
}

Error Handling

try {
const result = await tracio.get();
} catch (error) {
if (error.message === 'timeout') {
// Request timed out — retry or proceed without fingerprint
} else if (error.message === 'network_error') {
// Network unavailable
} else {
// Unexpected error
console.error('tracio.ai error:', error);
}
}