Skip to Content
SDK Referenceidentify()

identify()

Associates the current user with all future feedback submissions. Must be called before show() or submitRequest().

maestrio.identify("user-123", { name: "Jane Doe", email: "[email protected]", });

Signature

identify( userId: string, userProperties?: UserProperties, systemProperties?: SystemProperties ): void

Parameters

userId

TypeRequiredDescription
stringYesA unique identifier for the user in your system.

Must be a non-empty string. Throws a ValidationError if empty or not a string.

userProperties

Optional object with information about the user.

PropertyTypeRequiredDescription
namestringNoDisplay name
emailstringNoEmail address
[key]unknownNoAny additional custom properties

systemProperties

Optional object with SDK behavior settings.

PropertyTypeDefaultDescription
autoShowbooleanfalseAutomatically show the widget after identifying

Examples

Basic identification

maestrio.identify("user-123");

With user properties

maestrio.identify("user-123", { name: "Jane Doe", email: "[email protected]", avatar: "https://example.com/avatar.jpg", plan: "pro", company: "Acme Inc", });

Auto-show the widget

maestrio.identify( "user-123", { name: "Jane Doe", email: "[email protected]" }, { autoShow: true } );

This is equivalent to calling identify() followed by show().

Behavior

  • The identified user is stored in sessionStorage, so it persists across page navigations within the same tab.
  • Calling identify() again replaces the previous identity.
  • If autoShow is true, the widget is shown immediately after identification.