Skip to main content

Overview

The Cryptique.people object provides methods to set and manage persistent user properties. Unlike event properties (which describe a single action), user properties describe the user themselves and persist across sessions.
User properties are ideal for storing user attributes like plan type, signup date, preferences, and cumulative metrics.
This page is the API reference for Cryptique.people.* methods. If you want to understand how user profiles are structured — what fields they contain, how they’re created, and how wallet enrichment adds properties automatically — see the User Profile Data Model.

Method Reference

MethodDescription
people.set()Set user properties (overwrites existing)
people.set_once()Set properties only if not already set
people.increment()Increment numeric properties
people.append()Append to list properties
people.union()Add unique values to list properties
people.remove()Remove values from list properties
people.unset()Remove properties entirely
people.deleteUser()Delete the user profile
people.trackCharge()Track revenue/payment
people.clearCharges()Clear all charges

people.set()

Set user properties. Overwrites any existing values.
Cryptique.people.set(properties)
properties
object
required
Object containing property key-value pairs to set.

Examples

// Set multiple properties
Cryptique.people.set({
  email: 'user@example.com',
  plan: 'pro',
  company: 'Acme Inc',
  signupDate: '2025-01-15'
});

// Update a single property
Cryptique.people.set({
  plan: 'enterprise'
});

// Set Web3-specific properties
Cryptique.people.set({
  primaryWallet: '0x742d35Cc6634C0532925a3b844Bc9e7595f5bB21',
  preferredChain: 'ethereum',
  totalSwaps: 47,
  firstTransactionDate: '2024-03-20'
});

people.set_once()

Set properties only if they haven’t been set before. Useful for immutable properties like signup date or referral source.
Cryptique.people.set_once(properties)
properties
object
required
Object containing property key-value pairs to set once.

Examples

// Only sets if not already present
Cryptique.people.set_once({
  signupDate: new Date().toISOString(),
  referralSource: 'twitter',
  initialPlan: 'free'
});

// These won't overwrite existing values
Cryptique.people.set_once({
  signupDate: '2025-02-01'  // Ignored if signupDate exists
});

people.increment()

Increment (or decrement) numeric properties.
Cryptique.people.increment(properties)
properties
object
required
Object with property names as keys and increment amounts as values. Use negative numbers to decrement.

Examples

// Increment by 1
Cryptique.people.increment({
  totalSwaps: 1,
  loginCount: 1
});

// Increment by specific amounts
Cryptique.people.increment({
  totalVolumeUSD: 2500,
  tokensTraded: 5
});

// Decrement (use negative numbers)
Cryptique.people.increment({
  creditsRemaining: -10
});

people.append()

Append values to list properties.
Cryptique.people.append(properties)
properties
object
required
Object with property names as keys and values to append.

Examples

// Append to a list
Cryptique.people.append({
  connectedWallets: '0x789...',
  tradedTokens: 'USDC',
  visitedPages: '/swap'
});

// Can create duplicates
Cryptique.people.append({
  tradedTokens: 'ETH'  // Added even if 'ETH' exists
});

people.union()

Add unique values to list properties (no duplicates).
Cryptique.people.union(properties)
properties
object
required
Object with property names as keys and arrays of values to union.

Examples

// Add unique values only
Cryptique.people.union({
  tradedTokens: ['ETH', 'USDC', 'DAI'],
  usedFeatures: ['swap', 'stake', 'bridge']
});

// Won't add duplicates
Cryptique.people.union({
  tradedTokens: ['ETH']  // Ignored if 'ETH' already exists
});

people.remove()

Remove specific values from list properties.
Cryptique.people.remove(properties)
properties
object
required
Object with property names as keys and values to remove.

Examples

// Remove specific values from lists
Cryptique.people.remove({
  connectedWallets: '0x789...',
  watchlist: 'DOGE'
});

people.unset()

Remove properties entirely from the user profile.
Cryptique.people.unset(propertyNames)
propertyNames
string | string[]
required
Property name(s) to remove.

Examples

// Remove a single property
Cryptique.people.unset('temporaryFlag');

// Remove multiple properties
Cryptique.people.unset(['oldProperty', 'deprecatedField']);

people.deleteUser()

Permanently delete the user profile and all associated data.
Cryptique.people.deleteUser()
This action is irreversible. The user’s profile and all properties will be permanently deleted.

Example

// Delete user profile (e.g., for GDPR requests)
async function handleAccountDeletion() {
  await deleteUserFromDatabase(userId);
  Cryptique.people.deleteUser();
  Cryptique.reset();
}

people.trackCharge()

Track a payment or revenue event associated with the user.
Cryptique.people.trackCharge(amount, properties?)
amount
number
required
The charge amount (in your preferred currency).
properties
object
Optional properties describing the charge.

Examples

// Track a simple charge
Cryptique.people.trackCharge(99.99);

// Track with properties
Cryptique.people.trackCharge(49.99, {
  plan: 'pro',
  billingCycle: 'monthly',
  currency: 'USD'
});

// Track crypto payments
Cryptique.people.trackCharge(0.5, {
  currency: 'ETH',
  valueUSD: 950,
  txHash: '0x123...',
  product: 'NFT Mint'
});

people.clearCharges()

Clear all tracked charges for the user.
Cryptique.people.clearCharges()

Example

// Clear charges (e.g., after refund)
Cryptique.people.clearCharges();

Reserved Property Names

These property names are reserved and cannot be used:
// ❌ Don't use these
{
  $name,
  $email,
  $charges,
  $phoneno
}

Property Limits

ConstraintLimit
Max properties per user500
Max property key length255 characters
Max string value length255 bytes (UTF-8)
Max object value size256 KB
Max object nesting depth3 levels
See Implementation Guide for complete details.

Complete Example

// On signup
Cryptique.identify(user.id);

Cryptique.people.set({
  email: user.email,
  plan: 'free'
});

Cryptique.people.set_once({
  signupDate: new Date().toISOString(),
  referralSource: utmSource
});

// On first trade
Cryptique.people.increment({ totalTrades: 1 });
Cryptique.people.union({ tradedTokens: ['ETH', 'USDC'] });

// On upgrade
Cryptique.people.set({ plan: 'pro' });
Cryptique.people.trackCharge(99, {
  plan: 'pro',
  billingCycle: 'annual'
});

// On connecting new wallet
Cryptique.people.append({
  connectedWallets: newWalletAddress
});

// On disconnecting wallet
Cryptique.people.remove({
  connectedWallets: removedWalletAddress
});

Identify Users

Link sessions to identities

Groups

Organizations and group profiles

Track Events

Track user actions