Full-stack Device Identification integration for Next.js (App Router + Pages Router). Add visitor identification, bot detection, and smart signals to your Next.js application in minutes.
Add the SDK to your project with your preferred package manager.
npm install @tracio/clientyarn add @tracio/clientpnpm add @tracio/clientGet up and running with the minimal setup.
// app/layout.tsximport { TracioProvider } from '@tracio/client/react'export default function Layout({ children }) { return ( <TracioProvider apiKey="your-key"> {children} </TracioProvider> )}Production-ready patterns with error handling, loading states, and advanced configuration.
// pages/dashboard.tsximport { TracioServer } from '@tracio/client/node'export async function getServerSideProps(context) { const tracio = new TracioServer({ apiKey: process.env.TRACIO_SECRET }) const requestId = context.query.requestId as string const event = await tracio.getEvent(requestId) return { props: { visitorId: event.products.identification.data.visitorId, confidence: event.products.identification.data.confidence.score, botDetected: event.products.botd.data.bot.result !== 'notDetected', incognito: event.products.incognito.data.result, }, }}export default function Dashboard({ visitorId, confidence, botDetected }) { return ( <div> <h1>Welcome back, {visitorId.slice(0, 8)}...</h1> <p>Confidence: {(confidence * 100).toFixed(1)}%</p> {botDetected && <Alert>Bot activity detected</Alert>} </div> )}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 Next.js application in under 5 minutes.