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

# Identify

> Identify users in your application for widget rules

## identify(data)

Identifying your users will help you find their sessions in the Tolstoy dashboard, and apply specific rules and behaviours on their widget's display.

It's recommended to call identify right after your user's signup/login, when you have identifying data to use (such as email, signup date, etc.).

### Parameters

<ParamField query="data" type="Data" required>
  Required params for identifying the user, one or both of the following:

  <Expandable title="Data">
    <ParamField query="userId" type="string" required>
      Your system userId.
    </ParamField>

    <ParamField query="email" type="string" required>
      Your user's email address
    </ParamField>
  </Expandable>
</ParamField>

<ParamField query="signedUpAt" type="string">
  Your user's sign up date.

  For example: `2021-08-27`.
</ParamField>

<ParamField query="customAttributes" type="Object">
  Add any additional attributes (maximum of 100 attributes)

  <Note>Date format must be `YYYY-MM-DD`</Note>
</ParamField>

```javascript theme={null}
window.tolstoyWidget.identify({
  userId: "123",
  email: "user@test.com",
  signedUpAt: "2021-09-01",
  customAttributes: { package: "free", age: 28, activationDate: "2021-09-10" },
});
```

## Single Tolstoy Code

If you want only a single widget on a single page you can also load just the Widget ID

<Warning>By using this you won't be able to use rules and conditions.</Warning>

```javascript theme={null}
# Replace the window.tolstoyAppKey='{{APP_KEY}}';
window.tolstoyWidgetId='{{TOLSTOY_ID}}'
```

### Tolstoy users

If you know the logged in user you can add his email for better tracking.

If you want to add specific Rules & Triggers on users you can skip this and use [Identify](/javascript-sdk/installation).

```javascript theme={null}
window.tolstoyUser = "{{email}}";
```
