Device Intelligence for Go
Server-side event verification with the official Go SDK. Add visitor identification, bot detection, and smart signals to your Go application in minutes.
Quick Install
Add the SDK to your project with your preferred package manager.
npm install github.com/tracio-ai/tracio-goyarn add github.com/tracio-ai/tracio-gopnpm add github.com/tracio-ai/tracio-goBasic Usage
Get up and running with the minimal setup.
package mainimport ( "fmt" tracio "github.com/tracio-ai/tracio-go")func main() { client := tracio.NewClient("your-secret-key") event, _ := client.GetEvent(requestID) fmt.Println(event.VisitorID)}Advanced Patterns
Production-ready patterns with error handling, loading states, and advanced configuration.
HTTP Middleware with Bot Blocking — Click to expand
package mainimport ( "log" "net/http" tracio "github.com/tracio-ai/tracio-go")func main() { client := tracio.NewClient("your-secret-key") http.HandleFunc("/api/checkout", func(w http.ResponseWriter, r *http.Request) { requestID := r.Header.Get("X-Tracio-Request-ID") event, err := client.GetEvent(requestID) if err != nil { http.Error(w, "Verification failed", http.StatusBadGateway) return } if event.Bot.Result != "notDetected" { http.Error(w, "Bot detected", http.StatusForbidden) return } if event.Confidence < 0.9 { http.Error(w, "Low confidence", http.StatusUnauthorized) return } log.Printf("Visitor %s verified (confidence: %.3f)", event.VisitorID, event.Confidence) w.WriteHeader(http.StatusOK) }) log.Fatal(http.ListenAndServe(":8080", nil))}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 Go
Add device fingerprinting to your Go application in under 5 minutes.