Tracking Users
Integrate your app/website through NV SDKs.
Notifyvisitors starts to detect users right after you integrate your app or web platform
through our SDK’s. Hereafter, you can assign unique User ID to every user to identify
them.
nv('user', USER_ID, USER_ATTRIBUTES);
Benefits
- You can add more information to your Notifyvisitors User Profile and create a user segment for different category of people with specific profile property predefined by you.
- You can build new campaigns to engage your users for each segment that you create.
- Secondly, by adding more info to your Notifyvisitors User Profile you can personalize your messaging for the campaigns with related information.
- The third benefit includes personalizing your app created from information from the specific users Notifyvisitors User Profile.
User ID
It is important to set a unique ID so you can easily identify users across different devices. You can identify them whether the users install or uninstall your website or app across different platforms-
- Android
- iOS
- Windows
- The Web
- ID that is backend generated
Must Read:
We recommend that you must get familiar with all the concepts that are related with
Events and Users before you proceed to track users. It will help you to get a better grasp of this section.
As soon as you integrate your platform through our SDKs - which may be a website or an app, Notifyvisitors begins to detect users immediately. You can assign unique user ID to each user to identify them.
Every time a user visits your site, the SDK at Notifyvisitors creates a unique identity for the visitor. We are able to record users with the generated ID and also create a secret anonymous profile. The user’s behavioral data and along with it the session data is stored under the secret profile. The session data includes information like:
- Custom Events
- System Events
- System Attributes of Users’
- Custom Attributes of Users’
Notes
Once user ID is assigned to the user, it cannot be changed further. Therefore make sure you pass system generated user ID instead of email or phone number which can be changed by user in future. The maximum limits for the unique user ID should have a limit of maximum 100 character.
We suggest that you should assign a unique ID- also referred to as CUID (Cluster Unique Identifier) at any of the following instances of User Lifecycle:
- When User signs up
- When User logs in
- When user views pages where the ID becomes known
- On change of User context
When a Cluster Unique Identifier or a CUID has been assigned to a User:
- The user is now identified and now falls in the known user category
- Automatically a fresh Profile for known-User Profile is created, containing all their data
- All of their previous anonymous profiles get merged at this point to help you view a combined profile under the known-User Profile
The User API allows you to track the activity of users’ as they switch from device
to device and keep adding attributes to the profiles. You can use these attributes
to enrich profiles. The attributes include:
- Username
- Gender
- Mobile
You can use the API method upon identifying the user, which happens mostly at login.
How does it Work:
How are profiles merged at the moment when the User is identified or CUID is assigned to the user?
Say, a user before signing up visits your site a couple of times.
- Day 1 Visit to Website: Notifyvisitors gives them a locally-unique identifier or LUID and makes a anonymous user profile automatically which maintains all their data (Anonymous Profile i).
- User A revisits on Day 4: Notifyvisitors assigns a LUID again and yet creates one more anonymous profile and records data (Anonymous Profile ii).
- Again the user revisits the site on Day 7 and then registers for an account: This time you assign a CUID to the user. This will create a new profile.
- The moment a Known User Profile is made, Notifyvisitors will make a quick check for previously created anonymous user profiles after identifying them.
- Now, the Anonymous Profile i and Profile ii will be merged into the final profile of the User A. Hereon, there will be a unified view of the User A profile with record of the user’s behavioral history and preferences.
Guidelines
- All APIs related to users are a part of Notifyvisitors’ user object of the Web SDK
- You cannot change your assigned user ID
- You cannot change your assigned user ID
- Maximum number of characters allowed in making your user ID have to be under a 100 characters
- User ID cannot be changed further once established. Unique ID means having a distinctive user identity.
User Attributes
User Attribute are Attributes related to the user profile as following:
- User's name
- Email address
- Location
There are two types of User Attributes:
- System User Attributes
- Custom User Attributes
Both attributes are tracked for known users and anonymous users
System User Attributes
System user attributes are the attributes which are passed by you and recognized by Notify visitors system.
Guidelines
- NotifyVisitors’ allows professionals to assign values to all attributes for your website users.
- You can use the attributes to configure personalised messages.
- Record details using User attributes as they do not change and their details are the same throughout one session.
Look at the below table to refer to the system attributes :
Attribute Key | Attribute Value | Attribute description |
---|---|---|
user_id | string | |
name | string | |
first_name | string | |
last_name | string | |
string | Email ID | |
mobile | string | Phone number of the user in E.164 format eg. +551155256325, +917850009678 |
birth_date | Date | Birth date in YYYY-MM-DD format |
gender | string | Gender - value can only be one of male, female, other |
email_opt_in | integer | 1 -> reachable on email 0 -> not available , 2 -> bounced |
sms_opt_in | integer | 1 -> reachable on sms , 0 -> not available , 2 -> invalid |
whatsapp_opt_in | integer | 1 -> opt in for whatsapp , 0 -> no, 2 -> invalid |
hashed_email | string | Encrypted email address for use with a private ESP |
hashed_mobile | string | Encrypted phone number for use with a private ESP |
Setting System Attribute
Name
nv('user','1331',{name:'John'});
nv('user','1331',{email:'[email protected]'});
Hashed Email
Businesses do not like to share their users’ contact details with a third party platform
like Notifyvisitors. So we have provided you to pass encrypted email IDs in the
system user attribute.
nv('user','1331',{hashed_email:'144e0424883546e07dcd727057fd3b62'});
Mobile No
nv('user','1331',{mobile:'+919999999999'});
Birth Date (in YYYY-MM-DD format)
nv('user','1331',{birth_date:'1986-08-19'});
Opt In Status
- Set subscription preference of your users for:
- SMS
Use the following methods:
nv('user','1331',{whatsapp_opt_in:1}); //whatsapp
nv('user','1331',{email_opt_in:1}); //email
nv('user','1331',{sms_opt_in:1}); //sms
- Those user who have shared their phone number and email address and automatically opted in to SMS and Email respectively.
- By default the WhatsApp opt-in setting is false. When the users decide to opt-in to channel you would have to set it to true
- If the Users happen to opt-out of a channel, they will stop receiving and communications through that specific channel.
Custom Attributes
Custom attributes are the additional details passed by you for users . You can pass the user system attributes like name, email, mobile and whatsapp_opt_in in and,
Custom attributes like user__score, plan_type etc as given below :
nv('user','1331',{name:'John', email:'[email protected]', mobile:'+919899999999',whatsapp_opt
_in:1, user_score : '340', plan_type: 3});
Important Points :
- Values of an attribute can have only one of the following data types :
Boolean
,Number
,String
,Date
,Map
andArray
. - There are maximum 25 custom attributes per datatype. For example, 25 custom attributes of
Number
data type and 25 custom attributes ofString
data type etc. - The maximum length of a
String
data type for an attribute is 1000 characters. - The maximum length of an attribute Key is 50 characters.
- Attribute Names should contain only alpha-numeric, white spaces or "" ; No other special characters are allowed. Recommended names should be - ‘first name’, ‘last_name’
Complex Attributes
Your user details may have more complex info like
- Array
- objects
nv('user','1331',{name:'John', email:'[email protected]', mobile:'+919899999999', user_score:'340'
whatsapp_opt_in:1, plan_type: 3, Address, {
"Flat" : "h-3/94",
"Building Number" : "B2",
"Locality" : "Bengali Road",
"City" : "Palam",
"State" : "Delhi",
"PIN" : "110045"
}
});
Updated over 1 year ago