Custom Properties
Attach persistent traits to a user — plan, company, signup date — that travel across every run and session.
User properties are persistent traits on a user's profile: plan, company, signup date, feature flags. Unlike per-run metadata, they live on the user and apply across every run and event for that person.
Set properties
Bind to a user with forUser (or identify), then set traits on their profile.
const user = trodo.forUser('user-42');
await user.people.set({ plan: 'pro', company: 'Acme' });
// Or the direct form:
await trodo.people.set('user-42', { plan: 'pro' });user = trodo.for_user('user-42')
user.people.set({'plan': 'pro', 'company': 'Acme'})
# Or the direct form:
trodo.people_set('user-42', {'plan': 'pro'})Methods
| Method (Node / Python) | What it does |
|---|---|
people.set | Set or overwrite properties |
people.setOnce / people.set_once | Set only if not already present |
people.increment | Add to a numeric property |
people.append | Append to a list property |
people.union | Add unique values to a list |
people.remove | Remove a value from a list |
people.unset | Delete properties |
people.trackCharge / people.track_charge | Record revenue on the user |
Properties vs. metadata
| Lives on | Scope | |
|---|---|---|
| User property | The user | Persistent, across all runs and events |
| Metadata | A run or span | That single execution |
Next
- Metadata for per-run and per-span tags
- Identification to bind runs to a user