Skip to content

Identify Users

Trackey edited this page May 16, 2023 · 7 revisions

Identifying a user is a required step for using trackey. Thanks to the identification we are able to associate the user with all its previous responses and with the data received through the integrations.

The identify call looks like this

trackey_sdk.identifyUser({
  userId: '<user-id>',
  email: '<user-email>',
});

The unique identity can be provided through the userId or the email fields. At least one of them must be provided, and ideally both. It is preferable to pass the userId, which won't change throughout the whole user lifecycle, unlike the email, that can change.

Properties

You can also pass user properties that will be stored for later usage(in the segments or as liquid tags). The properties are listed in the object as with property1 and property2.

To know more about Trackey properties, customer or companies, head to [properties](/properties)
trackey_sdk.identifyUser({
  userId: '<user-id>',
  email: '<user-email>',
  flowsCreated: 12,
  gender: 'female'
});

To know more about Trackey properites head to properties

##Survey Initialization After calling the identifyUser function, Trackey will automatically determine the most appropriate survey for the user and show it to the user.