📋
Tolstoy
  • Welcome
  • API Reference
    • User
    • Video
    • Webhook
    • Project
  • JavaScript SDK
    • Installation
    • Configuration
    • Identify
    • Events
Powered by GitBook
On this page
  • identify(data)

Was this helpful?

  1. JavaScript SDK

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.).

Params:

  • data

    • Required params for identifying the user, one or both of the following:

      • userId - your system userId.

      • email - your user's email address.

    • Any of the following properties are optional:

      • signedUpAt - your user's sign up date. For example: 2021-08-27.

    • Custom Attributes - you can add any additional attributes (maximum of 100 attributes)

      • customAttributes - object with data

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

Date format must be 'YYYY-MM-DD'

PreviousConfigurationNextEvents

Last updated 3 years ago

Was this helpful?