Overview
Trodo can be installed via CDN script, npm package, or through tag managers. Choose the method that best fits your tech stack.- CDN (Recommended)
- npm Package
- Google Tag Manager
CDN Installation
The fastest way to get started. Add this script to your HTML<head>:Configuration Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
site-id | string | required | Your unique site identifier |
auto-events | string | omitted (= off) | Set to true to enable automatic event tracking; any other value leaves auto-events disabled |
auto-events-disabled-paths | string | '' | Comma-separated paths to exclude |
auto-events-disabled-events | string | '' | Comma-separated auto event names to disable (see Auto-Events) |
Full Configuration Example
Complete HTML Example
Trodo object is available:Verification
After installation, verify it’s working:1. Check Browser Console
Open developer tools (F12) and look for:2. Check Live Events
- Go to your Trodo dashboard
- Navigate to Live Events or Debugger
- Perform actions on your site
- Events should appear within 60 seconds
3. Network Tab
In browser dev tools → Network tab, look for requests to:api.trodo.ai/eventsapi.trodo.ai/sessions
Troubleshooting
Script blocked by Content Security Policy
Script blocked by Content Security Policy
Add these domains to your CSP:
Events not appearing
Events not appearing
- Verify Site ID is correct
- Check domain is whitelisted in settings
- Disable ad blockers temporarily
- Check browser console for errors
Double-counting events
Double-counting events
Ensure the script is only loaded once. If using both CDN and npm, choose one.
Script loading slowly
Script loading slowly
The CDN script is ~15KB gzipped. If performance is critical:
- Use
asyncloading (default) - Consider npm package for bundling
- Load after critical resources
Next Steps
Auto-Events
Configure automatic event tracking
Track Custom Events
Learn the track() method