Skip to main content

Overview

A strong analytics setup starts with the decisions you want to make, not the SDK calls. This guide helps you choose events, properties, and auto-event settings so you can answer questions about acquisition, activation, engagement, and retention for agentic and AI-native products.

The two pillars of data

Trodo builds user profiles from:

1. Events (what happened)

Actions in your product—captured automatically where enabled, and explicitly everywhere that matters:
Event typeExamplesWhy track it
NavigationPage views, deep links into a runContent and entry-point performance
Product usagePrompt sent, agent run started, tool approvedFeature adoption and workflow health
ConversionsSignup, subscription, export completedFunnel progression
EngagementScroll, time on task, session depthQuality of experience

2. User properties (who they are)

Stable traits and segments:
Property typeExamplesWhy track it
Identityuser_id, email (via identify / people)Return visits and support
ContextPlan, role, workspace, environmentSegmentation
Product stateAgent mode, model choice, integration countPower users vs. evaluators
LifecycleSignup date, activation flagsCohorts and retention
Use People and Identify to keep these fresh.

Planning your implementation

Step 1: Define your key questions

  • Which channels drive signups and activated accounts?
  • Which landing pages lead to first successful agent run?
  • How does paid vs. organic compare for qualified trials?
  • What share of new users complete the “aha” workflow in day one?
  • How long from signup to first value event?
  • Where do users stall in onboarding or templates?
  • Which features correlate with weekly active use?
  • How often do users run agents vs. only browse?
  • What predicts expansion or seat growth?
  • Where do users retry, edit prompts, or cancel runs?
  • Which error types are most common after a release?
  • How does satisfaction proxy (e.g. thumbs, export) trend by cohort?

Step 2: Map questions to events

Question: “Which campaign drives the most activated accounts?” Events
  • page_view with UTM (auto when auto-events are on)
  • signup_completed (custom)
  • agent_run_succeeded or your chosen activation event (custom)
Properties
  • utm_source, utm_medium, utm_campaign (auto when present on URLs)
  • plan, role (via people.set after identify)

Question: “Where do users drop between starting a run and a successful outcome?” Events
  • agent_run_started
  • tool_call_requested / tool_call_completed (as appropriate)
  • agent_run_succeeded / agent_run_failed
Properties
  • workflow_id, template_id, model, surface (web vs. embed)

Step 3: Choose auto-events

Auto-events are off until you set auto-events="true" (or enable them in code). Enable the bundle, then disable what you do not want:
Auto-eventDisable if…
text_selection / copy_actionClipboard or selection is sensitive
rage_click / dead_clickYou only want raw element_click
page_performanceYou already capture Web Vitals elsewhere
js_error / network_errorAnother pipeline owns client errors
<script>
  var script = document.createElement('script');
  script.src = 'https://cdn.trodo.ai/scripts/analytics/trodo.script.min.js';  
  script.setAttribute('site-id', 'your-site-id');
  script.setAttribute('auto-events', 'true');
  script.setAttribute('auto-events-disabled-events', 'text_selection,copy_action');
  document.head.appendChild(script);
</script>
See Auto-Events for the full catalog and runtime API.

Step 4: Plan custom events

// Agent workflow
Trodo.track('agent_run_started', {
  workflow_id: 'weekly_report',
  surface: 'in_app',
  model: 'gpt-4o'
});

Trodo.track('agent_run_completed', {
  workflow_id: 'weekly_report',
  duration_seconds: 42,
  outcome: 'success'
});

// Friction
Trodo.track('agent_run_failed', {
  workflow_id: 'weekly_report',
  error_class: 'timeout',
  retry_count: 1
});

Step 5: Identify and set traits

At login or account creation:
Trodo.identify(user.id);
Trodo.people.set({
  email: user.email,
  plan: user.plan,
  workspace_id: user.workspaceId
});

Naming conventions

Use consistent snake_case event and property names:
Trodo.track('agent_run_completed', { ... });
Trodo.track('integration_connected', { ... });
Trodo.track('onboarding_step_completed', { ... });
Properties
  • Use snake_case: workflow_id, template_id, retry_count
  • Prefer stable IDs over display strings when breaking down in reports

Example event sets

Agent / copilot app

'prompt_submitted'
'agent_run_started'
'agent_run_completed'
'agent_run_failed'
'tool_approval_requested'
'tool_approval_granted'
'message_copied'
'export_generated'

Automation / builder SaaS

'workflow_created'
'workflow_published'
'run_scheduled'
'run_succeeded'
'run_failed'
'integration_enabled'

AI-enabled classic SaaS

'feature_used'            // with feature_name: 'ai_summarize'
'ai_suggestion_accepted'
'ai_suggestion_dismissed'
'subscription_upgraded'

Implementation checklist

1

Install the SDK

CDN, npm, or tag manager
2

Configure auto-events

Turn on and trim noise for your surfaces
3

Add custom events

Cover activation, success, and failure paths
4

Identify users

Call identify() when the account is known
5

Set people properties

Plan, role, workspace, and product flags
6

Verify in the dashboard

Live events and sample profiles

Next steps

Quickstart

Start sending data

Installation

CDN, npm, and GTM