A User profile contains information about the user like email, phone number, name, etc. Contlo creates a user profile for each user that opens your website, regardless of the login status.

There are two types of users:

  • Anonymous Users: Unidentified users whose profile does not have an email or a phone number. When a new user opens your website, Contlo creates an anonymous profile for them.
  • Identified users: These are users with known email or phone number information.

Set up profile details

To set up the user profile, use the sendUserData() method in the Contlo SDK. You only need to call this method once. This method takes the following as parameters:

  1. User details: Standard information like email, name, phone number, etc.
  2. Subscribed Channels: A list of channels through which you intend to dispatch notifications to the user.
  3. is_profile_update: A boolean value that specifies whether to update an existing profile. True updates primary parameters (Email, phone) of an existing user. If set to False, the profile update depends on the entered values: if it matches an existing user, their information is updated; otherwise, a new user is created for unique values.
contloWebSDK.sendUserData(email, phone no, first name, last name,{subscribed_channels : [channel list]}

Example 1: If you want to create a new user profile, you can use the sendUserData() method as shown below:

contloWebSDK.sendUserData('[email protected]', '1234567891', 'Chandler', 
'Bing', { "subscribed_channels" : "[ 'EMAIL', 'SMS', 'WHATSAPP' ]" }, false)

Example 2: If you want to update an existing user profile, add the new user details and set the is_profile_update to true. Refer to the code below:

contloWebSDK.sendUserData('[email protected]', '1122345678', 'Chandler', 
'Bing', { "subscribed_channels" : "[ 'EMAIL', 'SMS', 'WHATSAPP' ]" }, true)

Default properties

These are the default user properties sent to Contlo when a user opens your website.

  • current_page: The page the user is currently viewing.
  • Contlo UID: User identification for Contlo.
  • Time: SDK API request time.
  • browser: The browser used by the user to access the website.
  • source: Information about the source ('web' in this case).

Profile properties

These are the custom properties of a user that accept key-value pairs. Profile properties contain some extra information about the user. You can define these properties under custom_propeties in the sendUserData() method as shown below:

contloWebSDK.sendUserData(email, phone no, first name, last name, 
, {custom property1 : value1},  

After you define the user details, you can see all the user's information in the Audience section on the Contlo Dashboard.