Proxy integration via Cloudflare Workers for first-party routing. Add visitor identification, bot detection, and smart signals to your Cloudflare application in minutes.
Add the SDK to your project with your preferred package manager.
npm install wrangleryarn add wranglerpnpm add wranglerGet up and running with the minimal setup.
// Cloudflare Workerexport default { async fetch(request, env) { const url = new URL(request.url) if (url.pathname.startsWith('/tracio/')) { return fetch('https://api.tracio.ai' + url.pathname) } return fetch(request) }}Production-ready patterns with error handling, loading states, and advanced configuration.
// Cloudflare Worker — production proxyexport default { async fetch(request: Request, env: Env): Promise<Response> { const url = new URL(request.url) if (!url.pathname.startsWith('/tracio/')) { return fetch(request) } // Strip the /fp prefix and proxy to your tracio.ai server const targetPath = url.pathname.replace(/^\/tracio/, '') const target = `https://${env.TRACIO_ORIGIN}${targetPath}${url.search}` const headers = new Headers(request.headers) headers.set('X-Forwarded-For', request.headers.get('CF-Connecting-IP') || '') headers.set('X-Real-IP', request.headers.get('CF-Connecting-IP') || '') const response = await fetch(target, { method: request.method, headers, body: request.method !== 'GET' ? request.body : undefined, }) // Cache static agent script for 1 hour const res = new Response(response.body, response) if (targetPath.includes('/agent')) { res.headers.set('Cache-Control', 'public, max-age=3600') } return res },}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)Go deeper with the full API reference, webhook configuration, and advanced guides.
Full API reference, integration guides, and best practices.
Server API endpoints, request/response schemas, and error codes.
Configure real-time event notifications for every device identification.
Add device fingerprinting to your Cloudflare application in under 5 minutes.