Device Intelligence for React
First-party React hook for device identification. Add visitor identification, bot detection, and smart signals to your React application in minutes.
Quick Install
Add the SDK to your project with your preferred package manager.
npm install @tracio/clientyarn add @tracio/clientpnpm add @tracio/clientBasic Usage
Get up and running with the minimal setup.
import { useTraceId } from '@tracio/client/react'function App() { const { visitorId, confidence } = useTraceId() return <div>Visitor: {visitorId}</div>}Advanced Patterns
Production-ready patterns with error handling, loading states, and advanced configuration.
Hook with Error Boundary & Loading State — Click to expand
import { useTraceId } from '@tracio/client/react'function ProtectedPage() { const { visitorId, confidence, isLoading, error } = useTraceId({ timeout: 15000, endpoint: '/fp/identify', }) if (isLoading) return <Spinner /> if (error) return <ErrorBanner message={error.message} /> return ( <div> <p>Visitor: {visitorId}</p> <p>Confidence: {(confidence * 100).toFixed(1)}%</p> </div> )}Configuration Options
All available options for initializing and configuring the SDK.
apiKeystringYour API key from the dashboardendpointstringCustom endpoint URL for proxy-routed deploymentsregionstringData region (us, eu, ap)timeoutnumberRequest timeout in millisecondsextendedResultbooleanAdds bot detection, incognito mode flags, and smart signalslinkedIdstringCustom identifier to associate visits (e.g. user ID or session ID)Next Steps
Go deeper with the full API reference, webhook configuration, and advanced guides.
Documentation
Full API reference, integration guides, and best practices.
API Reference
Server API endpoints, request/response schemas, and error codes.
Webhooks
Configure real-time event notifications for every device identification.
Get started with React
Add device fingerprinting to your React application in under 5 minutes.