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.setSet or overwrite properties
people.setOnce / people.set_onceSet only if not already present
people.incrementAdd to a numeric property
people.appendAppend to a list property
people.unionAdd unique values to a list
people.removeRemove a value from a list
people.unsetDelete properties
people.trackCharge / people.track_chargeRecord revenue on the user

Properties vs. metadata

Lives onScope
User propertyThe userPersistent, across all runs and events
MetadataA run or spanThat single execution

Next

On this page