People

Persistent user properties: set, increment, lists, and revenue.

Where events are things a user did, people properties are things a user is: plan, company, signup date, lifetime value. They live on the profile and persist across sessions, so you can segment any report by them.

The browser SDK uses the stored identity automatically. The server SDKs take the distinctId / distinct_id first, or bind once with forUser / for_user.

You don't need to identify() first. Setting a property on a user who has never had a session creates them. From a server, users.upsert / upsert_user does the same thing plus any number of properties in one idempotent call — see Custom Properties.

Method map

OperationBrowserNode.jsPython
setTrodo.people.set({ plan: 'pro' })user.people.set({ plan: 'pro' })user.people.set({'plan': 'pro'})
setOnceTrodo.people.set_once({ signupDate })user.people.setOnce({ signupDate })user.people.set_once({...})
incrementTrodo.people.increment({ logins: 1 })user.people.increment('logins', 1)user.people.increment('logins', 1)
appendTrodo.people.append({ tags: 'beta' })user.people.append('tags', ['beta'])user.people.append('tags', ['beta'])
unionTrodo.people.union({ tags: ['beta'] })user.people.union('tags', ['beta'])user.people.union('tags', ['beta'])
removeTrodo.people.remove({ tags: 'beta' })user.people.remove('tags', ['beta'])user.people.remove('tags', ['beta'])
unsetTrodo.people.unset('tempFlag')user.people.unset('tempFlag')user.people.unset('tempFlag')
trackChargeTrodo.people.trackCharge(49.99, {…})user.people.trackCharge(49.99, {…})user.people.track_charge(49.99, {…})

Set properties

Trodo.people.set({ email: 'user@example.com', plan: 'pro', company: 'Acme' });
await trodo.forUser('user-42').people.set({ email: 'user@example.com', plan: 'pro' });
trodo.for_user('user-42').people.set({'email': 'user@example.com', 'plan': 'pro'})

Use setOnce / set_once for immutable traits like signup date or referral source: set only if not already present.

Increment and lists

Trodo.people.increment({ login_count: 1, credits: -10 });   // negative decrements
Trodo.people.union({ enabled_integrations: ['slack'] });    // unique values
const user = trodo.forUser('user-42');
await user.people.increment('login_count', 1);
await user.people.union('enabled_integrations', ['slack']);
user = trodo.for_user('user-42')
user.people.increment('login_count', 1)
user.people.union('enabled_integrations', ['slack'])

append allows duplicates; union keeps values unique; remove deletes values from a list.

Revenue

Trodo.people.trackCharge(49.99, { plan: 'pro', billingCycle: 'monthly' });
await trodo.forUser('user-42').people.trackCharge(49.99, { plan: 'pro' });
trodo.for_user('user-42').people.track_charge(49.99, {'plan': 'pro'})

Clear all charges (after a refund) with clearCharges / clear_charges. Delete a profile entirely (GDPR erasure) with deleteUser / delete_user; this is irreversible.

Reserved names

These keys are rejected — use the unprefixed form (email, name, phone) instead:

$name   $email   $charges   $phoneno

Fixed vs custom properties

Everything on this page is a custom property: a free-form key you choose. Separately there are fixed properties — the profile columns Trodo captures itself and offers as built-in filters (country, city, device, browser, OS, referrer, UTM).

people.set({ country: 'India' }) creates a custom key called country; it does not fill the built-in country filter. From a server, set the real column with users.upsert / upsert_user and fixedProperties — see Custom Properties. Device, browser, OS, referrer and UTM stay browser-only.

Next

  • Groups for account-level properties
  • Identity to bind people to a user

On this page