Overview
This guide gets behavioral analytics live quickly. By the end, you will have:- ✅ Automatic page, click, scroll, and form signals (when
auto-events="true") - ✅ Session tracking via the SDK session model
- ✅ Optional custom events for agent and product workflows
- ✅ Data flowing to your dashboard
Prerequisites
- A Trodo account (sign up here)
- Access to your app’s HTML or frontend build
- Your Site ID from the Trodo dashboard
Step 1: Get your Site ID
- Log in to app.trodo.ai
- Navigate to Settings → Sites
- Click Add Site or select an existing site
- Copy your Site ID
Step 2: Add the tracking script
- CDN (recommended)
- npm
- Google Tag Manager
Add this script to your HTML, just before the closing Replace
</head> tag:YOUR_SITE_ID with your actual Site ID.Step 3: Verify installation
- Open your app in the browser
- Open developer tools (F12)
- Look for:
[Trodo] Initialized successfully - In the Trodo dashboard, open Live Events
- You should see events in near real time
Events can take up to about a minute to appear. If nothing shows after a few minutes, see Troubleshooting.
Step 4: Track custom events
Instrument the actions that define your product—especially agent runs, completions, and failures:Step 5: Identify users
When someone signs in or you know their account ID:What is being tracked?
Withauto-events enabled, the SDK emits a rich set of interaction events. Common examples:
| Event | Description |
|---|---|
page_view | Load or SPA navigation |
element_click | Clicks with element context |
rage_click / dead_click | Frustration and dead-end clicks |
page_scroll | Increasing scroll depth |
form_submit | Form submits (metadata only) |
text_selection / copy_action | Selection and copy signals |
page_summary | Aggregated engagement when leaving or hiding the tab |
Example: complete setup
Minimal pattern for an AI product shell:Troubleshooting
Events not appearing in dashboard
Events not appearing in dashboard
- Check the browser console for errors
- Verify Site ID and domain allowlist in Settings → Sites
- Load the script before interactions you care about
- Disable ad blockers temporarily while testing
Script not loading
Script not loading
- Check Content-Security-Policy rules
- Confirm the CDN URL
- Try the npm package if CSP blocks third-party script
Next steps
What to Track
Plan events for agentic journeys
Build your first report
Insights and metrics
User profiles
How profiles are built
SDK reference
Full API documentation