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)

# Use of user email

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

curl -G --location \
--request POST 'https://collect.skalin.io/hit' \
--data-urlencode 'rec=1' \
--data-urlencode 'action=ui' \
--data-urlencode 'client_id={{ClientId}}' \
--data-urlencode 'customer_id={{CustomerId}}' \
--data-urlencode 'event_id={{EventId}}' \
--data-urlencode 'visitor_id={{VisitorId}}' \
--data-urlencode 'visit_id={{VisitId}}' \
--data-urlencode 'localtime={{LocalTime}}' \
--data-urlencode 'identity={"email":"{{UserEmail}}"}' \
--data-urlencode 'url={{Url}}'

With NodeJS and axios (opens new window) library

axios({
  method: 'POST',
  url: 'https://collect.skalin.io/hit',
  headers: {
    'Cache-Control': 'no-cache'
  },
  params: {
    rec: 1,
    action: 'ui',
    client_id: '{{ClientId}}',
    customer_id: '{{CustomerId}}',
    event_id: '{{EventId}}',
    visitor_id: '{{VisitorId}}',
    visit_id: '{{VisitId}}',
    localtime: '{{LocalTime}}',
    identity: {"email":"{{UserEmail}}"},
    url: '{{Url}}'
  }
});

ClientId

your client ID which was provided to you by Skalin or is available in the Settings> General section

CustomerId (optional) customer identifier or customer domain name (the CustomerId is only useful if the same contact can connect to several entities with the same identifier)
EventId (optional / auto-generated) Event's unique identifier of 16 characters. Allows you to manage de-duplication (The last transmitted will be kept).
VisitorId Contact / visitor's unique identifier. 16 character uid
VisitId Visit or session's unique identifier. 16 character uid (used to count visits. If VisitId is not filled in or is different for each call, each call will be counted as a new visit).
LocalTime (optional) User's localtime (`08:00:05`)
UserEmail Logged user's email already referenced in Skalin
Url (optional) Feature's url on your platform

# Use of your user ID

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

curl -G --location \
--request POST 'https://collect.skalin.io/hit' \
--data-urlencode 'rec=1' \
--data-urlencode 'action=ui' \
--data-urlencode 'client_id={{ClientId}}' \
--data-urlencode 'customer_id={{CustomerId}}' \
--data-urlencode 'event_id={{EventId}}' \
--data-urlencode 'visitor_id={{VisitorId}}' \
--data-urlencode 'visit_id={{VisitId}}' \
--data-urlencode 'localtime={{LocalTime}}' \
--data-urlencode 'identity={"id":"{{UserId}}"}' \
--data-urlencode 'url={{Url}}'

With NodeJS and axios (opens new window) library

axios({
  method: 'POST',
  url: 'https://collect.skalin.io/hit',
  headers: {
    'Cache-Control': 'no-cache'
  },
  params: {
    rec: 1,
    action: 'ui',
    client_id: '{{ClientId}}',
    customer_id: '{{CustomerId}}',
    event_id: '{{EventId}}',
    visitor_id: '{{VisitorId}}',
    visit_id: '{{VisitId}}',
    localtime: '{{LocalTime}}',
    identity: {"id":"{{UserId}}"},
    url: '{{Url}}'
  }
});

ClientId

your client ID which was provided to you by Skalin or is available in the Settings> General section

CustomerId (optional) customer identifier or customer domain name (the CustomerId is only useful if the same contact can connect to several entities with the same identifier)
EventId (optional / auto-generated) Event's unique identifier of 16 characters. Allows you to manage de-duplication (The last transmitted will be kept).
VisitorId Contact / visitor's unique identifier. 16 character uid
VisitId Visit or session's unique identifier. 16 character uid (used to count visits. If VisitId is not filled in or is different for each call, each call will be counted as a new visit).
LocalTime (optional) User's localtime (`08:00:05`)
UserId Logged user's ID already referenced in Skalin
Url (optional) Feature's url on your platform