Collecting user identitiy

At least once per session, the credentials of the logged-in user must be transmitted. To do this, there are two user data that can be used:

  • logged in user's email
  • your internal user identifier if it was communicated in the refId property of the contacts

Note

Internal user identifier corresponds to the refId property (Contact ID field of the contact editing interface)

Note

All Javascript codes below must be executed after initialization of the Skalin script.

# Use of user email

The code below is used to collect a user identification event:

<script type="text/javascript">
ska(function(skalin){
   skalin.identity({ email: {{UserEmail}} });
});
</script>;
UserEmail Logged user's email already referenced in Skalin

# Use of your user ID

The code below is used to collect a user identification event:

<script type="text/javascript">
ska(function(skalin){
   skalin.identity({ id: {{UserId}} });
});
</script>;
UserId Logged user's ID already referenced in Skalin

# Multi-account users special-case

In the event that all or part of your users (non-internal) have access to several customer accounts, it is recommended to specify to the Skalin SDK the current customer for which the user is using your platform.

Note

This feature is optional if your users only have access to one unique client.

The code below is used to specify the current customer of the user:

<script type="text/javascript">
ska(function(skalin){
   skalin.customerId({{CustomerId}});
});
</script>;
CustomerId Internal identifier of the customer or his domain

Note

Internal customer identifier corresponds to the refId property (Customer ID field of the customer editing interface)