Overview
This guide covers practical patterns for agentic apps, copilots, and modern SaaS: authentication, core product events, onboarding, and framework hooks.Implementation workflow
Common patterns
Authentication flow
Agent run lifecycle
Onboarding flow
Error tracking
Framework-specific patterns
React (session + identity)
Next.js App Router
Vue 3 Composition API
Groups (companies, workspaces)
add_group / remove_group when a user can belong to multiple IDs under one key.
Testing your implementation
Debug mode
Verification checklist
Common issues
Events not appearing
Events not appearing
- Site ID and domain allowlist
- Ad blockers and privacy extensions
- Console errors or blocked network calls
User not identified
User not identified
- Call
identify()after the SDK is ready - Use a string ID
- Validate JSON-serializable properties
Duplicate events
Duplicate events
- Avoid double script injection
- Debounce high-frequency handlers if you mirror auto-events manually
Next steps
SDK reference
Full method documentation
Insights
Build reports