> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bigdelta.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Identify users and accounts

> Link events to specific users and accounts so Bigdelta knows who is behind the activity.

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)

```javascript theme={null}
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:

```javascript theme={null}
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>"] },
      },
    },
  },
]);
```

<Info>
  `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.
</Info>

<Info>
  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.
</Info>

**What you unlock:**

* Events are attributed to specific users and accounts
* **[User records](/guide/features/records)** — appear in your workspace linked to their accounts

<Frame caption="User records in your workspace">
  <img src="https://mintcdn.com/bigdelta/hmhLNT9eENs3z0DP/images/user%20list.png?fit=max&auto=format&n=hmhLNT9eENs3z0DP&q=85&s=be2dc9d8caf1a2ce217600d0c8a1cf1c" width="3002" height="1352" data-path="images/user list.png" />
</Frame>

* **[User activities](/guide/features/activities)** — Added User and Removed User are tracked per account

<Frame caption="Added User and Removed User activities">
  <img src="https://mintcdn.com/bigdelta/hmhLNT9eENs3z0DP/images/added%20removed%20user.png?fit=max&auto=format&n=hmhLNT9eENs3z0DP&q=85&s=f429e502bef369050b718166e702c0c0" width="324" height="204" data-path="images/added removed user.png" />
</Frame>
