Skip to main content
Tell Bigdelta who is behind the activity by calling identify. This links events to specific users and accounts. Call identify after every successful login, signup, and session restore. Make sure you have called it before tracking events — it is important so track events are attributed to the right records. What you need to provide:
  • User ID (unique user identifier in your system)
  • Account ID (unique account identifier in your system)
const client = new Bigdelta({ trackingKey: '<TRACKING_KEY>' });

// Identify the user and their account
client.identify({ users: '<USER_ID>', accounts: '<ACCOUNT_ID>' });

// Set properties on user and account records
client.setRecordProperties([
  {
    id: client.getIdentifier('users'),
    slug: 'users',
    properties: {
      set_once: {
        email_address: { "$type": "email", "email": ["<USER_EMAIL>"] },
      },
    },
  },
  {
    id: client.getIdentifier('accounts'),
    slug: 'accounts',
    properties: {
      set_once: {
        email_address: { "$type": "email", "email": ["<ACCOUNT_OWNER_EMAIL>"] },
      },
    },
  },
]);

Signup only

On signup, extend the accounts entry with account_since. Using set_once ensures it is never overwritten on later logins:
client.identify({ users: '<USER_ID>', accounts: '<ACCOUNT_ID>' });

client.setRecordProperties([
  {
    id: client.getIdentifier('users'),
    slug: 'users',
    properties: {
      set_once: {
        email_address: { "$type": "email", "email": ["<USER_EMAIL>"] },
      },
    },
  },
  {
    id: client.getIdentifier('accounts'),
    slug: 'accounts',
    properties: {
      set_once: {
        account_since: '<DATE_OF_ACCOUNT_CREATION_ISO_8601>',
        email_address: { "$type": "email", "email": ["<ACCOUNT_OWNER_EMAIL>"] },
      },
    },
  },
]);
account_since is required for the Account Creation activity and is used to calculate activation and conversion metrics. Without it, Bigdelta cannot determine when an account was created, making these metrics unavailable.
The email_address on the account record is required to connect your product data with revenue data from your payment processor. Without it, Bigdelta cannot match product accounts to billing accounts.
What you unlock:
  • Events are attributed to specific users and accounts
  • User records — appear in your workspace linked to their accounts